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]

c++/4028: gcc 2.96 RH71 throws internal error #19991113 with anonymous union



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


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