diff options
author | Tom Tromey <tromey@redhat.com> | 2013-03-25 17:26:18 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-03-25 17:26:18 +0000 |
commit | fce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51 (patch) | |
tree | 06761cf79babc8913eb2efe76b35859518a5148a /gdb/testsuite/gdb.cp/m-static.exp | |
parent | f6f0e17bc3616a0e976b250e361bdd61bbffc6e8 (diff) | |
download | fsf-binutils-gdb-fce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51.zip fsf-binutils-gdb-fce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51.tar.gz fsf-binutils-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.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/m-static.exp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp index 5d1cb8b..b31922a 100644 --- a/gdb/testsuite/gdb.cp/m-static.exp +++ b/gdb/testsuite/gdb.cp/m-static.exp @@ -69,6 +69,16 @@ gdb_test "print test1.key2" "\\$\[0-9\]* = 77" "simple object, static long" # simple object, static enum gdb_test "print test1.value" "\\$\[0-9\]* = oriental" "simple object, static enum" +gdb_test "print test5.single_constructor" \ + { = {void \(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \ + "simple object instance, print constructor" +gdb_test "ptype test5.single_constructor" \ + {type = void \(single_constructor \* const\)} \ + "simple object instance, ptype constructor" +gdb_test "ptype single_constructor::single_constructor" \ + {type = void \(single_constructor \* const\)} \ + "simple object class, ptype constructor" + gdb_test "print test1.'~gnu_obj_1'" \ { = {void \(gnu_obj_1 \*( const)?, int\)} 0x[0-9a-f]+ <gnu_obj_1::~gnu_obj_1\(\)>} \ "simple object instance, print quoted destructor" |