This happens when the object is declared in another compilation unit.
gcc/ada/ChangeLog:
* gcc-interface/misc.cc (gnat_get_array_descr_info): In the record
type case, bail out if the original array type cannot be retrieved.
if (TYPE_IMPL_PACKED_ARRAY_P (array_type)
&& TYPE_ORIGINAL_PACKED_ARRAY (array_type))
array_type = TYPE_ORIGINAL_PACKED_ARRAY (array_type);
+ if (TREE_CODE (array_type) != ARRAY_TYPE)
+ return false;
/* Shift back the address to get the address of the template. */
tree shift_amount