8sa1-gcc/gcc/testsuite/g++.old-deja/g++.mike/init1.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

26 lines
274 B
C

int count;
extern "C" void _exit(int);
struct C {
~C() { if (count != 1) _exit(1); }
} c;
class A {
public:
~A () { ++count; }
};
void f() {
static A a;
}
void g() {
// Since this isn't constructed, we can't destruct it.
static A a;
}
int main () {
f();
}