From e269fedf8c150f26e7651c0093ce02bef11ed5d6 Mon Sep 17 00:00:00 2001 From: Steve Baird Date: Thu, 1 Oct 2020 16:56:50 -0700 Subject: [PATCH] [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 => ... ; ). --- gcc/ada/sem_ch13.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 := -- 2.30.2