diff options
author | Javier Miranda <miranda@adacore.com> | 2023-08-28 19:14:39 +0000 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-09-14 14:42:39 +0200 |
commit | 61231464d7a0c36ff80e2e2aea2c2d512420f494 (patch) | |
tree | 4426c979254f09e690964eaaeb7c48f391aa4cd8 | |
parent | 1f68777549eb0104267bebaa1b94d173e1656d01 (diff) | |
download | gcc-61231464d7a0c36ff80e2e2aea2c2d512420f494.zip gcc-61231464d7a0c36ff80e2e2aea2c2d512420f494.tar.gz gcc-61231464d7a0c36ff80e2e2aea2c2d512420f494.tar.bz2 |
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.
-rw-r--r-- | gcc/ada/sem_util.adb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |