re PR lto/56147 (ICE on invalid code in lto_symtab_merge_decls_1)
authorRichard Biener <rguenther@suse.de>
Wed, 30 Jan 2013 11:39:19 +0000 (11:39 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 30 Jan 2013 11:39:19 +0000 (11:39 +0000)
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

gcc/ChangeLog
gcc/lto-symtab.c

index 797fb12..47eb2c7 100644 (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
index 84168c3..546601d 100644 (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;