decl.c (gnat_to_gnu_entity): If the type has strict alignment...
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 25 Nov 2007 13:37:12 +0000 (13:37 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 25 Nov 2007 13:37:12 +0000 (13:37 +0000)
commitf1c8c7eef7349f0aae539bd1b45875ac5bcbaede
treec2f30f08a620652b6703d34c9395cbbceb397f12
parent64f6a0efdfa5c03132c45952bd1986a8adc2c19d
decl.c (gnat_to_gnu_entity): If the type has strict alignment...

* decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the type has
strict alignment, no alignment clause and a known static size, cap
the type alignment to the greatest power of 2 factor of the size.
(gnat_to_gnu_field): If the field has a component clause, is aliased
or of a type with strict alignment, require that its size be equal to
that of the type.
(validate_size): Use the type size as the minimum size for a type with
strict alignment.

From-SVN: r130406
gcc/ada/ChangeLog
gcc/ada/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/specs/size_clause1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/specs/size_clause2.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/specs/size_clause3.ads [new file with mode: 0644]