diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-03-08 12:01:22 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-03-08 12:01:22 +0000 |
commit | ba436c3b5c91bbe4c4ce3e122429dda3b47c26ee (patch) | |
tree | 19a71ff744074d9e56fbc0d1d0c34443759ebcb4 /gcc/ada/decl.c | |
parent | 6ab36daccbd955cdb3caf5b7040ab99cdb6b4d14 (diff) | |
download | gcc-ba436c3b5c91bbe4c4ce3e122429dda3b47c26ee.zip gcc-ba436c3b5c91bbe4c4ce3e122429dda3b47c26ee.tar.gz gcc-ba436c3b5c91bbe4c4ce3e122429dda3b47c26ee.tar.bz2 |
decl.c (gnat_to_gnu_entity): Do not force BIGGEST_ALIGNMENT when capping the alignment of records with...
* decl.c (gnat_to_gnu_entity) <E_Record_Type>: Do not force
BIGGEST_ALIGNMENT when capping the alignment of records with
strict alignment and size clause.
From-SVN: r133031
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r-- | gcc/ada/decl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 6278320..2c88c0f 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -2575,8 +2575,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) && Known_Static_Esize (gnat_entity)) { unsigned int raw_size = UI_To_Int (Esize (gnat_entity)); - TYPE_ALIGN (gnu_type) - = MIN (BIGGEST_ALIGNMENT, raw_size & -raw_size); + unsigned int raw_align = raw_size & -raw_size; + if (raw_align < BIGGEST_ALIGNMENT) + TYPE_ALIGN (gnu_type) = raw_align; } else TYPE_ALIGN (gnu_type) = 0; |