From: Yannick Moy Date: Thu, 15 Jul 2021 12:31:29 +0000 (+0200) Subject: [Ada] Fix access to predicated parent in Itype X-Git-Tag: basepoints/gcc-13~4508 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbf1ffe1252430f0db0db18b0b695799bb31c242;p=thirdparty%2Fgcc.git [Ada] Fix access to predicated parent in Itype gcc/ada/ * sem_ch13.adb (Build_Predicate_Functions): Access Predicated_Parent only on subtypes. --- diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 8cb3b425db9d..2a5e86d929cd 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;