From 61231464d7a0c36ff80e2e2aea2c2d512420f494 Mon Sep 17 00:00:00 2001 From: Javier Miranda Date: Mon, 28 Aug 2023 19:14:39 +0000 Subject: 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. --- gcc/ada/sem_util.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 3229f4e..cc9dcb3 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 -- cgit v1.1