decl.c (components_need_strict_alignment): New.
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 23 Nov 2012 10:42:50 +0000 (10:42 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 23 Nov 2012 10:42:50 +0000 (10:42 +0000)
commit29e100b31a77dcee0c57f7438e3a71007b18b52b
tree9dbc2f03652be5a6d21b9de8d0f15736f32e9aae
parent1076781c1f312bf3ac2d19844b484b0ef0ca9c5d
decl.c (components_need_strict_alignment): New.

* gcc-interface/decl.c (components_need_strict_alignment): New.
(components_to_record): Do not pack the variants if one of the fields
needs strict alignment.  Likewise for the variant part as a whole.
Specify the position of the variants even if the size isn't specified,
but do not specify the size of the variant part in this case.

From-SVN: r193750
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/discr39.adb [new file with mode: 0644]