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
/
net21.C
blob
02e40b0b935d83f600976d0dd0cd994d3c3b2a83
1
// Make sure we can initialize complex (MI ambiguous) vtables.
2
3
extern "C" int printf(const char *, ...);
4
5
struct a
6
{
7
virtual void f() = 0;
8
};
9
10
struct b
11
{
12
virtual void g() { };
13
};
14
15
struct c: public a, public b
16
{
17
virtual void f();
18
virtual void g();
19
};
20
21
void c::f()
22
{
23
printf("c::f()\n");
24
}
25
26
void c::g()
27
{
28
printf("c::g()\n");
29
}
30
31
struct e: public b
32
{
33
};
34
35
struct h
36
{
37
};
38
39
struct d: public c, public e, public h
40
{
41
virtual void f();
42
virtual void g();
43
};
44
void d::f()
45
{
46
printf("d::f()\n");
47
}
48
49
void d::g()
50
{
51
printf("d::g()\n");
52
}
53
54
int main(int argc, char* argv[])
55
{
56
a* tmp = new d;
57
tmp->f();
58
return 0;
59
}