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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:713f2fd923442b1be620a44240ddf786ae0ab476

commit r13-1174-g713f2fd923442b1be620a44240ddf786ae0ab476
Author: Richard Biener <rguent...@suse.de>
Date:   Mon Jun 20 13:40:50 2022 +0200

    middle-end/106027 - fix types in needle folding

    The fold_to_nonsharp_ineq_using_bound folding ends up creating invalid
    typed IL which confuses later foldings.  The following fixes that.

    2022-06-20  Richard Biener  <rguent...@suse.de>

            PR middle-end/106027
            * fold-const.cc (fold_to_nonsharp_ineq_using_bound): Use the
            type of the prevailing comparison for the new comparison type.
            (fold_binary_loc): Use proper types for the A < X && A + 1 > Y
            to A < X && A >= Y folding.

            * gcc.dg/pr106027.c: New testcase.

Reply via email to