blob: 96bb064b568d987a0d5d6d652fed7376d8f8a2ab (
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
|
// { dg-do run }
// prms-id: 10849
struct A
{
int comm;
A(int i) : comm(i) { }
};
struct S1 { char c1; };
struct B : public S1, public A
{
B(int i) : A(i) { }
};
struct C : public A
{
C(int i) : A(i) { }
};
struct D : public B, public C
{
virtual int g() {
int D::*pmd = (int C::*)&C::comm;
return (this->*pmd) == 42;
}
D() : B(41), C(42) { }
} d;
int main() {
if (! d.g())
return 1;
}
|