From 81121995ba146b0c5d0ed18730b07c2c3fcdb974 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 11 Jan 2007 20:48:49 +0000 Subject: * gdb.mi/mi-var-cp.cc (reference_update_tests): Make sure the variable we're using is in scope. (reference_to_pointer): Likewise. --- gdb/testsuite/gdb.mi/mi-var-cp.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/testsuite/gdb.mi') diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.cc b/gdb/testsuite/gdb.mi/mi-var-cp.cc index a633d22..33f84e6 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cp.cc +++ b/gdb/testsuite/gdb.mi/mi-var-cp.cc @@ -31,6 +31,8 @@ void reference_update_tests () x = 567; /*: mi_varobj_update RX {} "update RX (3)" :*/ + /* Dummy assignment to keep 'x' in scope. */ + x = 444; /*: END: reference_update :*/ } @@ -72,12 +74,11 @@ void base_in_reference_test_main () int reference_to_pointer () { + /*: BEGIN: reference_to_pointer :*/ S s, *ptr_s, *& rptr_s = ptr_s; s.i = 67; s.j = 89; ptr_s = &s; - /*: BEGIN: reference_to_pointer :*/ - return 99; /*: mi_create_varobj RPTR rptr_s "create varobj for rptr_s" @@ -91,6 +92,7 @@ int reference_to_pointer () mi_check_varobj_value RPTR.public.i 67 "check i member" mi_check_varobj_value RPTR.public.j 89 "check j member" :*/ + return 99; /*: END: reference_to_pointer :*/ } -- cgit v1.1