diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/method-call-in-c.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/method-call-in-c.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.cp/method-call-in-c.cc b/gdb/testsuite/gdb.cp/method-call-in-c.cc index 09e4285..95f3f3c 100644 --- a/gdb/testsuite/gdb.cp/method-call-in-c.cc +++ b/gdb/testsuite/gdb.cp/method-call-in-c.cc @@ -29,7 +29,13 @@ struct foo_type return var++; } - int var = 123; + foo_type &operator+= (const baz_type &rhs) + { + var += (rhs.a + rhs.b + rhs.c); + return *this; + } + + int var = 120; }; int @@ -40,5 +46,7 @@ main (void) foo_type foo; + foo += b; + return foo.func (b, f); /* Break here. */ } |