diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-05-22 07:38:04 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-05-22 05:38:04 +0000 |
commit | b95591361e32a755231d99c348f8a43e2aed0187 (patch) | |
tree | c72d00aded03e79f8a7ecd9f03ab4b6240acf2db /gcc | |
parent | 4269f19c09163d6ef65043171eeccc9c521d9b5f (diff) | |
download | gcc-b95591361e32a755231d99c348f8a43e2aed0187.zip gcc-b95591361e32a755231d99c348f8a43e2aed0187.tar.gz gcc-b95591361e32a755231d99c348f8a43e2aed0187.tar.bz2 |
re PR lto/61012 (lto1: errors during merging of translation units (error: variable ‘link’ redeclared as function))
PR lto/61012
* lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
mixed with variables.
From-SVN: r210740
Diffstat (limited to 'gcc')
-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). |