This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Internal Compiler Error with GCC 4.1.0


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]