For array subtypes, return the extended types corresponding to the array
type.
gcc/ada/ChangeLog:
* gcc-interface/decl.cc (get_extended_unconstrained_array): Handle
array subtype.
Co-authored-by: Éric Botcazou <botcazou@adacore.com>
gcc_assert (Is_Array_Type (gnat_entity)
&& TREE_CODE (gnu_type) == UNCONSTRAINED_ARRAY_TYPE);
+
+ if (Ekind (gnat_entity) == E_Array_Subtype)
+ return get_extended_unconstrained_array (Etype (gnat_entity), gnu_type);
+
tree gnu_extended_type = TYPE_EXTENDED_UNCONSTRAINED_ARRAY (gnu_type);
/* Building the extended type is achieved by translating the array type