]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix condition in op interpretation resolution
authorGhjuvan Lacambre <lacambre@adacore.com>
Wed, 23 Jun 2021 17:30:40 +0000 (19:30 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 20 Sep 2021 12:31:31 +0000 (12:31 +0000)
gcc/ada/

* sem_ch4.adb (Finc_Non_Universal_Interpretations): Fix check.

gcc/ada/sem_ch4.adb

index 553e194a0b5901a92e52c7e0f104599af6985a05..1f1f5aaee61d0dafe921199054215fd96e176750 100644 (file)
@@ -6626,7 +6626,7 @@ package body Sem_Ch4 is
                Get_Next_Interp (Index, It);
             end loop;
          end if;
-      elsif Has_Compatible_Type (R, T1) then
+      elsif Has_Compatible_Type (R, T1) or else Covers (Etype (R), T1) then
          Add_One_Interp (N, Op_Id, Standard_Boolean, Base_Type (T1));
       end if;
    end Find_Non_Universal_Interpretations;