Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/torture/pr94202.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 // { dg-additional-options "-w" } | |
2 struct S1 { | |
3 virtual ~S1(); | |
4 virtual void v(); | |
5 }; | |
6 struct S2: S1 {}; | |
7 struct S3: S1, S2 { void v(); }; | |
8 struct S4: S3 { void v(); }; | |
9 void S4::v() { S3::v(); } | |
10 struct R { | |
11 S1 * m; | |
12 void f(S2 * x) { | |
13 static_cast<S1 *>(x)->v(); | |
14 x->v(); | |
15 m = x; | |
16 } | |
17 }; | |
18 void f() { | |
19 R r; | |
20 r.f(new S4); | |
21 r.f(new S3); | |
22 } |