hugh@CIS.OHIO-STATE.EDU (D. Hugh Redelmeier) (04/16/89)
The following script illustrates a problem I am having with gcc1.24 on a Sun 3/60 running SunOS3.5.2. The crash seems to occur in line 849 of c-typeck.c, in function build_array_ref. The following subexpression seems to get a segment violation: TREE_CODE (TYPE_SIZE (TREE_TYPE (TREE_TYPE (array)))) != INTEGER_CST Script started on Sat Apr 15 22:25:17 1989 $ cat tt.c extern const struct entry tab[]; static const struct entry *p = &tab[28 ]; $ gcc -v tt.c gcc version 1.34 /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 tt.c /tmp/cca19382.cpp GNU CPP version 1.34 /usr/local/lib/gcc-cc1 /tmp/cca19382.cpp -quiet -dumpbase tt.c -version -o /tmp/cca19382.s GNU C version 1.34 (68k, MIT syntax) compiled by GNU C version 1.34. gcc: Program cc1 got fatal signal 11. $ adb /usr/local/lib/gcc-cc1 core file = core -- program ``gcc-cc1'' SIGSEGV 11: segmentation violation $c _build_array_ref() + 68 _yyparse() + aa8 _compile_file(0xefffde7) + 614 _main(0x8,0xefffd50,0xefffd74) + 53e _build_array_ref,40?ai _build_array_ref: _build_array_ref: _build_array_ref: linkw a6,#0 _build_array_ref+4: moveml a2/a3/a4,sp@- _build_array_ref+8: movl a6@(8),a2 _build_array_ref+0xc: movl a6@(0xc),a3 _build_array_ref+0x10: tstl a3 _build_array_ref+0x12: bnes _build_array_ref+0x1c _build_array_ref+0x14: pea _build_indirect_ref+0xaa _build_array_ref+0x18: bra _build_array_ref+0x19e _build_array_ref+0x1c: movl a2@(8),a0 _build_array_ref+0x20: cmpb #0x10,a0@(0xc) _build_array_ref+0x26: bne _build_array_ref+0x158 _build_array_ref+0x2a: cmpb #0x31,a2@(0xc) _build_array_ref+0x30: beq _build_array_ref+0x158 _build_array_ref+0x34: movl a3,sp@- _build_array_ref+0x36: bsr _default_conversion _build_array_ref+0x3a: movl d0,a3 _build_array_ref+0x3c: addqw #4,sp _build_array_ref+0x3e: cmpl _error_mark_node:l,a3 _build_array_ref+0x44: beqs _build_array_ref+0x54 _build_array_ref+0x46: movl a3@(8),a0 _build_array_ref+0x4a: cmpb #5,a0@(0xc) _build_array_ref+0x50: bne _build_array_ref+0x19a _build_array_ref+0x54: cmpb #0x23,a3@(0xc) _build_array_ref+0x5a: bnes _build_array_ref+0x70 _build_array_ref+0x5c: movl a2@(8),a0 _build_array_ref+0x60: movl a0@(8),a0 _build_array_ref+0x64: movl a0@(0x18),a0 _build_array_ref+0x68: cmpb #0x23,a0@(0xc) _build_array_ref+0x6e: beqs _build_array_ref+0x88 _build_array_ref+0x70: movl a2,sp@- _build_array_ref+0x72: jsr _mark_addressable:l _build_array_ref+0x78: addqw #4,sp _build_array_ref+0x7a: tstl d0 _build_array_ref+0x7c: bnes _build_array_ref+0x88 _build_array_ref+0x7e: movl _error_mark_node:l,d0 _build_array_ref+0x84: bra _build_array_ref+0x1c8 _build_array_ref+0x88: tstl _pedantic:l _build_array_ref+0x8e: beqs _build_array_ref+0xaa _build_array_ref+0x90: movl a2,sp@- _build_array_ref+0x92: bsrl _lvalue_p _build_array_ref+0x98: addqw #4,sp _build_array_ref+0x9a: tstl d0 _build_array_ref+0x9c: bnes _build_array_ref+0xaa _build_array_ref+0x9e: pea _build_indirect_ref+0xf1 _build_array_ref+0xa2: bsrl _warning _build_array_ref+0xa8: addqw #4,sp _build_array_ref+0xaa: tstl _pedantic:l _build_array_ref+0xb0: beqs _build_array_ref+0xe4 _build_array_ref+0xb2: movl a2,a0 _build_array_ref+0xb4: cmpb #0x30,a0@(0xc) _build_array_ref+0xba: bnes _build_array_ref+0xc8 _build_array_ref+0xbc: movl a0@(0x14),a0 _build_array_ref+0xc0: cmpb #0x30,a0@(0xc) _build_array_ref+0xc6: beqs _build_array_ref+0xbc _build_array_ref+0xc8: cmpb #0x2b,a0@(0xc) _build_array_ref+0xce: bnes _build_array_ref+0xe4 _build_array_ref+0xd0: btst #5,a0@(0xe) _build_array_ref+0xd6: beqs _build_array_ref+0xe4 _build_array_ref+0xd8: pea _build_indirect_ref+0xf1 _build_array_ref+0xdc: bsrl _warning _build_array_ref+0xe2: addqw #4,sp _build_array_ref+0xe4: movl a3,sp@- _build_array_ref+0xe6: movl a2,sp@- _build_array_ref+0xe8: movl a2@(8),a0 ^D$ ^D script done on Sat Apr 15 22:29:09 1989 script done on Sat Apr 15 22:29:09 1989 Hugh Redelmeier {utcsri, yunexus, uunet!attcan!utzoo, hcr}!redvax!hugh When all else fails: hugh@csri.toronto.edu +1 416 482-8253