From mboxrd@z Thu Jan 1 00:00:00 1970 From: pb@instadia.net To: gcc-gnats@gcc.gnu.org Subject: c++/4028: gcc 2.96 RH71 throws internal error #19991113 with anonymous union Date: Wed, 15 Aug 2001 01:06:00 -0000 Message-id: <20010815075832.23705.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00413.html List-Id: >Number: 4028 >Category: c++ >Synopsis: gcc 2.96 RH71 throws internal error #19991113 with anonymous union >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Aug 15 01:06:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Philip Bergen >Release: gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) >Organization: >Environment: RH 7.1 on AMD thunderbird, intel PIII mobile, AMD athlon >Description: Only gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) does not crash, all more recent versions seems to be flawed. Compiler crashes on anonymous union, like the one included. Can be helped by naming the union after which compiler performs flawlessly. >How-To-Repeat: Not quite sure, the union in the test is included in a boundschecking class for our memory manager. >Fix: Change from anonymous union to named. union { int a; char b[4];} polka; polka.a=0xDEADFACE; compiles just fine. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="test.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.cpp" I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewogICB1bmlvbiB7CiAgICAgIGludCBtYWdp Y19pbnQ7CiAgICAgIGNoYXIgbWFnaWNbNF07CiAgIH07CiAgIAogICBtYWdpY19pbnQ9MHhERUFE RkFDRTsKICAgcHJpbnRmKCIlZCAlZCAlZCAlZFxuIixtYWdpY1swXSxtYWdpY1sxXSxtYWdpY1sy XSxtYWdpY1szXSk7CiAgIAogICByZXR1cm4gMDsKfQo=