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