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
Dead
[official-gcc.git]
/
gomp-20050608-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
net39.C
blob
6554b335935310f0106e8b84f56217ca9cf14f7b
1
// { dg-do run }
2
void *vp;
3
4
class silly {
5
public:
6
virtual int b() { return 1; }
7
};
8
class solly : silly {
9
public:
10
virtual int b() { return 2; }
11
};
12
class thing {
13
public:
14
virtual int a() { return 3; }
15
};
16
class thong : public solly, public thing {
17
public:
18
virtual int a() {
19
if (this != vp) return 4;
20
else return 0;
21
}
22
};
23
24
typedef int(thing::*ping)();
25
ping qq = &thing::a;
26
27
int main() {
28
thong b;
29
vp = &b;
30
return (b.*qq)();
31
}