diff options
author | Yannick Moy <moy@adacore.com> | 2021-05-26 14:54:02 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-07-08 13:34:19 +0000 |
commit | 6cb2bcba3f31c6ec93fe76ff5e0f67db43556ef7 (patch) | |
tree | a1ffc9934c0966297ba82e0dd85d7b77b60672be /gcc/ada/layout.adb | |
parent | cd4341ef953bc5697917b3e6e43c59be03da0bee (diff) | |
download | gcc-6cb2bcba3f31c6ec93fe76ff5e0f67db43556ef7.zip gcc-6cb2bcba3f31c6ec93fe76ff5e0f67db43556ef7.tar.gz gcc-6cb2bcba3f31c6ec93fe76ff5e0f67db43556ef7.tar.bz2 |
[Ada] Skip types in error for test to compute array size
gcc/ada/
* layout.adb (Layout_Type): Do not call Number_Dimensions if the
type does not have First_Index set.
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r-- | gcc/ada/layout.adb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index ee8e281..de73193 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -498,6 +498,7 @@ package body Layout is -- in GNAT, i.e. when Packed_Array_Impl_Type is set. if Is_Array_Type (E) + and then Present (First_Index (E)) -- Skip types in error and then Number_Dimensions (E) = 1 and then not Present (Packed_Array_Impl_Type (E)) and then Has_Pragma_Pack (E) |