1 --- gcc-4.1-20050815T0803UTC/gcc/gimplify.c 2005-08-16 19:35:38.541525608 +0000
2 +++ gcc-4.1-20050815T0803UTC/gcc/gimplify.c 2005-08-16 19:36:46.005269560 +0000
3 @@ -2552,6 +2552,17 @@ zero_sized_field_decl (tree fdecl)
7 +/* Return true if TYPE is zero sized. */
10 +zero_sized_type (tree type)
12 + if (AGGREGATE_TYPE_P (type) && TYPE_SIZE (type)
13 + && integer_zerop (TYPE_SIZE (type)))
18 /* A subroutine of gimplify_init_constructor. Generate individual
19 MODIFY_EXPRs for a CONSTRUCTOR. OBJECT is the LHS against which the
20 assignments should happen. ELTS is the CONSTRUCTOR_ELTS of the
21 @@ -2964,6 +2975,12 @@ gimplify_modify_expr_rhs (tree *expr_p,
22 tree *post_p, bool want_value)
24 enum gimplify_status ret = GS_OK;
25 + tree type = TREE_TYPE (*from_p);
26 + if (zero_sized_type (type))
28 + *expr_p = build_empty_stmt ();
32 while (ret != GS_UNHANDLED)
33 switch (TREE_CODE (*from_p))