------- Comment #4 from rguenth at gcc dot gnu dot org 2008-02-04 17:30 -------
Err, yes. We run into 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;
}
and get 1 vs. 2 for the struct case. So, giving up in the above case
is certainly more correct.
Testing the obvious patch.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2008-02-04 17:04:08 |2008-02-04 17:30:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33631