https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120560

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <[email protected]>:

https://gcc.gnu.org/g:1e13fb44f1474b7d57e7144d3fff38e9c769b92d

commit r16-4161-g1e13fb44f1474b7d57e7144d3fff38e9c769b92d
Author: Andrew MacLeod <[email protected]>
Date:   Tue Sep 30 15:59:38 2025 -0400

    Fix off by one in range_from_loop_direction.

    When bounds_of_var_in_loop was converted to range_from_loop_direction,
    the final check returned FALSE when the beginning and end bounds were
    the same...  The new code was using wi::gt_p, when it should have been
    wi::ge_p when checking for the fail condition.

            PR tree-optimization/120560
            gcc/
            * vr-values.cc (range_from_loop_direction): Use wi::ge_p rather
            than wi::gt_p.

            gcc/testsuite/
            * gcc.dg/pr120560.c: New.

Reply via email to