re PR lto/56147 (ICE on invalid code in lto_symtab_merge_decls_1)

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

	PR lto/56147
	* lto-symtab.c (lto_symtab_merge_decls_1): Guard DECL_BUILT_IN
	check.

From-SVN: r195575
This commit is contained in:
Richard Biener 2013-01-30 11:39:19 +00:00 committed by Richard Biener
parent cc06c01d0a
commit e892936ec2
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-01-30 Richard Biener <rguenther@suse.de>
PR lto/56147
* lto-symtab.c (lto_symtab_merge_decls_1): Guard DECL_BUILT_IN
check.
2013-01-30 Georg-Johann Lay <avr@gjlay.de>
PR tree-optimization/56064

View File

@ -443,7 +443,8 @@ lto_symtab_merge_decls_1 (symtab_node first)
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))
if (TREE_CODE (e->symbol.decl) == FUNCTION_DECL
&& DECL_BUILT_IN (e->symbol.decl))
{
prevailing = e;
break;