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
/
p10148.C
blob
2cb359c9b9a82a298bf672443db2535a49f4844e
1
// { dg-do run }
2
// { dg-options "" }
3
// prms-id: 10148
4
5
int fail = 1;
6
void ok() { fail = 0; }
7
8
class TC {
9
int s_;
10
};
11
12
class TIRD {
13
public:
14
void (*itc)();
15
TIRD() { itc = ok; }
16
};
17
18
class TCCB : public TC, public TIRD {
19
};
20
21
class TCRCB : public TCCB {
22
public:
23
virtual void eat ();
24
};
25
26
void TCRCB::eat () {
27
void *vp = (void *)((TIRD*)this)->itc;
28
this->itc();
29
}
30
31
int main() {
32
TCRCB a;
33
a.eat();
34
return fail;
35
}