From: Ghjuvan Lacambre Date: Fri, 18 Jun 2021 15:18:41 +0000 (+0200) Subject: [Ada] Only assign type to op if compatible X-Git-Tag: basepoints/gcc-13~4621 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f5356c4bfeb42fcab6e2681709a386abf2c0ba1;p=thirdparty%2Fgcc.git [Ada] Only assign type to op if compatible gcc/ada/ * sem_ch4.adb (Find_Non_Universal_Interpretations): Check if types are compatible before adding interpretation. --- diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index c052022886ad..553e194a0b59 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -6626,7 +6626,7 @@ package body Sem_Ch4 is Get_Next_Interp (Index, It); end loop; end if; - else + elsif Has_Compatible_Type (R, T1) then Add_One_Interp (N, Op_Id, Standard_Boolean, Base_Type (T1)); end if; end Find_Non_Universal_Interpretations;