{
tree type = const_cast<tree> (const_type);
tree first_dimen, dimen;
- bool is_bit_packed_array, is_array;
+ bool is_array;
int i;
/* Temporaries created in the first pass and used in the second one for thin
/* If we have an implementation type for a packed array, get the original
array type. */
if (TYPE_IMPL_PACKED_ARRAY_P (type) && TYPE_ORIGINAL_PACKED_ARRAY (type))
- {
- is_bit_packed_array = BIT_PACKED_ARRAY_TYPE_P (type);
- type = TYPE_ORIGINAL_PACKED_ARRAY (type);
- }
- else
- is_bit_packed_array = false;
+ type = TYPE_ORIGINAL_PACKED_ARRAY (type);
/* First pass: gather all information about this array except everything
related to dimensions. */
tree array_field = DECL_CHAIN (bounds_field);
tree array_type = TREE_TYPE (array_field);
+ /* Replay the entire processing for array types. */
+ if (TYPE_CAN_HAVE_DEBUG_TYPE_P (array_type)
+ && TYPE_DEBUG_TYPE (array_type))
+ array_type = TYPE_DEBUG_TYPE (array_type);
+ if (TYPE_IMPL_PACKED_ARRAY_P (array_type)
+ && TYPE_ORIGINAL_PACKED_ARRAY (array_type))
+ array_type = TYPE_ORIGINAL_PACKED_ARRAY (array_type);
+
/* Shift back the address to get the address of the template. */
tree shift_amount
= fold_build1 (NEGATE_EXPR, sizetype, byte_position (array_field));
/* If this array has fortran convention, it's arranged in column-major
order, so our view here has reversed dimensions. */
const bool convention_fortran_p = TYPE_CONVENTION_FORTRAN_P (first_dimen);
-
- if (BIT_PACKED_ARRAY_TYPE_P (first_dimen))
- is_bit_packed_array = true;
+ const bool is_bit_packed_array = BIT_PACKED_ARRAY_TYPE_P (first_dimen);
/* ??? For row major ordering, we probably want to emit nothing and
instead specify it as the default in Dw_TAG_compile_unit. */