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

--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:65e5547e5468ce404d0f9ebd646a1d63abf3a772

commit r12-10458-g65e5547e5468ce404d0f9ebd646a1d63abf3a772
Author: Richard Biener <rguent...@suse.de>
Date:   Wed Jan 31 14:40:24 2024 +0100

    middle-end/110176 - wrong zext (bool) <= (int) 4294967295u folding

    The following fixes a wrong pattern that didn't match the behavior
    of the original fold_widened_comparison in that get_unwidened
    returned a constant always in the wider type.  But here we're
    using (int) 4294967295u without the conversion applied.  Fixed
    by doing as earlier in the pattern - matching constants only
    if the conversion was actually applied.

            PR middle-end/110176
            * match.pd (zext (bool) <= (int) 4294967295u): Make sure
            to match INTEGER_CST only without outstanding conversion.

            * gcc.dg/torture/pr110176.c: New testcase.

    (cherry picked from commit 22dbfbe8767ff4c1d93e39f68ec7c2d5b1358beb)

Reply via email to