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 c/54363] [4.6/4.7/4.8 Regression] ICE when compiling malformed struct initializers


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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-08-24 09:08:09 UTC ---
--- gimplify.c.jj    2012-08-15 10:55:33.000000000 +0200
+++ gimplify.c    2012-08-24 11:01:55.253815273 +0200
@@ -3857,7 +3857,8 @@ optimize_compound_literals_in_ctor (tree

       if (!TREE_ADDRESSABLE (value)
           && !TREE_ADDRESSABLE (decl)
-          && init)
+          && init
+          && TREE_CODE (init) == CONSTRUCTOR)
         newval = optimize_compound_literals_in_ctor (init);
     }
       if (newval == value)

fixes the ICE, we end up with b.a = (char **) "a".


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