if (TREE_CODE (type) == VECTOR_TYPE)
{
- /* For VECTOR_TYPEs we use an array die with appropriate bounds. */
+ /* For VECTOR_TYPEs we use an array DIE with appropriate bounds. */
dw_die_ref subrange_die = new_die (DW_TAG_subrange_type, array_die, NULL);
- add_bound_info (subrange_die, DW_AT_lower_bound, size_zero_node, NULL);
+ int lb = lower_bound_default ();
+ if (lb == -1)
+ lb = 0;
+ add_bound_info (subrange_die, DW_AT_lower_bound, size_int (lb), NULL);
add_bound_info (subrange_die, DW_AT_upper_bound,
- size_int (TYPE_VECTOR_SUBPARTS (type) - 1), NULL);
+ size_int (lb + TYPE_VECTOR_SUBPARTS (type) - 1), NULL);
}
else
add_subscript_info (array_die, type, collapse_nested_arrays);