1 // The standard says that a1 should be destroyed before a0 even though
2 // that isn't reverse order of construction. We need to move
3 // __cxa_thread_atexit into glibc to get this right.
6 // { dg-require-effective-target c++11 }
7 // { dg-add-options tls }
8 // { dg-require-effective-target tls_runtime }
9 // { dg-xfail-run-if "" { { hppa*-*-hpux* *-*-solaris* } || { newlib } } }
11 extern "C" void abort();
12 extern "C" int printf (const char *, ...);
18 A(int i): i(i) { printf ("A(%d)\n", i); ++c; }
19 ~A() { printf("~A(%d)\n", i); if (i != --c) abort(); }