From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7871) id D4E513856974; Thu, 14 Sep 2023 12:45:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4E513856974 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694695524; bh=oqTCr7PTj8DatA46wX8Tk3RrIqDQ9Vsp5OT8JixNNiw=; h=From:To:Subject:Date:From; b=YRqNQ+4ZG91S4JGzn1ho5Fai7wT3vJPAkPg2l9rXT7qG5KzjHWmjxyo5fh+sZif0J s/BJQftYeLQhkZH553APUvvRJZGH4moabnafLSeCz2KZa93xzz9v0USNxzvK7wO91v +MVK+qtO70AOH2yR4ZfTL3enElEl2sfvwqztGGMw= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marc Poulhi?s To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-3987] ada: Assertion failure on calculation of Large_Max_Size_Mutable X-Act-Checkin: gcc X-Git-Author: Javier Miranda X-Git-Refname: refs/heads/master X-Git-Oldrev: 1f68777549eb0104267bebaa1b94d173e1656d01 X-Git-Newrev: 61231464d7a0c36ff80e2e2aea2c2d512420f494 Message-Id: <20230914124524.D4E513856974@sourceware.org> Date: Thu, 14 Sep 2023 12:45:24 +0000 (GMT) List-Id: https://gcc.gnu.org/g:61231464d7a0c36ff80e2e2aea2c2d512420f494 commit r14-3987-g61231464d7a0c36ff80e2e2aea2c2d512420f494 Author: Javier Miranda Date: Mon Aug 28 19:14:39 2023 +0000 ada: Assertion failure on calculation of Large_Max_Size_Mutable gcc/ada/ * sem_util.adb (Large_Max_Size_Mutable): Protect access to attribute Is_Array_Type. Diff: --- gcc/ada/sem_util.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 3229f4e9dd2..cc9dcb30b18 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -22580,7 +22580,9 @@ package body Sem_Util is Ityp : Entity_Id; begin - if Is_Array_Type (Comp_Type) then + if Present (Comp_Type) + and then Is_Array_Type (Comp_Type) + then Indx := First_Index (Comp_Type); while Present (Indx) loop