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
/
mi1.C
blob
0f5880dc145b38b512b965aca4a5e3c038637d7a
1
// Special g++ Options: -w
2
3
class A {
4
public:
5
virtual ~A(){};
6
virtual int type(void) {
7
return -1;
8
}
9
};
10
11
class B : public A {
12
public:
13
virtual ~B(){};
14
};
15
16
17
class C0 : public B, public virtual A {
18
public:
19
virtual int type(void) {
20
return 0;
21
}
22
};
23
24
class C1 : public C0
25
{
26
public:
27
virtual int type(void) {
28
return 1;
29
}
30
};
31
32
class C2 : public C0 {
33
public:
34
virtual int type(void) {
35
return 2;
36
}
37
};
38
39
main() {
40
C1 *one = new C1;
41
42
if (one->type() != 1)
43
return 1;
44
}