[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Sep 16 09:34:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50383
--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-09-16 08:33:30 UTC ---
Quick&dirty workaround for this problem:
Index: lto-symtab.c
===================================================================
--- lto-symtab.c (revision 178757)
+++ lto-symtab.c (working copy)
@@ -141,11 +141,14 @@ lto_symtab_register_decl (tree decl,
properties inconsistent with having external linkage. If any of
these asertions fail, then the object file reader has failed to
detect these cases and issue appropriate error messages. */
- gcc_assert (decl
+ if (decl
&& TREE_PUBLIC (decl)
&& (TREE_CODE (decl) == VAR_DECL
|| TREE_CODE (decl) == FUNCTION_DECL)
- && DECL_ASSEMBLER_NAME_SET_P (decl));
+ && DECL_ASSEMBLER_NAME_SET_P (decl))
+ ;
+ else
+ return;
if (TREE_CODE (decl) == VAR_DECL
&& DECL_INITIAL (decl))
gcc_assert (!DECL_EXTERNAL (decl)
@@ -781,6 +784,9 @@ lto_symtab_prevailing_decl (tree decl)
if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT (decl))
return decl;
+ if (!DECL_ASSEMBLER_NAME_SET_P (decl))
+ return decl;
+
/* Ensure DECL_ASSEMBLER_NAME will not set assembler name. */
gcc_assert (DECL_ASSEMBLER_NAME_SET_P (decl));
More information about the Gcc-bugs
mailing list