[Bug tree-optimization/124692] ICE on valid code at -O3 on x86_64-linux-gnu: tree check: expected ssa_name, have integer_cst in expand_simple_operations, at tree-ssa-loop-niter.cc:2885
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 30 12:27:34 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124692
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
fold_stmt ends up walking SSA operands of the stmt - that's a bit corner-case,
stmts may not be up-to-date (and that's what is happening here). It's only
valid to follow SSA use->def chains, but range_of_expr will happily throw up
full ranger eventually ending in niter code which walks such.
Now, forwprop substitutes and then calls update_stmt before folding, so
that is what I'm going to do for replace_uses_by.
More information about the Gcc-bugs
mailing list