diff options
author | espindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-17 16:49:22 +0000 |
---|---|---|
committer | espindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-17 16:49:22 +0000 |
commit | 67b2bb71ffc824c77eaef62fc512281f64bf8142 (patch) | |
tree | 8b4e66e4e052ec0cc610772abc8c6471d7a7d7f1 /gcc/lto-symtab.c | |
parent | 29f67cfe5100c927c71708b2fe4acd97fe2f4cd4 (diff) | |
download | gcc-67b2bb71ffc824c77eaef62fc512281f64bf8142.tar.gz |
2009-11-17 Rafael Avila de Espindola <espindola@google.com>
* lto-symtab.c (lto_symtab_resolve_symbols): Always initialize the
nodes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154258 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-symtab.c')
-rw-r--r-- | gcc/lto-symtab.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 642b6235d90..5f98a3515f2 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -376,20 +376,26 @@ lto_symtab_resolve_can_prevail_p (lto_symtab_entry_t e) static void lto_symtab_resolve_symbols (void **slot) { - lto_symtab_entry_t e = (lto_symtab_entry_t) *slot; + lto_symtab_entry_t e; lto_symtab_entry_t prevailing = NULL; - /* If the chain is already resolved there is nothing to do. */ + /* Always set e->node so that edges are updated to reflect decl merging. */ + for (e = (lto_symtab_entry_t) *slot; e; e = e->next) + { + if (TREE_CODE (e->decl) == FUNCTION_DECL) + e->node = cgraph_get_node (e->decl); + } + + e = (lto_symtab_entry_t) *slot; + + /* If the chain is already resolved there is nothing else to do. */ if (e->resolution != LDPR_UNKNOWN) return; /* Find the single non-replaceable prevailing symbol and diagnose ODR violations. */ - for (; e; e = e->next) + for (e = (lto_symtab_entry_t) *slot; e; e = e->next) { - if (TREE_CODE (e->decl) == FUNCTION_DECL) - e->node = cgraph_get_node (e->decl); - if (!lto_symtab_resolve_can_prevail_p (e)) { e->resolution = LDPR_RESOLVED_IR; |