1 // Test for cleanups in the main thread, too.
4 // { dg-require-effective-target c++11 }
5 // { dg-require-effective-target unwrapped }
6 // { dg-require-effective-target tls_runtime }
7 // { dg-require-effective-target pthread }
8 // { dg-options -pthread }
9 // { dg-add-options tls }
30 void *thread_main(void *)
40 pthread_create (&thread, 0, thread_main, 0);
41 pthread_join(thread, 0);
42 pthread_create (&thread, 0, thread_main, 0);
43 pthread_join(thread, 0);
45 // The dtor for a in the main thread is run after main exits, so we
46 // return 1 now and override the return value with _exit above.