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

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

https://gcc.gnu.org/g:77fa9a584eb59ff1ec686e03e1fc353630cc4c80

commit r17-6041-g77fa9a584eb59ff1ec686e03e1fc353630cc4c80
Author: Andrea Boido <[email protected]>
Date:   Thu Nov 5 13:36:22 2026 +0000

    Ada: Fix membership test with universal_real tested expression

    This changes the special resolution of membership tests whose tested
    expression is of a universal numeric type, which skips the rounding to
    the tested type required by RM 4.9(38) for universal_real.  The special
    resolution is now restricted to universal_integer, since the range check
    failure it avoids cannot occur for real types in practice.

    gcc/ada/
            PR ada/128457
            * sem_res.adb (Resolve_Membership_Op): Only perform the special
            resolution if the left operand is of type universal_integer and
            the right operand is of a smaller integer type.

    gcc/testsuite/
            * gnat.dg/membership_real1.adb: New test.

Reply via email to