repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
abi
/
vcall1.C
blob
00830cd23d6eded51c7cbdc081ce0def570f091e
1
// { dg-do run }
2
// { dg-options "-w" }
3
4
extern "C" void abort ();
5
6
struct B;
7
8
B* b;
9
10
struct A {
11
virtual void f () {}
12
};
13
14
struct B : virtual public A {
15
B () {
16
b = this;
17
((A*) this)->f ();
18
}
19
20
virtual void f () {
21
if (this != b)
22
abort ();
23
}
24
};
25
26
struct C : public B {
27
};
28
29
struct D : public C, public B {
30
virtual void f () {}
31
};
32
33
int main () {
34
D d;
35
}
36