This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/51635] [4.7 regression] ICE in in dwarf2out_finish, at dwarf2out.c:22494 when building Firefox's libxul


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51635

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-20 14:16:35 UTC ---
It's actually easy to do.  We just have to make sure that the TYPE_DECLs we
refer to are those of their type.  Thus,

Index: gcc/lto/lto.c
===================================================================
--- gcc/lto/lto.c       (revision 182525)
+++ gcc/lto/lto.c       (working copy)
@@ -867,7 +867,11 @@ uniquify_nodes (struct data_in *data_in,
       if (t == NULL_TREE)
        continue;

-      if (TREE_CODE (t) == VAR_DECL)
+      if (TYPE_P (t)
+         && TYPE_NAME (t)
+         && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL)
+       TYPE_NAME (t) = TYPE_NAME (TREE_TYPE (TYPE_NAME (t)));
+      else if (TREE_CODE (t) == VAR_DECL)
        lto_register_var_decl_in_symtab (data_in, t);
       else if (TREE_CODE (t) == FUNCTION_DECL && !DECL_BUILT_IN (t))
        lto_register_function_decl_in_symtab (data_in, t);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]