* gcc-interface/decl.c (variant_desc): Add AUX field.
commit3e1f325ad20da435c6642e1cd0b9f4162b624032
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Jun 2018 09:51:26 +0000 (12 09:51 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Jun 2018 09:51:26 +0000 (12 09:51 +0000)
tree3c8c32322ff2d79c1acfc7387a1606252f353502
parentb776696b72f8284bf885257b3930dd1a13db2446
* gcc-interface/decl.c (variant_desc): Add AUX field.
(gnat_to_gnu_entity) <discrete_type>: Do not call compute_record_mode
directly.
(reverse_sort_field_list): New static function.
(components_to_record): Place the variant part at the beginning of the
field list when there is an obvious order of increasing position.
(build_variant_list): Initialize it.
(create_variant_part_from): Do not call compute_record_mode directly.
(copy_and_substitute_in_layout): Likewise.  Always sort the fields with
fixed position in order of increasing position, in the record and all
the variants, in any.  Call reverse_sort_field_list.
* gcc-interface/utils.c (make_packable_type): Compute the sizes before
calling finish_record_type.  Do not call compute_record_mode directly.
(finish_record_type): Overhaul final processing depending on REP_LEVEL
and call finish_bitfield_layout if it is equal to one or two.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261479 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/utils.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/opt72_pkg.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt72a.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt72b.adb [new file with mode: 0644]