From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id C5138385841E; Wed, 22 Sep 2021 15:10:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5138385841E MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3805] [Ada] Fix access to predicated parent in Itype X-Act-Checkin: gcc X-Git-Author: Yannick Moy X-Git-Refname: refs/heads/master X-Git-Oldrev: 326b74705c26a52226bc737cc94be584dd2505e1 X-Git-Newrev: cbf1ffe1252430f0db0db18b0b695799bb31c242 Message-Id: <20210922151044.C5138385841E@sourceware.org> Date: Wed, 22 Sep 2021 15:10:44 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2021 15:10:44 -0000 https://gcc.gnu.org/g:cbf1ffe1252430f0db0db18b0b695799bb31c242 commit r12-3805-gcbf1ffe1252430f0db0db18b0b695799bb31c242 Author: Yannick Moy Date: Thu Jul 15 14:31:29 2021 +0200 [Ada] Fix access to predicated parent in Itype gcc/ada/ * sem_ch13.adb (Build_Predicate_Functions): Access Predicated_Parent only on subtypes. Diff: --- gcc/ada/sem_ch13.adb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 8cb3b425db9..2a5e86d929c 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;