Internal Compiler Error with GCC 4.1.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

While compiling the piece of code at the end of this mail, I'm getting
an "Internal Compiler Error".  I'm using GCC  4.1.0 on Fedora Core,
Kernel 2.6.15-1.

This error only occurs with '-g' option.  Also, gcc 3.2 works fine
with the same program.

Is this a known bug in GCC 4.1?  Is there a workaround that I could
use such that the code compiles with gcc 4.1?

Thanks in advance,
Gaurav

/*----- code follows ------*/
int main(int argc, char **argv)
{
       if (sizeof(long) == 8)
       {
               volatile static union {
                       int i;
                       char c[8];
               } u;

               int big_endian = (u.c[0] == 0x01 || u.c[1] == 0x02);
       }
       return 0;
}
/*--- code ends ------- */

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux