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 | 24 |
1 files changed, 24 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 000000000..80e37ad03 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/offset2.C @@ -0,0 +1,24 @@ +// { dg-do run } +// PRMS Id: 5070 (testcase 2) + +int status = 1; + +struct foo { + foo& operator= (const foo&) { status = 0; return *this; } +}; + +struct xx { + foo a; +}; + +struct yy : public xx { + yy(foo& a) { xx::a = a; } +}; + +int main() +{ + foo f; + yy y (f); + + return status; +} |