gdb cc1 r ~/bits.i -O2 Starting program: /home/marcus/projects/gcc/BIN/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/cc1 ~/bits.i -O2 f Analyzing compilation unitPerforming intraprocedural optimizations Assembling functions: f Program received signal SIGSEGV, Segmentation fault. is_gimple_variable (t=0x0) at /home/marcus/projects/gcc/gcc/tree-gimple.c:239 239 return (TREE_CODE (t) == VAR_DECL (gdb) bt #0 is_gimple_variable (t=0x0) at /home/marcus/projects/gcc/gcc/tree-gimple.c:239 #1 0x00000000004840b9 in is_gimple_val (t=0x0) at /home/marcus/projects/gcc/gcc/tree-gimple.c:366 #2 0x000000000048a3b0 in force_gimple_operand (expr=0x0, stmts=0x7fffffffd4e8, simple=0 '\0', var=0x2aaaaadf15a0) at /home/marcus/projects/gcc/gcc/gimplify.c:4929 #3 0x00000000004efc2d in rewrite_use_nonlinear_expr (data=0x7fffffffd6e0, use=0xbf5300, cand=<value optimized out>) at /home/marcus/projects/gcc/gcc/tree-ssa-loop-ivopts.c:5377 #4 0x00000000004f49e4 in rewrite_uses (data=0x7fffffffd6e0) at /home/marcus/projects/gcc/gcc/tree-ssa-loop-ivopts.c:5736 #5 0x00000000004f6117 in tree_ssa_iv_optimize (loops=0xbd78d0) at /home/marcus/projects/gcc/gcc/tree-ssa-loop-ivopts.c:5960
Created attachment 9761 [details] bits.i gcc -c -O2 bits.i
get_computation (data->current_loop, use, cand); returns NULL and we happily apply force_gimple_operand to it. Bad. Zdenek, can you investigate? Thx.
A dup, actually. *** This bug has been marked as a duplicate of 22438 ***