aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/m-static.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-25 17:26:18 +0000
committerTom Tromey <tromey@redhat.com>2013-03-25 17:26:18 +0000
commitfce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51 (patch)
tree06761cf79babc8913eb2efe76b35859518a5148a /gdb/testsuite/gdb.cp/m-static.cc
parentf6f0e17bc3616a0e976b250e361bdd61bbffc6e8 (diff)
downloadgdb-fce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51.zip
gdb-fce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51.tar.gz
gdb-fce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51.tar.bz2
PR c++/9197:
* opencl-lang.c (evaluate_subexp_opencl) <STRUCTOP_STRUCT>: Use value_struct_elt, not lookup_struct_elt_type. * eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT, STRUCTOP_PTR>: Use value_struct_elt, not lookup_struct_elt_type. * expression.h (EVAL_AVOID_SIDE_EFFECTS): Update comment. gdb/testsuite * gdb.cp/m-static.exp: Add constructor ptype tests. * gdb.cp/m-static.cc (single_constructor): New class. (main): Make instance of single_constructor.
Diffstat (limited to 'gdb/testsuite/gdb.cp/m-static.cc')
-rw-r--r--gdb/testsuite/gdb.cp/m-static.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/m-static.cc b/gdb/testsuite/gdb.cp/m-static.cc
index eadbdfc..cb871e8 100644
--- a/gdb/testsuite/gdb.cp/m-static.cc
+++ b/gdb/testsuite/gdb.cp/m-static.cc
@@ -31,6 +31,14 @@ public:
}
};
+// An object with a single constructor.
+class single_constructor
+{
+public:
+ single_constructor () { }
+ ~single_constructor () { }
+};
+
const bool gnu_obj_1::test;
const int gnu_obj_1::key1;
long gnu_obj_1::key2 = 77;
@@ -81,6 +89,7 @@ int main()
gnu_obj_2<long> test2(roman);
gnu_obj_3<long> test3(greek);
gnu_obj_4 test4;
+ single_constructor test5;
test4.dummy = test4.elsewhere;
test4.dummy = 0;