[Bug tree-optimization/125602] [17 Regression] ICE at -O2 -fsanitize=undefined during GIMPLE pass: evrp
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 5 09:00:00 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125602
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:435ff0c5dff136eef427872991398ee09739fa3b
commit r17-1369-g435ff0c5dff136eef427872991398ee09739fa3b
Author: Richard Biener <rguenther@suse.de>
Date: Fri Jun 5 09:56:09 2026 +0200
tree-optimization/125602 - avoid negating the most negative signed value
The following rewrites another case in niter analysis where we might
end up using fold to negate the most negative signed value and expect
that to be an INTEGER_CST. Like elsewhere we should swap negation
and conversion to niter_type with the speciality that the affected
path creates an assumption check in the original type. But for
its construction we can avoid the negation.
PR tree-optimization/125602
* tree-ssa-loop-niter.cc (number_of_iterations_until_wrap):
Avoid double negation for assumption condition. Compute
negated step in niter_type.
* gcc.dg/torture/pr125602.c: New testcase.
More information about the Gcc-bugs
mailing list