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;
5 
6 extern "C" void _exit(int);
7 
8 struct C {
~CC9   ~C() { if (count != 1) _exit(1); }
10 } c;
11 
12 class A {
13 public:
~A()14   ~A () { ++count; }
15 };
16 
f()17 void f() {
18   static A a;
19 }
20 
g()21 void g() {
22   // Since this isn't constructed, we can't destruct it.
23   static A a;
24 }
25 
main()26 int main () {
27   f();
28 }
29