aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-var-cp.cc
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2006-12-08 12:44:11 +0000
committerVladimir Prus <vladimir@codesourcery.com>2006-12-08 12:44:11 +0000
commitb26ed50ddfdc3c3ba992ca2cfaf75b515a43b3d9 (patch)
tree145b8afc101a8d88870ec05b1933c5f393ba4936 /gdb/testsuite/gdb.mi/mi-var-cp.cc
parentdb9a518b07b656e17230459a945301822ea13404 (diff)
downloadgdb-b26ed50ddfdc3c3ba992ca2cfaf75b515a43b3d9.zip
gdb-b26ed50ddfdc3c3ba992ca2cfaf75b515a43b3d9.tar.gz
gdb-b26ed50ddfdc3c3ba992ca2cfaf75b515a43b3d9.tar.bz2
2006-12-08 Vladimir Prus <vladimir@codesourcery.com>
* varobj.c (varobj_create): Don't call release_value. (varobj_set_value): Likewise. (install_new_value): Call coerce_ref and release_value on the value. Add asserts.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-var-cp.cc')
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cp.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.cc b/gdb/testsuite/gdb.mi/mi-var-cp.cc
new file mode 100644
index 0000000..23390f9
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-var-cp.cc
@@ -0,0 +1,30 @@
+/* Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+void reference_update_tests ()
+{
+ int x = 167;
+ int& rx = x;
+ x = 567;
+ x = 567;
+}
+
+int main ()
+{
+ reference_update_tests ();
+ return 0;
+}