aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/temporary7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/temporary7.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/temporary7.C35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary7.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary7.C
new file mode 100644
index 00000000000..8b91fe1324d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/temporary7.C
@@ -0,0 +1,35 @@
+// PRMS ID: 7304
+
+struct V {
+ int n;
+ V() : n(0) { }
+ V(int x) : n(x) { }
+};
+
+V baz(const V &x)
+{
+ return x;
+}
+
+int bar(V v1, V v2, V v3)
+{
+ return v1.n;
+}
+
+struct A {
+ A(): n(7) { }
+ int foo();
+ V n;
+};
+
+int A::foo()
+{
+ V v1, v2;
+ return bar(n, baz(v1), v2);
+}
+
+int main()
+{
+ A a;
+ return (a.foo() != 7);
+}