gdb/testsuite/ChangeLog:
* gdb.cp/non-trivial-retval.cc: Add new test cases.
* gdb.cp/non-trivial-retval.exp: Add new tests.
+2014-10-15 Siva Chandra Reddy <sivachandra@google.com>
+
+ * gdb.cp/non-trivial-retval.cc: Add new test cases.
+ * gdb.cp/non-trivial-retval.exp: Add new tests.
+
2014-10-15 Siva Chandra Reddy <sivachandra@google.com>
PR c++/13403
return b;
}
+class C
+{
+public:
+ virtual int method ();
+
+ int c;
+};
+
+int
+C::method ()
+{
+ return c;
+}
+
+C
+f3 (int i1, int i2)
+{
+ C c;
+
+ c.c = i1 + i2;
+
+ return c;
+}
+
+class D
+{
+public:
+ int d;
+};
+
+class E : public virtual D
+{
+public:
+ int e;
+};
+
+E
+f4 (int i1, int i2)
+{
+ E e;
+
+ e.e = i1 + i2;
+
+ return e;
+}
+
int
main (void)
{
gdb_test "p f1 (i1, i2)" ".* = {a = 123}" "p f1 (i1, i2)"
gdb_test "p f2 (i1, i2)" ".* = {b = 123}" "p f2 (i1, i2)"
+gdb_test "p f3 (i1, i2)" ".* = {.* c = 123}" "p f3 (i1, i2)"
+gdb_test "p f4 (i1, i2)" ".* = {.* e = 123}" "p f4 (i1, i2)"