C++ ICE on -fPIC -fhonor-std -fsquangle

Chip Salzenberg chipATperlsupport.com
Tue Sep 14 23:43:00 GMT 1999


(( resend #2 -- test case seems to be too big ))

This is a weird one.

Using yesterday's snapshot (gcc version 2.96 19990913 (experimental)),
a source file from libstdc++-v3 causes an ICE when compiled with the
following options:
    -g -fPIC -fsquangle -fhonor-std
Removing *any* one of those options seems to avert an ICE.

Preprocessed source file is at:
    http://www.perlsupport.com/~chip/locale-inst.i.gz

Here's a backtrace:

(gdb) run -quiet -fsquangle -fhonor-std -fPIC -g locale-inst.i
Starting program: /u/egcs/lib/gcc-lib/i686-pc-linux-gnu/2.96/cc1plus -quiet -fsquangle -fhonor-std -fPIC -g locale-inst.i
Breakpoint 1 at 0x400374d5

Program received signal SIGSEGV, Segmentation fault.
mark_pool_sym_hash_table (pps=0x842d8a0) at ../SRC/gcc/varasm.c:3222
3222          ggc_mark_string (ps->label);
(gdb) print ps
$1 = (struct pool_sym *) 0x20000000
(gdb) where
#0  mark_pool_sym_hash_table (pps=0x842d8a0) at ../SRC/gcc/varasm.c:3222
#1  0x80a1f32 in mark_varasm_state (p=0x8cf5060) at ../SRC/gcc/varasm.c:3232
#2  0x806a3f6 in mark_function_chain (arg=0x82c8cf8)
    at ../SRC/gcc/function.c:6756
#3  0x81e5539 in ggc_collect () at ../SRC/gcc/ggc-simple.c:529
#4  0x804bf66 in rest_of_compilation (decl=0x8db8e1c)
    at ../SRC/gcc/toplev.c:3761
#5  0x82044ef in finish_function (lineno=187, flags=1)
    at ../../SRC/gcc/cp/decl.c:13788
#6  0x822e106 in yyparse () at parse.y:665
#7  0x804b24e in compile_file (name=0xbffffc87 "locale-inst.i")
    at ../SRC/gcc/toplev.c:3215
#8  0x804e6fc in main (argc=7, argv=0xbffffae4) at ../SRC/gcc/toplev.c:5471
(gdb)

... Help?
-- 
Chip Salzenberg      - a.k.a. -      <chip@perlsupport.com>
      "When do you work?"   "Whenever I'm not busy."


More information about the Gcc-bugs mailing list