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
Sync usage with man page.
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
init
/
dtor1.C
blob
624433897f07cedd21a383bbd4917d41d3046a3a
1
// { dg-do run }
2
3
extern "C" void abort ();
4
5
int d = 5;
6
7
struct B
8
{
9
int x;
10
B (int i) : x (i) { }
11
~B () { if (d-- != x) abort (); }
12
};
13
14
struct C1 : public B {
15
C1 (int i) : B (i) {}
16
};
17
18
struct C2 : public B {
19
C2 (int i) : B (i) {}
20
};
21
22
struct D : public B {
23
D (int i) : B (i) {}
24
};
25
26
struct E : public B {
27
E (int i) : B (i) {}
28
};
29
30
struct A
31
: public C1, C2, virtual public D, virtual public E
32
{
33
A () : D (0), E (1), C1 (2), C2 (3), x1(4), x2(5) {}
34
B x1;
35
B x2;
36
};
37
38
39
int main ()
40
{
41
A a;
42
return 0;
43
}