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
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
p10148.C
blob
20fbf091894b3bef15816cb4b993e7aa091f910c
1
// { dg-do run }
2
// prms-id: 10148
3
4
int fail = 1;
5
void ok() { fail = 0; }
6
7
class TC {
8
int s_;
9
};
10
11
class TIRD {
12
public:
13
void (*itc)();
14
TIRD() { itc = ok; }
15
};
16
17
class TCCB : public TC, public TIRD {
18
};
19
20
class TCRCB : public TCCB {
21
public:
22
virtual void eat ();
23
};
24
25
void TCRCB::eat () {
26
void *vp = (TIRD*)this->itc;
27
this->itc();
28
}
29
30
int main() {
31
TCRCB a;
32
a.eat();
33
return fail;
34
}