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
Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git]
/
old-autovect-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
net17.C
blob
56a3c24f3f787caefb82d848c16e5f4fab1e8c4a
1
// { dg-do run }
2
// example from the ARM page 292 and 293
3
4
extern "C" int printf(const char *, ...);
5
extern "C" void exit(int);
6
7
int i = 0;
8
9
class A {
10
public:
11
A() {
12
printf("Doing A\n");
13
if (++i != 1)
14
exit(1);
15
}
16
};
17
18
class B {
19
public:
20
B() {
21
printf("Doing B\n");
22
if (++i != 2)
23
exit(1);
24
}
25
};
26
27
class C : public virtual A, public virtual B {
28
public:
29
C() {
30
printf("Doing C\n");
31
if (++i != 3)
32
exit(1);
33
}
34
};
35
36
class D : public virtual B, public virtual A {
37
public:
38
D() {
39
printf("Doing D\n");
40
if (++i != 4)
41
exit(1);
42
}
43
};
44
45
class E : public C, public D {
46
public:
47
E() {
48
printf("Doing E\n");
49
if (++i != 5)
50
exit(1);
51
}
52
} e;
53
54
55
int main() {
56
if (++i != 6)
57
exit(1);
58
return 0;
59
}