https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97628
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- With the SSA_NAME_RANGE_INFO (i.e. when not using the GCC11+ ranger in the pass or when it is done inside of the vrp passes) it matters whether there is some SSA_NAME to stick the range to, the testcase doesn't modify the num in any way in that if block so there is nothing to stick the [0, 9] range at. Surprises me it isn't just VARYING though (then the warning wouldn't trigger, right?).