[gnu.gcc.bug] GCC 1.33 fails compiling GDB 3.1 on VAX

dupuy@CS.COLUMBIA.EDU (Alexander Dupuy) (02/11/89)

System: MicroVax II running 4.3BSD+NFS (Wisconsin)

When compiling GDB 3.1, GCC 1.33 dies with a bus error while processing
printcmd.c with -O.  Without the -O, it compiles normally.

frodo$ cat config.status
Links are now set up for use with a vax.

frodo$ make printcmd.o
gcc -g -O -v -I. -I../gdb -c ../gdb/printcmd.c -o printcmd.o
gcc version 1.33
 /usr/local/gnu/lib/gcc-cpp -v -I. -I../gdb -undef -D__GNUC__ -Dvax -Dunix
-D__vax__ -D__unix__ -D__OPTIMIZE__ ../gdb/printcmd.c /tmp/cc008281.cpp
GNU CPP version 1.33
 /usr/local/gnu/lib/gcc-cc1 /tmp/cc008281.cpp -quiet -dumpbase
../gdb/printcmd.c -g -O -version -o /tmp/cc008281.s
GNU C version 1.33 (vax) compiled by GNU C version 1.33.
gcc: Program cc1 got fatal signal 10.
make: *** Error 1

frodo$ gdb /usr/local/gnu/lib/gcc-cc1 core
GDB 3.1, Copyright (C) 1988 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /usr/local/gnu/lib/gcc-cc1...done.
Type "help" for a list of commands.
(gdb) where
#0  0x3258f in equiv_constant (x=(rtx) 0x8f04c) (../gcc/cse.c line 2400)
#1  0x32c6f in cse_insn (insn=(rtx) 0x8f06c) (../gcc/cse.c line 2864)
#2  0x33938 in cse_basic_block (from=(rtx) 0x603dc, to=(rtx) 0x6009c)
(../gcc/cse.c line 3575)
#3  0x33892 in cse_main (f=(rtx) 0x5f534, nregs=26) (../gcc/cse.c line 3541)
#4  0x111fa in rest_of_compilation (decl=(tree) 0x8e534) (../gcc/toplev.c line 1262)
#5  0xaba7 in finish_function () (../gcc/c-decl.c line 3507)
#6  0x373c in yyparse () (../gcc/c-parse.y line 244)
#7  0x10bc0 in compile_file (name=(char *) 0x7fffe05f "/tmp/cc008281.cpp")
(../gcc/toplev.c line 971)
#8  0x11e22 in main (argc=10, argv=(char **) 0x7fffdf18, envp=(char **)
0x7fffdf44) (../gcc/toplev.c line 1709)
(gdb) print *x
$2 = {code = SUBREG, mode = SImode, jump = 0, call = 0, unchanging = 0, volatil
= 0, in_struct = 0, used = 1, integrated = 0, fld = {{rtint = 585784, rtstr =
0x8f038 "%", rtx = 0x8f038, rtvec = 0x8f038, rttype = 585784}}}
(gdb) p *x->fld->rtx
$4 = {code = MEM, mode = QImode, jump = 0, call = 0, unchanging = 0, volatil =
0, in_struct = 0, used = 1, integrated = 0, fld = {{rtint = 391328, rtstr =
0x5f8a0 "\"", rtx = 0x5f8a0, rtvec = 0x5f8a0, rttype = 391328}}}
(gdb) p *x->fld->rtvec
$5 = {num_elem = 536936485, elem = {{rtint = 391328, rtstr = 0x5f8a0 "\"", rtx
= 0x5f8a0, rtvec = 0x5f8a0, rttype = 391328}}}

@alex
-- 
inet: dupuy@cs.columbia.edu
uucp: ...!rutgers!cs.columbia.edu!dupuy