set_nonaliased_component_on_array_type (tem);
}
- /* If an alignment is specified, use it if valid. But ignore it
- for the original type of packed array types. If the alignment
- was requested with an explicit alignment clause, state so. */
- if (No (Packed_Array_Impl_Type (gnat_entity))
- && Known_Alignment (gnat_entity))
+ /* If this is a packed type implemented specially, then process the
+ implementation type so it is elaborated in the proper scope. */
+ if (Present (Packed_Array_Impl_Type (gnat_entity)))
+ gnat_to_gnu_entity (Packed_Array_Impl_Type (gnat_entity), NULL_TREE,
+ false);
+
+ /* Otherwise, if an alignment is specified, use it if valid and, if
+ the alignment was requested with an explicit clause, state so. */
+ else if (Known_Alignment (gnat_entity))
{
SET_TYPE_ALIGN (tem,
validate_alignment (Alignment (gnat_entity),
--- /dev/null
+package body Derived_Type7 is
+
+ procedure Proc (Size : Natural) is
+ type Sar_Six_Bit_Arr is new Six_Bit_Data_Array_Type (1 .. Size);
+ begin
+ null;
+ end;
+
+end Derived_Type7;
--- /dev/null
+-- { dg-do compile }
+
+package Derived_Type7 is
+
+ type Six_Bit_Data_Type is range 0 .. 63;
+ for Six_Bit_Data_Type'Size use 6;
+
+ type Six_Bit_Data_Array_Type is array (Integer range <>) of Six_Bit_Data_Type;
+ for Six_Bit_Data_Array_Type'Component_Size use 6;
+
+ procedure Proc (Size : Natural);
+
+end Derived_Type7;