diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-12-29 23:33:21 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-10 09:38:44 +0000 |
commit | 68adddccb139f87ff705fd744eb3771fc2c6497a (patch) | |
tree | f3148c8044f1c2f22056ff12a79d9ad633568232 /gcc/ada/layout.adb | |
parent | b942847f787fc5765bdae95550ddf0de690b225c (diff) | |
download | gcc-68adddccb139f87ff705fd744eb3771fc2c6497a.zip gcc-68adddccb139f87ff705fd744eb3771fc2c6497a.tar.gz gcc-68adddccb139f87ff705fd744eb3771fc2c6497a.tar.bz2 |
[Ada] Fix error on too large size clause for bit-packed array
gcc/ada/
* exp_pakd.adb (Install_PAT): Do not reset the alignment here.
* layout.adb (Layout_Type): Call Adjust_Esize_Alignment after having
copied the RM_Size onto the Esize when the latter is too small.
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r-- | gcc/ada/layout.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index 092f2f5..5a6acf6 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -616,7 +616,7 @@ package body Layout is Size : constant Uint := RM_Size (E); begin - Set_Esize (E, RM_Size (E)); + Set_Esize (E, Size); -- For scalar types, increase Object_Size to power of 2, but -- not less than a storage unit in any case (i.e., normally @@ -641,6 +641,11 @@ package body Layout is loop Set_Alignment (E, 2 * Alignment (E)); end loop; + + -- For the other types, apply standard adjustments + + else + Adjust_Esize_Alignment (E); end if; end; end if; |