From ba436c3b5c91bbe4c4ce3e122429dda3b47c26ee Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 8 Mar 2008 12:01:22 +0000 Subject: [PATCH] decl.c (gnat_to_gnu_entity): Do not force BIGGEST_ALIGNMENT when capping the alignment of records with... * decl.c (gnat_to_gnu_entity) : Do not force BIGGEST_ALIGNMENT when capping the alignment of records with strict alignment and size clause. From-SVN: r133031 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/decl.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bbca1567488..ba99678f9d6 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2008-03-08 Eric Botcazou + + * decl.c (gnat_to_gnu_entity) : Do not force + BIGGEST_ALIGNMENT when capping the alignment of records with + strict alignment and size clause. + 2008-03-08 Eric Botcazou * lang-specs.h: Pass -gnatwa if -Wall is passed. diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 62783202f01..2c88c0fe576 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; -- 2.30.2