aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2020-10-01 16:56:50 -0700
committerPierre-Marie de Rodat <derodat@adacore.com>2020-11-24 05:16:01 -0500
commite269fedf8c150f26e7651c0093ce02bef11ed5d6 (patch)
tree92ebab28c8a60f1cc5379800ebe3ecdedf4304d0 /gcc
parent91592d05cd924351d99ca8dd8f01df77d74170d9 (diff)
downloadgcc-e269fedf8c150f26e7651c0093ce02bef11ed5d6.zip
gcc-e269fedf8c150f26e7651c0093ce02bef11ed5d6.tar.gz
gcc-e269fedf8c150f26e7651c0093ce02bef11ed5d6.tar.bz2
[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 => ... ; ).
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch13.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 7013094..d8967dd 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 :=