Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.jason/offset2.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do run } |
2 // PRMS Id: 5070 (testcase 2) | |
3 | |
4 int status = 1; | |
5 | |
6 struct foo { | |
7 foo& operator= (const foo&) { status = 0; return *this; } | |
8 }; | |
9 | |
10 struct xx { | |
11 foo a; | |
12 }; | |
13 | |
14 struct yy : public xx { | |
15 yy(foo& a) { xx::a = a; } | |
16 }; | |
17 | |
18 int main() | |
19 { | |
20 foo f; | |
21 yy y (f); | |
22 | |
23 return status; | |
24 } |