c++/3620

Peter Niemayer niemayer.viag@isg.de
Tue Jul 10 08:18:00 GMT 2001


>  Synopsis:          GCC3.0 optimization on anonymous union causes ICE

>  Description:       ICE occurs with the following code and -O option:
>                     --------------------------------------test.cpp
>                     void something(char *);
> 
>                     int main()
>                     {
>                     union {
>                     char d[sizeof(int)];
>                     int ll;
>                     };
>                     something(d);
>                     return ll;
>                     }
>                     -----------------------------------------------

Interestingly, this bug is very similar to one that I reported a long
time ago (PR 228) and that was also fixed a long time ago:

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=228&database=gcc

This old bug is still fixed with gcc-3.0 - so maybe the fix of the old
bug introduced the new one?

Regards,

Peter Niemayer



More information about the Gcc-bugs mailing list