------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-15 
06:00 -------
>From the reduced testcase in that PR, we get the following for the constructor 
>(which is wrong):
{.bandD.636=2, .the_commandD.637=0, ._parentD.648={.bandD.640=2}, 
.tc_sccD.652=66}

The problem comes from:
              gnu_type = make_node (possibly_overlapping_fields
                                    ? UNION_TYPE : RECORD_TYPE);

in decl.c:2627

Note that _parent overlaps with the stuff before it.

What needs to happen is we need to create a better type for this unless unions 
are aloud to have more 
than one initializer.

It looks like we should be instead of using an UNION but access the type as a 
subfield (like the C++ 
front-end) and also when taking the address for the parent's type do:
"&a._parent".

This is a front-end bug.  Fixing this one the way I recommend will also fix PR 
19408 at the same time.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19900

Reply via email to