repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
p10849a.C
blob
d6d46569b878678139b7123d072a65e270def8dc
1
// prms-id: 10849
2
3
struct A
4
{
5
int comm;
6
A(int i) : comm(i) { }
7
};
8
9
struct S1 { char c1; };
10
11
struct B : public S1, public A
12
{
13
B(int i) : A(i) { }
14
};
15
16
struct C : public A
17
{
18
C(int i) : A(i) { }
19
};
20
21
struct D : public B, public C
22
{
23
virtual int g() {
24
int D::*pmd = (int C::*)&C::comm;
25
return (this->*pmd) == 42;
26
}
27
D() : B(41), C(42) { }
28
} d;
29
30
int main() {
31
if (! d.g())
32
return 1;
33
}