Ada subscripting of pointer to array with dynamic bounds
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dynarr-ptr.exp
index 501f1290c3b1e893bec7beaa614875472f12ee09..1df5e3c018d230799c6170326e8765083740f9b2 100644 (file)
@@ -137,17 +137,121 @@ gdb_test_no_output "set language ada"
 gdb_test "print foo.three_ptr.all" \
          " = \\(1, 2, 3\\)"
 
+gdb_test "print foo.three_ptr.all(1)" \
+         " = 1"
+
+gdb_test "print foo.three_ptr.all(2)" \
+         " = 2"
+
+gdb_test "print foo.three_ptr.all(3)" \
+         " = 3"
+
+# foo.three_ptr
+
+gdb_test "print foo.three_ptr(1)" \
+         " = 1"
+
+gdb_test "print foo.three_ptr(2)" \
+         " = 2"
+
+gdb_test "print foo.three_ptr(3)" \
+         " = 3"
+
 # foo.three_ptr_tdef.all
 
 gdb_test "print foo.three_ptr_tdef.all" \
          " = \\(1, 2, 3\\)"
 
+gdb_test "print foo.three_ptr_tdef.all(1)" \
+         " = 1"
+
+gdb_test "print foo.three_ptr_tdef.all(2)" \
+         " = 2"
+
+gdb_test "print foo.three_ptr_tdef.all(3)" \
+         " = 3"
+
+# foo.three_ptr_tdef
+
+gdb_test "print foo.three_ptr_tdef(1)" \
+         " = 1"
+
+gdb_test "print foo.three_ptr_tdef(2)" \
+         " = 2"
+
+gdb_test "print foo.three_ptr_tdef(3)" \
+         " = 3"
+
 # foo.five_ptr.all
 
 gdb_test "print foo.five_ptr.all" \
          " = \\(2 => 5, 8, 13, 21, 34\\)"
 
+gdb_test "print foo.five_ptr.all(2)" \
+         " = 5"
+
+gdb_test "print foo.five_ptr.all(3)" \
+         " = 8"
+
+gdb_test "print foo.five_ptr.all(4)" \
+         " = 13"
+
+gdb_test "print foo.five_ptr.all(5)" \
+         " = 21"
+
+gdb_test "print foo.five_ptr.all(6)" \
+         " = 34"
+
+# foo.five_ptr
+
+gdb_test "print foo.five_ptr(2)" \
+         " = 5"
+
+gdb_test "print foo.five_ptr(3)" \
+         " = 8"
+
+gdb_test "print foo.five_ptr(4)" \
+         " = 13"
+
+gdb_test "print foo.five_ptr(5)" \
+         " = 21"
+
+gdb_test "print foo.five_ptr(6)" \
+         " = 34"
+
 # foo.five_ptr_tdef.all
 
 gdb_test "print foo.five_ptr_tdef.all" \
          " = \\(2 => 5, 8, 13, 21, 34\\)"
+
+gdb_test "print foo.five_ptr_tdef.all(2)" \
+         " = 5"
+
+gdb_test "print foo.five_ptr_tdef.all(3)" \
+         " = 8"
+
+gdb_test "print foo.five_ptr_tdef.all(4)" \
+         " = 13"
+
+gdb_test "print foo.five_ptr_tdef.all(5)" \
+         " = 21"
+
+gdb_test "print foo.five_ptr_tdef.all(6)" \
+         " = 34"
+
+# foo.five_ptr_tdef
+
+gdb_test "print foo.five_ptr_tdef(2)" \
+         " = 5"
+
+gdb_test "print foo.five_ptr_tdef(3)" \
+         " = 8"
+
+gdb_test "print foo.five_ptr_tdef(4)" \
+         " = 13"
+
+gdb_test "print foo.five_ptr_tdef(5)" \
+         " = 21"
+
+gdb_test "print foo.five_ptr_tdef(6)" \
+         " = 34"
This page took 0.029872 seconds and 4 git commands to generate.