https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100349
--- Comment #5 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:ce81282261c6c77883b17d0ebfbbe337bed76457 commit r12-842-gce81282261c6c77883b17d0ebfbbe337bed76457 Author: Aldy Hernandez <al...@redhat.com> Date: Thu May 13 16:09:58 2021 -0400 Bail in bounds_of_var_in_loop if scev returns NULL. Both initial_condition_in_loop_num and evolution_part_in_loop_num can return NULL. This patch exits if either one is NULL. Presumably this didn't happen before, because adjust_range_with_scev was called far less frequently than in ranger, which can call it for every PHI. gcc/ChangeLog: PR tree-optimization/100349 * vr-values.c (bounds_of_var_in_loop): Bail if scev returns NULL. gcc/testsuite/ChangeLog: * gcc.dg/pr100349.c: New test.