http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54363
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-08-24
CC| |bonzini at gnu dot org,
| |jakub at gcc dot gnu.org,
| |jsm28 at gcc dot gnu.org
Target Milestone|--- |4.6.4
Summary|ICE when compiling |[4.6/4.7/4.8 Regression]
|malformed struct |ICE when compiling
|initializers |malformed struct
| |initializers
Ever Confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-08-24
08:35:15 UTC ---
Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145256
The problem is that a COMPOUND_LITERAL_EXPR doesn't have CONSTRUCTOR as its
DECL_INITIAL. Either this is a FE bug (tree.def says that it should be
CONSTRUCTOR), or we should just tweak optimize_compound_literals_in_ctor not to
recurse if TREE_CODE (init) is not CONSTRUCTOR.
Correct source would be
struct bla{char **a;};void test(void){struct bla b = {.a =(char*[]){"a","b"}};}