internal compiler error: cc1 got fatal signal 11
Peter Schmid
schmid@ltoi.iap.physik.tu-darmstadt.de
Sun Dec 14 08:40:00 GMT 1997
When I compile this program, it is from the gcc.testsuite, the compiler
crashes with a segmentation fault.
It seems that a null pointer p is dereferenced in line 464 of tree.c in
function restore_tree_status.
Sorry I don`t know, what is the correct way to fix this.
Peter Schmid
cat 921215-1.c
main()
{
#ifndef NO_TRAMPOLINES
void p(void ((*f) (void ())))
{
void r()
{
foo ();
}
f(r);
~ }
void q(void ((*f)()))
{
f();
}
p(q);
#endif
exit(0);
}
foo(){}
peter:/dos/tmp$ gcc -O -finline-functions 921215-1.c
gcc: Internal compiler error: program cc1 got fatal signal 11
gdb -c core /usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.02/cc1
Current directory is /dos/tmp/
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-unknown-linux), Copyright 1996 Free Software Foundation, Inc...
Core was generated by `/usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.02/cc1 /dos/tmp/cca00075.i -quÃÂ'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.5...done.
Reading symbols from /lib/ld-linux.so.1...done.
#0 0x8067a5d in restore_tree_status (p=0x81b09a8, context=0x0) at tree.c:464
(gdb) where
#0 0x8067a5d in restore_tree_status (p=0x81b09a8, context=0x0) at tree.c:464
#1 0x8077ac8 in pop_function_context_from (context=0x0) at function.c:616
#2 0x8077b4a in pop_function_context () at function.c:643
#3 0x8050d82 in poplevel (keep=1, reverse=1, functionbody=0) at c-decl.c:1062
#4 0x804b1a7 in yyparse () at c-parse.y:1557
#5 0x806459c in compile_file (name=0xbffffb0b "/dos/tmp/cca00075.i")
at toplev.c:2543
#6 0x8066f46 in main (argc=11, argv=0xbffff9bc, envp=0xbffff9ec)
at toplev.c:4466
#7 0x804901e in ___crt_dummy__ ()
(gdb) info locals
current = (struct simple_obstack_stack *) 0x0
p = (struct simple_obstack_stack **) 0x818dd2c
p = (struct function *) 0x81b09a8
context = 0x0
(gdb) p function_maybepermanent_obstack
$1 = (struct obstack *) 0x81ae898
(gdb) p p
$2 = (struct simple_obstack_stack **) 0x818dd2c
(gdb) p **p
$3 = {obstack = 0xb, next = 0x0}
(gdb) p *p
$4 = (struct simple_obstack_stack *) 0x0
(gdb)
More information about the Gcc-bugs
mailing list