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
decl.c (create_array_type_for_decl): Add location_t parameter and use it.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
mi1.C
blob
e5f01c4d6213a6053fd3ab77e4c64cf987c1664c
1
// { dg-do run }
2
// { dg-options "-w" }
3
4
class A {
5
public:
6
virtual ~A(){};
7
virtual int type(void) {
8
return -1;
9
}
10
};
11
12
class B : public A {
13
public:
14
virtual ~B(){};
15
};
16
17
18
class C0 : public B, public virtual A {
19
public:
20
virtual int type(void) {
21
return 0;
22
}
23
};
24
25
class C1 : public C0
26
{
27
public:
28
virtual int type(void) {
29
return 1;
30
}
31
};
32
33
class C2 : public C0 {
34
public:
35
virtual int type(void) {
36
return 2;
37
}
38
};
39
40
main() {
41
C1 *one = new C1;
42
43
if (one->type() != 1)
44
return 1;
45
}