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

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

https://gcc.gnu.org/g:84b713589646c63b38ec55352fb87c1e80b69b66

commit r13-9169-g84b713589646c63b38ec55352fb87c1e80b69b66
Author: Andrew MacLeod <amacl...@redhat.com>
Date:   Mon Nov 4 10:02:35 2024 -0500

    Don't call invert on VARYING.

    When all cases go to one label and resul in a VARYING value, we can't
    invert that value to remove all values from the default case. Simply
    check for this case and set the default to UNDEFINED.

            PR tree-optimization/117398
            gcc/
            * gimple-range-edge.cc (gimple_outgoing_range::calc_switch_ranges):
            Check for VARYING and don't call invert () on it.

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

Reply via email to