From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5175 invoked by alias); 15 Feb 2005 06:00:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4783 invoked by uid 48); 15 Feb 2005 06:00:20 -0000 Date: Tue, 15 Feb 2005 18:30:00 -0000 Message-ID: <20050215060020.4782.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050211113507.19900.laurent@guerby.net> References: <20050211113507.19900.laurent@guerby.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug ada/19900] [4.0 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1 X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg01586.txt.bz2 List-Id: ------- 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