aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/koenig.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.cp/koenig.exp')
-rw-r--r--gdb/testsuite/gdb.cp/koenig.exp11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/koenig.exp b/gdb/testsuite/gdb.cp/koenig.exp
index d5e6c3f..34abe77 100644
--- a/gdb/testsuite/gdb.cp/koenig.exp
+++ b/gdb/testsuite/gdb.cp/koenig.exp
@@ -115,3 +115,14 @@ gdb_test "p q + 5" "= 29"
# some unary operators for good measure
# Cannot resolve function operator++ to any overloaded instance
gdb_test "p ++q" "= 30"
+
+# Test that koening lookup does not affect
+# member variable lookup.
+gdb_test "p r.rfoo()" "= 31"
+
+# Do the same from inside class R.
+gdb_breakpoint [gdb_get_line_number "marker1"]
+gdb_continue_to_breakpoint "marker1"
+
+gdb_test "p rfoo()" "= 31"
+gdb_test "p this->rfoo()" "= 31"