diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/offset2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/offset2.C | 23 |
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 100644 index 00000000000..787e3f12081 --- /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; } +}; + +main() +{ + foo f; + yy y (f); + + return status; +} |