]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix inverted implementation of RM 8.4(10) clause for operators
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 9 May 2023 22:05:55 +0000 (00:05 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 15 Jun 2023 07:59:34 +0000 (09:59 +0200)
The comment is correct but the code implements the opposite outcome.

gcc/ada/

* sem_type.adb (Disambiguate): Fix pasto in the implementation of
the RM 8.4(10) clause for operators.

gcc/ada/sem_type.adb

index d4006e4270bb888c286d3a39fb43ff9801fa0fed..8519b97fa4128306f08fc4a51624f39956eaad0d 100644 (file)
@@ -2229,7 +2229,7 @@ package body Sem_Type is
                 Is_Immediately_Visible (Base_Type (Etype (Right_Opnd (N))))
               and then Is_Potentially_Use_Visible (User_Subp)
             then
-               if It2.Nam = Predef_Subp then
+               if It1.Nam = Predef_Subp then
                   return It1;
                else
                   return It2;