summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/implptrconst.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/implptrconst.exp')
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrconst.exp9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 1c89c43002e..4e822951c3b 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -73,6 +73,14 @@ Dwarf::assemble $asm_file {
GNU_implicit_pointer $var_label 0
} SPECIAL_expr}
}
+
+ DW_TAG_variable {
+ {name d}
+ {type :$ptr_label}
+ {location {
+ GNU_implicit_pointer $var_label 2
+ } SPECIAL_expr}
+ }
}
}
}
@@ -103,3 +111,4 @@ if ![runto_main] {
}
gdb_test "print *c" " = 114 'r'"
+gdb_test "print d\[-2\]" " = 114 'r'"