re PR lto/55848 (internal compiler error: verify_cgraph_node failed (with -flto' and -fopenmp'))

2013-01-03  Richard Biener  <rguenther@suse.de>

	PR lto/55848
	* lto-symtab.c (lto_symtab_merge_decls_1): As last resort, always
	prefer a built-in decl.

From-SVN: r194839
This commit is contained in:
Richard Biener 2013-01-03 09:45:18 +00:00 committed by Richard Biener
parent df8e2b4f17
commit f09b77caca
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-01-03 Richard Biener <rguenther@suse.de>
PR lto/55848
* lto-symtab.c (lto_symtab_merge_decls_1): As last resort, always
prefer a built-in decl.
2013-01-03 Jakub Jelinek <jakub@redhat.com> 2013-01-03 Jakub Jelinek <jakub@redhat.com>
* gcc.c (process_command): Update copyright notice dates. * gcc.c (process_command): Update copyright notice dates.

View File

@ -439,6 +439,16 @@ lto_symtab_merge_decls_1 (symtab_node first)
&& COMPLETE_TYPE_P (TREE_TYPE (e->symbol.decl))) && COMPLETE_TYPE_P (TREE_TYPE (e->symbol.decl)))
prevailing = e; prevailing = e;
} }
/* For variables prefer the builtin if one is available. */
else if (TREE_CODE (prevailing->symbol.decl) == FUNCTION_DECL)
{
for (e = first; e; e = e->symbol.next_sharing_asm_name)
if (DECL_BUILT_IN (e->symbol.decl))
{
prevailing = e;
break;
}
}
} }
symtab_prevail_in_asm_name_hash (prevailing); symtab_prevail_in_asm_name_hash (prevailing);