UI_To_gnu (RM_Size (gnat_entity), bitsizetype));
TYPE_PACKED_ARRAY_TYPE_P (gnu_type) = 1;
- /* Strip the ___XP suffix for standard DWARF. */
- if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
- gnu_entity_name = TYPE_NAME (gnu_type);
-
/* Create a stripped-down declaration, mainly for debugging. */
create_type_decl (gnu_entity_name, gnu_type, true, debug_info_p,
gnat_entity);
set_nonaliased_component_on_array_type (gnu_type);
}
- /* Strip the ___XP suffix for standard DWARF. */
- if (Is_Packed_Array_Impl_Type (gnat_entity)
- && gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
- {
- Entity_Id gnat_original_array_type
- = Underlying_Type (Original_Array_Type (gnat_entity));
-
- gnu_entity_name
- = get_entity_name (gnat_original_array_type);
- }
-
/* Attach the TYPE_STUB_DECL in case we have a parallel type. */
TYPE_STUB_DECL (gnu_type)
= create_type_stub_decl (gnu_entity_name, gnu_type);
array subtypes the same alias set. */
relate_alias_sets (gnu_type, gnu_base_type, ALIAS_SET_COPY);
- /* If this is a packed type, make this type the same as the packed
- array type, but do some adjusting in the type first. */
+ /* If this is a packed type implemented specially, then replace our
+ type with the implementation type. */
if (Present (Packed_Array_Impl_Type (gnat_entity)))
{
- Entity_Id gnat_index;
- tree gnu_inner;
-
/* First finish the type we had been making so that we output
debugging information for it. */
process_attributes (&gnu_type, &attr_list, false, gnat_entity);
That's sort of "morally" true and will make it possible for
the debugger to look it up by name in DWARF, which is needed
in order to decode the packed array type. */
- gnu_decl
+ tree gnu_tmp_decl
= create_type_decl (gnu_entity_name, gnu_type,
!Comes_From_Source (Etype (gnat_entity))
&& artificial_p, debug_info_p,
gnat_entity);
-
/* Save it as our equivalent in case the call below elaborates
this type again. */
- save_gnu_tree (gnat_entity, gnu_decl, false);
+ save_gnu_tree (gnat_entity, gnu_tmp_decl, false);
- gnu_decl
- = gnat_to_gnu_entity (Packed_Array_Impl_Type (gnat_entity),
- NULL_TREE, false);
- this_made_decl = true;
- gnu_type = TREE_TYPE (gnu_decl);
+ gnu_type
+ = gnat_to_gnu_type (Packed_Array_Impl_Type (gnat_entity));
save_gnu_tree (gnat_entity, NULL_TREE, false);
- save_gnu_tree (gnat_entity, gnu_decl, false);
- saved = true;
- gnu_inner = gnu_type;
+ /* Set the ___XP suffix for GNAT encodings. */
+ if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ gnu_entity_name = DECL_NAME (TYPE_NAME (gnu_type));
+
+ tree gnu_inner = gnu_type;
while (TREE_CODE (gnu_inner) == RECORD_TYPE
&& (TYPE_JUSTIFIED_MODULAR_P (gnu_inner)
|| TYPE_PADDING_P (gnu_inner)))
gcc_checking_assert (!TYPE_ACTUAL_BOUNDS (gnu_inner));
}
- for (gnat_index = First_Index (gnat_entity);
+ for (Entity_Id gnat_index = First_Index (gnat_entity);
Present (gnat_index);
gnat_index = Next_Index (gnat_index))
SET_TYPE_ACTUAL_BOUNDS