aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.guile
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.guile')
-rw-r--r--gdb/testsuite/gdb.guile/scm-value.c2
-rw-r--r--gdb/testsuite/gdb.guile/scm-value.exp2
2 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.guile/scm-value.c b/gdb/testsuite/gdb.guile/scm-value.c
index 3c61911..e4f7530 100644
--- a/gdb/testsuite/gdb.guile/scm-value.c
+++ b/gdb/testsuite/gdb.guile/scm-value.c
@@ -49,6 +49,8 @@ struct Derived : public Base {
};
Base *base = new Derived ();
+Derived derived;
+Base &base_ref = derived;
void ptr_ref(int*& rptr_int)
{
diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp
index 0bcd381..2784da2 100644
--- a/gdb/testsuite/gdb.guile/scm-value.exp
+++ b/gdb/testsuite/gdb.guile/scm-value.exp
@@ -335,6 +335,8 @@ proc test_subscript_regression {exefile lang} {
# Likewise.
gdb_test "gu (print (value-dynamic-type (parse-and-eval \"base\")))" \
"= Derived \[*\]"
+ gdb_test "gu (print (value-dynamic-type (parse-and-eval \"base_ref\")))" \
+ "= Derived \[&\]"
# A static type case.
gdb_test "gu (print (value-dynamic-type (parse-and-eval \"5\")))" \
"= int"