gdb/
[deliverable/binutils-gdb.git] / gdb / valarith.c
index 9f91f4e0f0e8bbc1745d41b08325f6a4283b23c0..60f09a610e57d3a34bacc1440543b6e4eb0577ad 100644 (file)
@@ -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);
This page took 0.02431 seconds and 4 git commands to generate.