------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-01-20 09:15 ------- > From expr.c:count_type_elements: > > case UNION_TYPE: > case QUAL_UNION_TYPE: > { > /* Ho hum. How in the world do we guess here? Clearly it isn't > right to count the fields. Guess based on the number of words. > */ > HOST_WIDE_INT n = int_size_in_bytes (type); > if (n < 0) > return -1; > return n / UNITS_PER_WORD; > } > > So we cannot use count_type_elements in gimplify_init_constructor.
Can't we compute the result for unions based on the type of the first member? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19515