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

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

https://gcc.gnu.org/g:35b4c01575e15550b49c82fe146b2669db6320a7

commit r17-4920-g35b4c01575e15550b49c82fe146b2669db6320a7
Author: Richard Biener <[email protected]>
Date:   Mon Sep 28 15:44:47 2026 +0200

    Do not treat COMPCODE_FALSE or COMPCODE_TRUE as trapping in
combine_comparisons

    In combine_comparisons, under flag_trapping_math, we check whether the
combined
    comparison traps under the same conditions as the input comparisons:

      bool trap = (compcode & COMPCODE_UNORD) == 0
                  && (compcode != COMPCODE_EQ)
                  && (compcode != COMPCODE_ORD);

    When compcode is COMPCODE_FALSE or COMPCODE_TRUE trap is computed as true,
    and combine_comparisons errorneously eliminates IEEE exceptions.

            PR tree-optimization/53805
            * fold-const.cc (combine_comparisons): Do not treat COMPCODE_FALSE
            or COMPCODE_TRUE as trapping.

            * gcc.dg/tree-ssa/fp-trapping-and-1.c: New testcase.

Reply via email to