From: Steve Baird Date: Thu, 1 Oct 2020 23:56:50 +0000 (-0700) Subject: [Ada] Fix String_Literal aspect spec checking problem for scalars. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e269fedf8c150f26e7651c0093ce02bef11ed5d6;p=gcc.git [Ada] Fix String_Literal aspect spec checking problem for scalars. gcc/ada/ * sem_ch13.adb (Validate_Literal_Aspect): Call to Base_Type needed in order to correctly check result type of String_Literal function when the first named subtype differs from the base type (e.g.: type T is range 1 .. 10 with String_Literal => ... ; ). --- diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 70130945ce1..d8967dd5f7d 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -16228,7 +16228,7 @@ package body Sem_Ch13 is Is_Match := False; if Ekind (It.Nam) = E_Function - and then Base_Type (Etype (It.Nam)) = Typ + and then Base_Type (Etype (It.Nam)) = Base_Type (Typ) then declare Params : constant List_Id :=