https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124891
--- Comment #3 from Andrew Macleod <amacleod at redhat dot com> --- heh, your comment jives with what Im seeing: Im seeing it trap in lversion on: Folding statement: _51 = x_20(D) - z_55; (gdb) frame 3 #3 0x0000000001cc9ef8 in expand_simple_operations (expr=0x7fffe9c17268, stop=0x0, cache=...) at /gcc/master/gcc/gcc/tree-ssa-loop-niter.cc:2885 2885 if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (e)) (gdb) l 2880 2881 /* Avoid expanding to expressions that contain SSA names that need 2882 to take part in abnormal coalescing. */ 2883 ssa_op_iter iter; 2884 FOR_EACH_SSA_TREE_OPERAND (e, stmt, iter, SSA_OP_USE) 2885 if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (e)) 2886 return expr; (gdb) p e $1 = (tree) 0x7fffe9e1f318 (gdb) p print_generic_expr (stderr, e, 0) 1 (gdb) p print_gimple_stmt (stderr, stmt, 0,0) _51 = 1 - z_55; So it looks like the first operand has been rewritten from x_20(D) to a 1 in the statement, but the operands have not been updated yet... or the FOR_EACH would not have returns a non-ssa name
