https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97501
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Aldy Hernandez <al...@gcc.gnu.org>: https://gcc.gnu.org/g:5d53ec27015b916640171e891870adf2c6fdfd4c commit r11-4129-g5d53ec27015b916640171e891870adf2c6fdfd4c Author: Aldy Hernandez <al...@redhat.com> Date: Tue Oct 20 15:25:20 2020 +0200 Saturate overflows return from SCEV in ranger. bounds_of_var_in_loop is returning an overflowed int, which is causing us to create a range for which we can't compare the bounds causing an ICE in verify_range. Overflowed bounds cause compare_values() to return -2, which we don't handle in verify_range. We don't represent overflowed ranges in irange, so this patch just saturates any overflowed end-points to MIN or MAX. gcc/ChangeLog: PR tree-optimization/97501 * gimple-range.cc (gimple_ranger::range_of_ssa_name_with_loop_info): Saturate overflows returned from SCEV. gcc/testsuite/ChangeLog: * gcc.dg/pr97501.c: New test.