------- Comment #2 from ramana at gcc dot gnu dot org 2009-05-06 08:46 ------- Can't replicate this with a stage2 or stage3 compiler with O2, O3, Os -fPIC {-mthumb} with r147121.
However while bootstrapping the above mentioned revision, I get a segfault as in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39929#c12 but with . ram...@gcc55:~/build-20090505/armv5tel-unknown-linux-gnueabi/libstdc++-v3/libsupc++\[01;32mram...@gcc55[01;34m ~/build-20090505/armv5tel-unknown-linux-gnueabi/libstdc++-v3/libsupc++ $[00m [Kgdb --args /home/ramana/build-20090505/./gcc/cc1 -quiet -v -I.. -I/home/ramana/trunk/libstdc++-v3/../libiberty -I/home/ramana/trunk/libstdc++-v3/../include -I/home/ramana/build-20090505/armv5tel-unknown-linux-gnueabi/libstdc++-v3/include/armv5tel-unknown-linux-gnueabi -I/home/ramana/build-20090505/armv5tel-unknown-linux-gnuea bi/libstdc++-v3/include -I/home/ramana/trunk/libstdc++-v3/libsupc++ -iprefix /home/ramana/build-20090505/gcc/../lib/gcc/armv5tel-unknown-linux-gnueabi/4.5.0/ -isystem /home/ramana/build-20090505/./gcc/include -isystem /home/ramana/build-20090505/./gcc/include-fixed -DHAVE_CONFIG_H -DIN_GLIBCPP_V3 -DPIC -isystem /usr/local/armv5tel-unknown-linux-gnueabi/include -isystem /usr/local/armv5tel-unknown-linux-gnueabi/sys-include cp-demangle.c -quiet -dumpbase cp-demangle.c -auxbase-strip cp-demangle.o -g -O2 -Wno-error -version -fPIC -o /tmp/ccIO2OGk.s (gdb) r Starting program: /home/ramana/build-20090505/gcc/cc1 -quiet -v -I.. -I/home/ramana/trunk/libstdc++-v3/../libiberty -I/home/ramana/trunk/libstdc++-v3/../include -I/home/ramana/build-20090505/armv5tel-unknown-linux-gnueabi/libstdc++-v3/include/armv5tel-unknown-linux-gnueabi -I/home/ramana/build-20090505/armv5tel-unknown-linux-gnueabi/libstdc++-v3/include -I/home/ramana/trunk/libstdc++-v3/libsupc++ -iprefix /home/ramana/build-20090505/gcc/../lib/gcc/armv5tel-unknown-linux-gnueabi/4.5.0/ -isystem /home/ramana/build-20090505/./gcc/include -isystem /home/ramana/build-20090505/./gcc/include-fixed -DHAVE_CONFIG_H -DIN_GLIBCPP_V3 -DPIC -isystem /usr/local/armv5tel-unknown-linux-gnueabi/include -isystem /usr/local/armv5tel-unknown-linux-gnueabi/sys-include cp-demangle.c -quiet -dumpbase cp-demangle.c -auxbase-strip cp-demangle.o -g -O2 -Wno-error -version -fPIC -o /tmp/ccIO2OGk.s GNU C (GCC) version 4.5.0 20090505 (experimental) [trunk revision 147121] (armv5tel-unknown-linux-gnueabi) compiled by GNU C version 4.5.0 20090505 (experimental) [trunk revision 147121], GMP version 4.2.4, MPFR version 2.3.2. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Program received signal SIGSEGV, Segmentation fault. emit_insn_after_1 (first=0x403790f0, after=0x40588f50, bb=0xa5a5a5a5) at ../../trunk/gcc/emit-rtl.c:4129 4129 if (BB_END (bb) == after) (gdb) bt #0 emit_insn_after_1 (first=0x403790f0, after=0x40588f50, bb=0xa5a5a5a5) at ../../trunk/gcc/emit-rtl.c:4129 #1 0x0053cc60 in legitimize_pic_address (orig=0x40595b80, mode=<value optimized out>, reg=0x0) at ../../trunk/gcc/config/arm/arm.c:3600 #2 0x00602060 in gen_movsi (operand0=0x0, operand1=<value optimized out>) at ../../trunk/gcc/config/arm/arm.md:4966 #3 0x001e72c0 in emit_move_insn_1 (x=0x40706d38, y=0x40595b80) at ../../trunk/gcc/expr.c:3337 #4 0x001e756c in emit_move_insn (x=0x40706d38, y=0x40595b80) at ../../trunk/gcc/expr.c:3425 #5 0x001c3a60 in force_reg (mode=SImode, x=0x40595b80) at ../../trunk/gcc/explow.c:663 #6 0x001c4a90 in use_anchored_address (x=0x403d8350) at ../../trunk/gcc/explow.c:583 #7 0x001dd558 in expand_expr_real_1 (exp=0x404a8b40, target=<value optimized out>, tmode=<value optimized out>, modifier=<value optimized out>, alt_rtl=0x0) at ../../trunk/gcc/expr.c:7329 #8 0x001e6110 in expand_expr_real (exp=0x404a8b40, target=0x40588f50, tmode=VOIDmode, modifier=EXPAND_WRITE, alt_rtl=0x0) at ../../trunk/gcc/expr.c:7114 #9 0x001ea070 in expand_expr_addr_expr_1 (exp=0x404a8b40, target=0x0, tmode=SImode, modifier=EXPAND_NORMAL) at ../../trunk/gcc/expr.h:539 #10 0x001e9e14 in expand_expr_addr_expr_1 (exp=0x405fb690, target=0x40706630, tmode=SImode, modifier=EXPAND_NORMAL) at ../../trunk/gcc/expr.c:6838 #11 0x001db5d4 in expand_expr_real_1 (exp=0x405c1fc0, target=0x40706630, tmode=<value optimized out>, modifier=<value optimized out>, alt_rtl=0x0) at ../../trunk/gcc/expr.c:6897 #12 0x001e6110 in expand_expr_real (exp=0x405c1fc0, target=0x40588f50, tmode=VOIDmode, modifier=EXPAND_WRITE, alt_rtl=0x0) at ../../trunk/gcc/expr.c:7114 #13 0x0072be90 in eliminate_phi (e=0x405fb900, g=0xa39f08) at ../../trunk/gcc/expr.h:539 #14 0x0072cb6c in expand_phi_nodes (sa=<value optimized out>) at ../../trunk/gcc/tree-outof-ssa.c:777 #15 0x006b4800 in gimple_expand_cfg () at ../../trunk/gcc/cfgexpand.c:2506 #16 0x002fcdf0 in execute_one_pass (pass=0x95dcfc) at ../../trunk/gcc/passes.c:1291 #17 0x002fd07c in execute_pass_list (pass=0x95dcfc) at ../../trunk/gcc/passes.c:1340 #18 0x003fa1e0 in tree_rest_of_compilation (fndecl=0x403cc580) at ../../trunk/gcc/tree-optimize.c:394 #19 0x0054e584 in cgraph_expand_function (node=0x4047cf00) at ../../trunk/gcc/cgraphunit.c:1051 #20 0x0055059c in cgraph_optimize () at ../../trunk/gcc/cgraphunit.c:1110 #21 0x0008ba4c in c_write_global_declarations () at ../../trunk/gcc/c-decl.c:8364 #22 0x003a7384 in toplev_main (argc=1073882620, argv=0x400cf804) at ../../trunk/gcc/toplev.c:990 #23 0x400e0e2c in __libc_start_main () from /lib/libc.so.6 #24 0x0007a428 in _start () -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40031