As of LAST_UPDATED Tue Jun 28 05:54:07 UTC 2005 on x86_64-linux:
...
../../xgcc -B../../ -c -g -O2 -fPIC -W -Wall -gnatpg a-strfix.adb -o
a-strfix.o
raised STORAGE_ERROR : stack overflow (or erroneous memory access)
make[7]: *** [a-strfix.o] Error 1
make[7]: Leaving directory
`/home/guerby/work/gcc/build/build-20050628T075528/gcc/ada/rts'
make[6]: *** [gnatlib] Error 2
(gdb) r -quiet -dumpbase a-strfix.adb -O2 -W -Wall -fPIC -g -gnatpg -mtune=k8
-gnatO a-strfix.o a-strfix.adb -o /tmp/ccm3U70P.s
Starting program: /home/guerby/work/gcc/build/build-20050628T075528/gcc/gnat1
-quiet -dumpbase a-strfix.adb -O2 -W -Wall -fPIC -g -gnatpg -mtune=k8 -gnatO
a-strfix.o a-strfix.adb -o /tmp/ccm3U70P.s
Program received signal SIGSEGV, Segmentation fault.
is_gimple_variable (t=0x0) at
/home/guerby/work/gcc/version-head/gcc/tree-gimple.c:239
239 return (TREE_CODE (t) == VAR_DECL
(gdb) bt
#0 is_gimple_variable (t=0x0) at
/home/guerby/work/gcc/version-head/gcc/tree-gimple.c:239
#1 0x000000000064b4b9 in is_gimple_val (t=0x0) at
/home/guerby/work/gcc/version-head/gcc/tree-gimple.c:357
#2 0x0000000000652b80 in force_gimple_operand (expr=0x0, stmts=0x7fbffff378,
simple=0 '\0', var=0x2a960ee340)
at /home/guerby/work/gcc/version-head/gcc/gimplify.c:4843
#3 0x00000000006d947d in rewrite_use_nonlinear_expr (data=0x7fbffff5c0,
use=0x1361e10, cand=Variable "cand" is not available.
)
at /home/guerby/work/gcc/version-head/gcc/tree-ssa-loop-ivopts.c:5359
#4 0x00000000006dccce in rewrite_uses (data=0x7fbffff5c0) at
/home/guerby/work/gcc/version-head/gcc/tree-ssa-loop-ivopts.c:5711
#5 0x00000000006de53e in tree_ssa_iv_optimize_loop (data=0x7fbffff5c0,
loop=Variable "loop" is not available.
) at /home/guerby/work/gcc/version-head/gcc/tree-ssa-loop-ivopts.c:5935
#6 0x00000000006debb5 in tree_ssa_iv_optimize (loops=0x1294970) at
/home/guerby/work/gcc/version-head/gcc/tree-ssa-loop-ivopts.c:5972
#7 0x0000000000649e56 in execute_one_pass (pass=0xcb0320) at
/home/guerby/work/gcc/version-head/gcc/tree-optimize.c:714
#8 0x0000000000649fac in execute_pass_list (pass=0xcb0320) at
/home/guerby/work/gcc/version-head/gcc/tree-optimize.c:751
#9 0x0000000000649fbe in execute_pass_list (pass=0xcaff60) at
/home/guerby/work/gcc/version-head/gcc/tree-optimize.c:752
#10 0x0000000000649fbe in execute_pass_list (pass=0xcaa1a0) at
/home/guerby/work/gcc/version-head/gcc/tree-optimize.c:752
#11 0x000000000064a235 in tree_rest_of_compilation (fndecl=0x2a95a7a410) at
/home/guerby/work/gcc/version-head/gcc/tree-optimize.c:914
#12 0x00000000009939c6 in cgraph_expand_function (node=0x2a95df6c30) at
/home/guerby/work/gcc/version-head/gcc/cgraphunit.c:1033
#13 0x0000000000995966 in cgraph_optimize () at
/home/guerby/work/gcc/version-head/gcc/cgraphunit.c:1099
#14 0x000000000041b44a in gnat_parse_file (set_yydebug=Variable "set_yydebug" is
not available.
) at /home/guerby/work/gcc/version-head/gcc/ada/misc.c:245
#15 0x0000000000922633 in toplev_main (argc=Variable "argc" is not available.
) at /home/guerby/work/gcc/version-head/gcc/toplev.c:966
#16 0x0000002a957963c1 in __libc_start_main () from /lib/libc.so.6
#17 0x0000000000402d2a in _start () at ../sysdeps/x86_64/elf/start.S:96
Works at -O0, fails at -O1 and -O2.
It also works on x86-linux.
--
Summary: SEGV in is_gimple_variable during loop-ivopts while
building Ada RTS
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, build
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: laurent at guerby dot net
CC: gcc-bugs at gcc dot gnu dot org,rakdver at atrey dot
karlin dot mff dot cuni dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22212