diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/decl.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bbca156..ba99678 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 2008-03-08 Eric Botcazou <ebotcazou@adacore.com> + * 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. + +2008-03-08 Eric Botcazou <ebotcazou@adacore.com> + * lang-specs.h: Pass -gnatwa if -Wall is passed. * misc.c (gnat_handle_option) <OPT_Wall>: Expand into -Wunused and -Wuninitialized. 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; |