[Bug c/54363] [4.6/4.7/4.8 Regression] ICE when compiling malformed struct initializers
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 24 09:08:00 GMT 2012
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".
More information about the Gcc-bugs
mailing list