aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-01-30 11:39:19 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-01-30 11:39:19 +0000
commite892936ec2294248f9bf0f421d1c89b65a8598be (patch)
tree701378d14670a6bbbd12f324179e6d5ef8c99845
parentcc06c01d0a29c6e1466feba98d8ae3bf20193822 (diff)
downloadgcc-e892936ec2294248f9bf0f421d1c89b65a8598be.zip
gcc-e892936ec2294248f9bf0f421d1c89b65a8598be.tar.gz
gcc-e892936ec2294248f9bf0f421d1c89b65a8598be.tar.bz2
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lto-symtab.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 797fb12..47eb2c7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c
index 84168c3..546601d 100644
--- a/gcc/lto-symtab.c
+++ b/gcc/lto-symtab.c
@@ -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;