diff options
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 2f820f1bb67..69aa6c5bce2 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -61,6 +61,8 @@ along with GCC; see the file COPYING3. If not see #include "tree-chkp.h" #include "context.h" #include "gimplify.h" +#include "stringpool.h" +#include "attribs.h" /* FIXME: Only for PROP_loops, but cgraph shouldn't have to know about this. */ #include "tree-pass.h" @@ -582,10 +584,11 @@ cgraph_node * cgraph_node::create_same_body_alias (tree alias, tree decl) { cgraph_node *n; -#ifndef ASM_OUTPUT_DEF + /* If aliases aren't supported by the assembler, fail. */ - return NULL; -#endif + if (!TARGET_SUPPORTS_ALIASES) + return NULL; + /* Langhooks can create same body aliases of symbols not defined. Those are useless. Drop them on the floor. */ if (symtab->global_info_ready) @@ -2319,7 +2322,8 @@ cgraph_node::get_availability (symtab_node *ref) avail = AVAIL_AVAILABLE; else if (transparent_alias) ultimate_alias_target (&avail, ref); - else if (lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl))) + else if (lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)) + || lookup_attribute ("noipa", DECL_ATTRIBUTES (decl))) avail = AVAIL_INTERPOSABLE; else if (!externally_visible) avail = AVAIL_AVAILABLE; |