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
Dead
[official-gcc.git]
/
gomp-20050608-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
init1.C
blob
0b47fb7e7059f27a06982f7f246de1f8d6e79a39
1
// { dg-do run }
2
int count;
3
4
extern "C" void _exit(int);
5
6
struct C {
7
~C() { if (count != 1) _exit(1); }
8
} c;
9
10
class A {
11
public:
12
~A () { ++count; }
13
};
14
15
void f() {
16
static A a;
17
}
18
19
void g() {
20
// Since this isn't constructed, we can't destruct it.
21
static A a;
22
}
23
24
int main () {
25
f();
26
}