Compile this with "-O0 -march=i386" to get segmenation fault: ------------------------------------------------------------------------------ typedef union { int i, j[4]; } foo;
void bar () { foo t = {}; } ------------------------------------------------------------------------------ Caused by this patch: 2005-01-26 Richard Henderson <[EMAIL PROTECTED]> PR middle-end/19515 * expr.c (categorize_ctor_elements): New argument p_must_clear. (categorize_ctor_elements_1): Likewise. Detect a union that isn't fully initialized. (mostly_zeros_p): Update for new categorize_ctor_elements argument. * gimplify.c (gimplify_init_constructor): Likewise. Only shove objects into static storage if they have more than one non-zero value. * tree.h (categorize_ctor_elements): Update decl. -- Summary: [4.0 Regression] ICE with union initializer Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: critical Priority: P1 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: belyshev at depni dot sinp dot msu dot ru CC: gcc-bugs at gcc dot gnu dot org,rth at gcc dot gnu dot org GCC target triplet: i386-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19687