mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
gdb/
* dwarf2read.c (read_subrange_type): Set TYPE_HIGH_BOUND_UNDEFINED. * valarith.c (value_subscripted_rvalue): Suppress error if TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
This commit is contained in:
@@ -198,7 +198,8 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
|
||||
unsigned int elt_offs = elt_size * longest_to_int (index - lowerbound);
|
||||
struct value *v;
|
||||
|
||||
if (index < lowerbound || elt_offs >= TYPE_LENGTH (array_type))
|
||||
if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
|
||||
&& elt_offs >= TYPE_LENGTH (array_type)))
|
||||
error (_("no such vector element"));
|
||||
|
||||
v = allocate_value (elt_type);
|
||||
|
||||
Reference in New Issue
Block a user