summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/offset2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/offset2.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.jason/offset2.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/offset2.C b/gcc/testsuite/g++.old-deja/g++.jason/offset2.C
new file mode 100755
index 0000000..a598d43
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/offset2.C
@@ -0,0 +1,23 @@
+// PRMS Id: 5070 (testcase 2)
+
+int status = 1;
+
+struct foo {
+ foo& operator= (const foo&) { status = 0; }
+};
+
+struct xx {
+ foo a;
+};
+
+struct yy : public xx {
+ yy(foo& a) { xx::a = a; }
+};
+
+int main()
+{
+ foo f;
+ yy y (f);
+
+ return status;
+}