ada-tree.h (DECL_ALIASED_P): New flag.
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 27 Jan 2012 09:35:03 +0000 (09:35 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 27 Jan 2012 09:35:03 +0000 (09:35 +0000)
commit5f2e59d44bc4aa1dd5e2fd9d2b412b85519fb39d
tree2316952bdf1880a92959189d3c487e8302fcc19d
parentae25db4568034756df727d432dd48caa5e5f41dc
ada-tree.h (DECL_ALIASED_P): New flag.

* gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
* gcc-interface/decl.c (is_variable_size): Rename to...
(type_has_variable_size): ...this.
(adjust_packed): Adjust to above renaming.
(gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
(field_is_artificial): New predicate.
(field_is_aliased): Likewise.
(field_has_self_size): Likewise.
(field_has_variable_size): Likewise.
(components_to_record): Record information for the final layout during
the first pass on fields.
If there is an aliased field placed after a field whose length depends
on discriminants, put all the fields of the latter sort, last.

From-SVN: r183609
gcc/ada/ChangeLog
gcc/ada/gcc-interface/ada-tree.h
gcc/ada/gcc-interface/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/discr33.adb [new file with mode: 0644]