diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2013-08-18 14:58:58 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2013-08-18 14:58:58 +0000 |
commit | 4f219961f049e3125a4f5f02c287db0a1f4b8143 (patch) | |
tree | c4993a2810023ca32df4256e006ab189425a5d5b /gcc/cgraphunit.c | |
parent | ce645eb091d3392d2f5aee2d415d472ced088d5b (diff) | |
download | gcc-4f219961f049e3125a4f5f02c287db0a1f4b8143.tar.gz |
cgraphunit.c (handle_alias_pairs): Reset the alias flag after the error message is issued for an alias to...
* cgraphunit.c (handle_alias_pairs): Reset the alias flag after the
error message is issued for an alias to undefined symbol.
From-SVN: r201826
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 3cd2b417ca7..1a4f99febf9 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1004,7 +1004,7 @@ analyze_functions (void) /* Translate the ugly representation of aliases as alias pairs into nice representation in callgraph. We don't handle all cases yet, - unforutnately. */ + unfortunately. */ static void handle_alias_pairs (void) @@ -1016,10 +1016,11 @@ handle_alias_pairs (void) { symtab_node target_node = symtab_node_for_asm (p->target); - /* Weakrefs with target not defined in current unit are easy to handle; they - behave just as external variables except we need to note the alias flag - to later output the weakref pseudo op into asm file. */ - if (!target_node && lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)) != NULL) + /* Weakrefs with target not defined in current unit are easy to handle: + they behave just as external variables except we need to note the + alias flag to later output the weakref pseudo op into asm file. */ + if (!target_node + && lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)) != NULL) { symtab_node node = symtab_get_node (p->decl); if (node) @@ -1034,6 +1035,9 @@ handle_alias_pairs (void) else if (!target_node) { error ("%q+D aliased to undefined symbol %qE", p->decl, p->target); + symtab_node node = symtab_get_node (p->decl); + if (node) + node->symbol.alias = false; alias_pairs->unordered_remove (i); continue; } |