1 // Test for cleanups in the main thread without -pthread.
4 // { dg-options "-std=c++11" }
5 // { dg-require-effective-target tls_runtime }
6 // { dg-require-cxa-atexit "" }
7 // { dg-require-alias }
9 extern "C" void _exit (int);
15 ~A() { if (c == 1) _exit(0); }
20 void *thread_main(void *)
29 // The dtor for a in the main thread is run after main exits, so we
30 // return 1 now and override the return value with _exit above.