diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/call-c.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/call-c.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/call-c.cc b/gdb/testsuite/gdb.cp/call-c.cc index a8119f9..8ab617e 100644 --- a/gdb/testsuite/gdb.cp/call-c.cc +++ b/gdb/testsuite/gdb.cp/call-c.cc @@ -21,7 +21,18 @@ int func(int x) return x; } +struct Foo { + Foo() : x_(1) { } + int func() const { return x_; } + private: + int x_; +}; + int main() { + Foo f; + Foo *pf = &f; + Foo* &rf = pf; + rf->func(); /* set breakpoint here */ return func(0); } |