From cbf1ffe1252430f0db0db18b0b695799bb31c242 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Thu, 15 Jul 2021 14:31:29 +0200 Subject: [Ada] Fix access to predicated parent in Itype gcc/ada/ * sem_ch13.adb (Build_Predicate_Functions): Access Predicated_Parent only on subtypes. --- gcc/ada/sem_ch13.adb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc') diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 8cb3b42..2a5e86d 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -10191,6 +10191,9 @@ package body Sem_Ch13 is or else (Is_Itype (Typ) and then not Comes_From_Source (Typ) + and then Ekind (Typ) in E_Array_Subtype + | E_Record_Subtype + | E_Record_Subtype_With_Private and then Present (Predicated_Parent (Typ))) then return; -- cgit v1.1