------- Additional Comments From steven at gcc dot gnu dot org 2005-01-20
09:04 -------
This is odd.
For a struct { char a[8]; } count_type_elements returns 8.
For a union { char a[8]; } count_type_elements returns 1.
This confuses the following code in gimplify_init_constructor:
/* ??? This bit ought not be needed. For any element not present
in the initializer, we should simply set them to zero. Except
we'd need to *find* the elements that are not present, and that
requires trickery to avoid quadratic compile-time behavior in
large cases or excessive memory use in small cases. */
else if (num_ctor_elements < num_type_elements)
cleared = true;
num_ctor_elements == 1 and num_type_elements == 1, so we don't clear.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19515