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

--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Andrew Macleod
<amacl...@gcc.gnu.org>:

https://gcc.gnu.org/g:9dccaeaa586a1634e1f6a0f4c51806f3c3aea63b

commit r12-9091-g9dccaeaa586a1634e1f6a0f4c51806f3c3aea63b
Author: Andrew MacLeod <amacl...@redhat.com>
Date:   Mon Jan 30 14:59:30 2023 -0500

    Correctly detect shifts out of range

    get_shift_range was incorrectly communicating that it couldn't calculate
    a range when the shift values was always out fo range.  Fix this and
    alwasy return [0, 0] when the shift value is always out of range.

            PR tree-optimization/108306
            gcc/
            * range-op.cc (operator_lshift::fold_range): Return [0, 0] not
            varying for shifts that are always out of void range.
            (operator_rshift::fold_range): Return [0, 0] not
            varying for shifts that are always out of void range.

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

Reply via email to