+2019-06-10 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * valops.c (value_slice): Check for not allocated or not
+ associated values.
+
2019-06-10 Tom de Vries <tdevries@suse.de>
PR gdb/24618
+2019-06-10 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.fortran/vla-sizeof.exp: Update expected results.
+
2019-06-06 Amos Bird <amosbird@gmail.com>
* gdb.base/annota1.exp (thread_switch): Add test for
gdb_test "print sizeof(vla1(3,2,1))" \
"no such vector element \\(vector not allocated\\)" \
"print sizeof non-allocated indexed vla1"
-gdb_test "print sizeof(vla1(3:4,2,1))" "slice out of range" \
+gdb_test "print sizeof(vla1(3:4,2,1))" "array not allocated" \
"print sizeof non-allocated sliced vla1"
# Try to access value in allocated VLA
gdb_test "print sizeof(pvla(3,2,1))" \
"no such vector element \\(vector not associated\\)" \
"print sizeof non-associated indexed pvla"
-gdb_test "print sizeof(pvla(3:4,2,1))" "slice out of range" \
+gdb_test "print sizeof(pvla(3:4,2,1))" "array not associated" \
"print sizeof non-associated sliced pvla"
# Try to access values in pointer to VLA and compare them
&& TYPE_CODE (array_type) != TYPE_CODE_STRING)
error (_("cannot take slice of non-array"));
+ if (type_not_allocated (array_type))
+ error (_("array not allocated"));
+ if (type_not_associated (array_type))
+ error (_("array not associated"));
+
range_type = TYPE_INDEX_TYPE (array_type);
if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0)
error (_("slice from bad array or bitstring"));