diff options
-rw-r--r-- | gcc/lto/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto/lto-symtab.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 7c93cb7..dedabf3 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2014-05-17 Jan Hubicka <hubicka@ucw.cz> + + PR lto/61012 + * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals + mixed with variables. + 2014-05-17 Trevor Saunders <tsaunders@mozilla.com> * lto-tree.h: Don't use variable_size gty attribute. diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 5486e73..957261e 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -447,7 +447,12 @@ lto_symtab_merge_decls_1 (symtab_node *first) cgraph or a varpool node. */ if (!prevailing) { - prevailing = first; + for (prevailing = first; + prevailing; prevailing = prevailing->next_sharing_asm_name) + if (lto_symtab_symbol_p (prevailing)) + break; + if (!prevailing) + return; /* For variables chose with a priority variant with vnode attached (i.e. from unit where external declaration of variable is actually used). |