------- Comment #4 from jsm28 at gcc dot gnu dot org 2009-05-09 18:09 -------
gimplify_init_constructor does
tree ctor = TREE_OPERAND (*expr_p, 1);
...
new_ctor = optimize_compound_literals_in_ctor (ctor);
elts = CONSTRUCTOR_ELTS (new_ctor);
...
gimplify_init_ctor_preeval (&TREE_OPERAND (*expr_p, 1),
pre_p, post_p, &preeval_data);
(which changes a COND_EXPR to have void type, updating the pointer to
that COND_EXPR in TREE_OPERAND (*expr_p, 1) - the old constructor -
to point to the gimplifier-generated temorary instead)
...
if (!cleared || num_nonzero_elements > 0)
gimplify_init_ctor_eval (object, elts, pre_p, cleared);
(which goes through the elements of the new constructor, finds the
modified COND_EXPR and ends up segfaulting because of that).
This looks like the compound literal changes must be responsible and
that it is a gimplifier bug.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gnu dot org
Status|UNCONFIRMED |NEW
Component|c |middle-end
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-05-09 18:09:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40026