diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-01-04 13:39:45 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-11 13:24:47 +0000 |
commit | 4217466a87672372ec0d5e0affafd33c06a35574 (patch) | |
tree | b1d8c8d2e7bc59013f96d54bd3205d1998566709 | |
parent | a8d89c45f8731686842f888f52494107bc410007 (diff) | |
download | gcc-4217466a87672372ec0d5e0affafd33c06a35574.zip gcc-4217466a87672372ec0d5e0affafd33c06a35574.tar.gz gcc-4217466a87672372ec0d5e0affafd33c06a35574.tar.bz2 |
[Ada] Fix incomplete debug info for derived packed array type
gcc/ada/
* sem_ch3.adb (Analyze_Subtype_Declaration): In the case of an array
copy Packed_Array_Impl_Type manually here.
(Copy_Array_Subtype_Attributes): Do not copy it here.
-rw-r--r-- | gcc/ada/sem_ch3.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 06b8cc4..2e207c1 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -5512,6 +5512,7 @@ package body Sem_Ch3 is when Array_Kind => Mutate_Ekind (Id, E_Array_Subtype); Copy_Array_Subtype_Attributes (Id, T); + Set_Packed_Array_Impl_Type (Id, Packed_Array_Impl_Type (T)); when Decimal_Fixed_Point_Kind => Mutate_Ekind (Id, E_Decimal_Fixed_Point_Subtype); @@ -14972,6 +14973,9 @@ package body Sem_Ch3 is -- Copy_Array_Subtype_Attributes -- ----------------------------------- + -- Note that we used to copy Packed_Array_Impl_Type too here, but we now + -- let it be recreated during freezing for the sake of better debug info. + procedure Copy_Array_Subtype_Attributes (T1, T2 : Entity_Id) is begin Set_Size_Info (T1, T2); @@ -14989,7 +14993,6 @@ package body Sem_Ch3 is Set_Convention (T1, Convention (T2)); Set_Is_Limited_Composite (T1, Is_Limited_Composite (T2)); Set_Is_Private_Composite (T1, Is_Private_Composite (T2)); - Set_Packed_Array_Impl_Type (T1, Packed_Array_Impl_Type (T2)); end Copy_Array_Subtype_Attributes; ----------------------------------- |