aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/return3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/return3.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/return3.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/return3.C b/gcc/testsuite/g++.old-deja/g++.jason/return3.C
new file mode 100644
index 00000000000..61e3dda02ce
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/return3.C
@@ -0,0 +1,19 @@
+// PRMS id: 10912
+
+struct A {
+ A() { i=10; };
+ int i;
+};
+struct B : public A {};
+B b;
+
+A f()
+{
+ return b;
+}
+
+main ()
+{
+ A a = f ();
+ return a.i != 10;
+}