repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr94202.C
blob
5ed3dcbcd18adc21c2a1090cdef2bdce4d24cb25
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
}