blob: f50dbcdb3313c2b69336d0cf8f07e3e055aa0502 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// { dg-do run }
// prms-id: 4736
int did_fail = 1;
class O {
public:
virtual void of() { }
};
class A : public O {
public:
virtual void vf() { }
};
class W {
public:
virtual void vf() { }
};
class X : public W, public A {
public:
virtual void vf() { }
};
class Z : public X {
public:
virtual void vf() { did_fail = 0; }
};
Z sz;
void fail1(W* w) {
w->vf();
}
int main() {
fail1 (&sz);
return did_fail;
}
|