This is the mail archive of the gcc-bugs@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]

egcs-19980418 Internal compiler error


Hi,

on i386-solaris2.5 egcs-19980418 aborts during thev compilation of
inetutils-1.3.

gcc -g -O2 -DHAVE_CONFIG_H -I. -I../include   -c openpty.c -o openpty.o
gcc: Internal compiler error: program cc1 got fatal signal 6

The offending code can be destilled to the following snippet. Try to
compile it with -O2 (this is essential):


void openpty()
{
  char * const line = "foo";
  line[1] = 'a';
}

The code is somewhat suspect, i believe string constants are read-only
on solaris by default.
Here is a backtrace for a quick overview:

../libinetutils:(1)$ gdb
/usr/local/lib/gcc-lib/i386-pc-solaris2.5/egcs-2.91.24/cc1 core
...
Core was generated by
`/usr/local/lib/gcc-lib/i386-pc-solaris2.5/egcs-2.91.24/cc1 -O2
openpty.i'.
Program terminated with signal 6, Aborted.
...
(gdb) bt
#0  0x8007abc8 in kill ()
#1  0x8004bbd1 in abort ()
#2  0x809f6d5 in emit_move_insn_1 (x=0x81b3e84, y=0x81b3e8c) at
expr.c:2354
#3  0x809f3e7 in emit_move_insn (x=0x81b3e84, y=0x81b3e8c) at
expr.c:2236
#4  0x80a0d03 in store_expr (exp=0x81b2820, target=0x81b3e84,
want_value=0) at expr.c:3428
#5  0x80a0567 in expand_assignment (to=0x81b27e0, from=0x81b2820,
want_value=0, suggest_reg=1) at expr.c:3102
#6  0x80a63d1 in expand_expr (exp=0x81b2838, target=0x0, tmode=VOIDmode,
modifier=EXPAND_NORMAL) at expr.c:7173
#7  0x8097682 in expand_expr_stmt (exp=0x81b2838) at stmt.c:1542
#8  0x807b179 in expand_stmt_with_iterators_1 (stmt=0x81b2838,
iter_list=0x0) at c-iterate.c:165
#9  0x807b154 in iterator_expand (stmt=0x81b2838) at c-iterate.c:155
#10 0x80632a9 in yyparse () at ./c-parse.c:1665
#11 0x807cd3a in compile_file (name=0x804750d "openpty.i") at
toplev.c:2545
#12 0x807f378 in main (argc=6, argv=0x8047394, envp=0x80473b0) at
toplev.c:4366
(gdb) 


I have yet to test this with the actual release (it is still compiling
itself :-/)

Happy debugging!

J.Pietschmann



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]