2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / init1.C
blob5bc1ea4a9ac975e767fee09e3f53f15911720ee3
1 // The VxWorks kernel has no implementation of atexit, so local statics
2 // are never destroyed. 
3 // { dg-do run { xfail vxworks_kernel } }
4 int count;
6 extern "C" void _exit(int);
8 struct C {
9   ~C() { if (count != 1) _exit(1); }
10 } c;
12 class A {
13 public:
14   ~A () { ++count; }
17 void f() {
18   static A a;
21 void g() {
22   // Since this isn't constructed, we can't destruct it.
23   static A a;
26 int main () {
27   f();