1 // Some targets (e.g. those with "set_board_info needs_status_wrapper 1"
2 // in their dejagnu baseboard description) require that the status is
3 // final when exit is entered (or main returns), and not "overruled" by a
4 // destructor calling _exit. It's not really worth it to handle that.
6 // Any platform that doesn't have proper __cxa_atexit support will also fail.
9 // { dg-require-effective-target unwrapped }
10 // { dg-require-effective-target cxa_atexit }
13 extern "C" void _exit (int);
21 ~Foo2() { if (++cnt == 2) _exit (0); }
24 static Foo2& GetFoo2()
34 ~Foo1() { if (++cnt != 1) abort(); GetFoo2(); }
37 int main( int argc, const char* argv[] )
39 static Foo1 anotherFoo;