Internal compiler error in function fatal_insn

Andre Willkowsky andre.willkowsky@socon.de
Fri Sep 24 08:26:00 GMT 1999


Hello,

i think i found a bug in egcs. When i try to compile the
little program:

int main() {
  const char p[]= "Hallihallo";
  char *b= p;
  (*p)++;
}

i get the Error:

/usr/bin/g++ -v --save-temps -o main.o  -c main.cpp
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ main.cpp main.iiGNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/lib/g++-include
 /usr/local/include
 /usr/i486-linux/include
 /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/cc1plus main.ii -quiet -dumpbase main.cc -version -o main.s
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i486-linux) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
main.cpp: In function `int main()':
main.cpp:3: warning: initialization to `char *' from `const char *' discards const
main.cpp:4: increment of read-only location
main.cpp:5: internal error--unrecognizable insn:
(insn 31 29 32 (set (const_int 72)
        (plus:QI (const_int 72)
            (const_int 1))) -1 (nil)
    (nil))
toplev.c:1367: Internal compiler error in function fatal_insn
make: *** [main.o] Error 1                                                                         

I am using a Suse6.1 distribution with Linux Kernel patched to
version 2.2.12 on a Pentium2-350, 128MB Ram,  ldd /bin/ls says
        libc.so.6 => /lib/libc.so.6 (0x4000a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)                                      

the complete sources are in the attached tar.
I hope this helps you a little by further improving egcs.

Andre








More information about the Gcc-bugs mailing list