gigi.h (aggregate_type_contains_array_p): Declare.
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 30 Aug 2019 15:12:20 +0000 (15:12 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 30 Aug 2019 15:12:20 +0000 (15:12 +0000)
commit0c2837b5c408f8fd2b023a7bf00be9abd1e28a28
tree706ae520a2d14fa4f31a700f4138b4b994367b57
parentc85dbadc061f7c7f3575e335976150370d8652be
gigi.h (aggregate_type_contains_array_p): Declare.

* gcc-interface/gigi.h (aggregate_type_contains_array_p): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For an
extension, test Has_Record_Rep_Clause instead of Has_Specified_Layout.
(adjust_packed): Return 0 if the type of the field is an aggregate
type that contains (or is) a self-referential array.
(type_has_variable_size): Delete.
* gcc-interface/utils.c (inish_record_type): Constify a variable.
(aggregate_type_contains_array_p): Add parameter SELF_REFERENTIAL.
<RECORD_TYPE>: Pass it in the recursive call.
<ARRAY_TYPE>: If it is true, return true only if the array type is
self-referential.
(create_field_decl): Streamline the setting of the alignment on the
field.  Pass false to aggregate_type_contains_array_p.

From-SVN: r275196
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/gigi.h
gcc/ada/gcc-interface/utils.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/pack24.adb [new file with mode: 0644]