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

--- Comment #6 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:85d7cf8cf72816e439252d5a9be9a0cbe1deac21

commit r17-5246-g85d7cf8cf72816e439252d5a9be9a0cbe1deac21
Author: Eric Botcazou <[email protected]>
Date:   Fri Oct 16 11:45:20 2026 +0200

    Ada: Fix inconsistent resolution of operator for nonlocal subtype of
Integer

    The problem is that the predefined operators for the type of the subtype
are
    correctly invisible when they are the only candidate interpretations in the
    overload resolution of an operation involving only integer literals, but
are
    incorrectly visible when there are several candidate interpretations, thus
    leading to spurious ambiguities.

    gcc/ada/
            PR ada/126321
            * sem_type.adb (Has_Compatible_Type): Remove code redundant with
            the Covers routine, and deal specially with operations whose result
            is of an universal numeric type when they are overloaded.

    gcc/testsuite/
            * gnat.dg/test_rational_arithmetic2.adb: New test.
            * gnat.dg/rational_arithmetic2.ads: New helper package.
            * gnat.dg/invisible.ads: Likewise.
  • [Bug ada/126321] inconsistent r... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to