From patchwork Mon Nov 19 18:54:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [testsuite] Adjust recent g++.dg/tls/thread_local testcases Date: Mon, 19 Nov 2012 08:54:10 -0000 From: Eric Botcazou X-Patchwork-Id: 200136 Message-Id: <2003369.X5PnAZSOPu@polaris> To: gcc-patches@gcc.gnu.org 5 of them fail on Solaris 9 and 10 because they require __cxa_atexit to pass. And 4 others fail on Solaris 9 only because of a TLS initialization failure. Adjusted thus, tested on SPARC/Solaris 9, SPARC/Solaris 10 and x86-64/Linux, applied on the mainline. 2012-11-19 Eric Botcazou * g++.dg/tls/thread_local-order1.C: Add dg-require-cxa-atexit. * g++.dg/tls/thread_local3g.C: Likewise. * g++.dg/tls/thread_local4g.C: Likewise. * g++.dg/tls/thread_local5g.C: Likewise. * g++.dg/tls/thread_local6g.C: Likewise. * g++.dg/tls/thread_local-cse.C: XFAIL on Solaris 9. * g++.dg/tls/thread_local2.C: Likewise. * g++.dg/tls/thread_local2g.C: Likewise. * g++.dg/tls/thread_local6.C: Likewise. Index: g++.dg/tls/thread_local2.C =================================================================== --- g++.dg/tls/thread_local2.C (revision 193619) +++ g++.dg/tls/thread_local2.C (working copy) @@ -1,4 +1,4 @@ -// { dg-do run } +// { dg-do run { xfail *-*-solaris2.9 } } // { dg-options "-std=c++11" } // { dg-require-effective-target tls_runtime } Index: g++.dg/tls/thread_local6.C =================================================================== --- g++.dg/tls/thread_local6.C (revision 193619) +++ g++.dg/tls/thread_local6.C (working copy) @@ -1,6 +1,6 @@ // Test for cleanups in the main thread without -pthread. -// { dg-do run } +// { dg-do run { xfail *-*-solaris2.9 } } // { dg-options "-std=c++11" } // { dg-require-effective-target tls_runtime } Index: g++.dg/tls/thread_local3g.C =================================================================== --- g++.dg/tls/thread_local3g.C (revision 193619) +++ g++.dg/tls/thread_local3g.C (working copy) @@ -3,6 +3,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-require-alias } +// { dg-require-cxa-atexit "" } // { dg-options -pthread } int c; Index: g++.dg/tls/thread_local5g.C =================================================================== --- g++.dg/tls/thread_local5g.C (revision 193619) +++ g++.dg/tls/thread_local5g.C (working copy) @@ -5,6 +5,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-require-alias } +// { dg-require-cxa-atexit "" } // { dg-options -pthread } #include Index: g++.dg/tls/thread_local2g.C =================================================================== --- g++.dg/tls/thread_local2g.C (revision 193619) +++ g++.dg/tls/thread_local2g.C (working copy) @@ -1,4 +1,4 @@ -// { dg-do run } +// { dg-do run { xfail *-*-solaris2.9 } } // { dg-options "-std=c++11" } // { dg-require-effective-target tls_runtime } // { dg-require-alias } Index: g++.dg/tls/thread_local-order1.C =================================================================== --- g++.dg/tls/thread_local-order1.C (revision 193619) +++ g++.dg/tls/thread_local-order1.C (working copy) @@ -2,6 +2,7 @@ // { dg-options "-std=c++11" } // { dg-require-effective-target tls_runtime } // { dg-require-alias } +// { dg-require-cxa-atexit "" } extern "C" void abort(); extern "C" int printf (const char *, ...); Index: g++.dg/tls/thread_local4g.C =================================================================== --- g++.dg/tls/thread_local4g.C (revision 193619) +++ g++.dg/tls/thread_local4g.C (working copy) @@ -5,6 +5,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-require-alias } +// { dg-require-cxa-atexit "" } // { dg-options -pthread } #include Index: g++.dg/tls/thread_local6g.C =================================================================== --- g++.dg/tls/thread_local6g.C (revision 193619) +++ g++.dg/tls/thread_local6g.C (working copy) @@ -3,6 +3,7 @@ // { dg-do run } // { dg-options "-std=c++11" } // { dg-require-effective-target tls_runtime } +// { dg-require-cxa-atexit "" } // { dg-require-alias } extern "C" void _exit (int); Index: g++.dg/tls/thread_local-cse.C =================================================================== --- g++.dg/tls/thread_local-cse.C (revision 193619) +++ g++.dg/tls/thread_local-cse.C (working copy) @@ -1,6 +1,6 @@ // Test for CSE of the wrapper function: we should only call it once // for the two references to ir. -// { dg-do run } +// { dg-do run { xfail *-*-solaris2.9 } } // { dg-options "-std=c++11 -O -fno-inline -save-temps" } // { dg-require-effective-target tls_runtime } // { dg-require-alias }