[Ada] Presence of abstract operator function causes resolution problems
authorGary Dismukes <dismukes@adacore.com>
Fri, 2 Jul 2021 20:51:31 +0000 (16:51 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 21 Sep 2021 15:24:57 +0000 (15:24 +0000)
gcc/ada/

* sem_ch4.adb (Remove_Abstract_Operations): Add condition to
test for an E_Operator as part of criteria for setting
Abstract_Op on interpretations involving predefined operators.

gcc/ada/sem_ch4.adb

index 1f1f5aa..543ba12 100644 (file)
@@ -8029,6 +8029,7 @@ package body Sem_Ch4 is
                while Present (It.Nam) loop
                   if Is_Numeric_Type (It.Typ)
                     and then Scope (It.Typ) = Standard_Standard
+                    and then Ekind (It.Nam) = E_Operator
                   then
                      Set_Abstract_Op (I, Abstract_Op);
                   end if;