This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/54363] [4.6/4.7/4.8 Regression] ICE when compiling malformed struct initializers
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Aug 2012 09:08:09 +0000
- Subject: [Bug c/54363] [4.6/4.7/4.8 Regression] ICE when compiling malformed struct initializers
- Auto-submitted: auto-generated
- References: <bug-54363-4@http.gcc.gnu.org/bugzilla/>
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".