Commit b9559136 by Jan Hubicka Committed by Jan Hubicka

re PR lto/61012 (lto1: errors during merging of translation units (error:…

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
parent 4269f19c
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> 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
* lto-tree.h: Don't use variable_size gty attribute. * lto-tree.h: Don't use variable_size gty attribute.
......
...@@ -447,7 +447,12 @@ lto_symtab_merge_decls_1 (symtab_node *first) ...@@ -447,7 +447,12 @@ lto_symtab_merge_decls_1 (symtab_node *first)
cgraph or a varpool node. */ cgraph or a varpool node. */
if (!prevailing) 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 /* For variables chose with a priority variant with vnode
attached (i.e. from unit where external declaration of attached (i.e. from unit where external declaration of
variable is actually used). variable is actually used).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment