This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/19900] [4.0 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]