From patchwork Tue Jan 8 15:45:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 210427 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B31942C009B for ; Wed, 9 Jan 2013 02:46:27 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1358264788; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=04QivmSYQYoKyaraLYz+XBqJq1E=; b=SbbIY/Zx9hy74eR a9BaPWyZbMt9LzWb53HD6/2FrTduhmO4mC9gvIphgHYDK7vv6rG+pDnkXDhrAtaE PUFO0EvE+TQdNQgUF2dTWq7j/QOeksGRVO6LgHMyFuxjKfc37ef421ZUt4TOCZ1c VmSJqu+RYYgLeF2OsbakxzCzYOL8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=YFoO5lWXCcFI39kmFbGSpurYmLjm3zj7ksI+bt/6/syk0kqpmRUoGDSLwjfvqu 83GhjxETx/2X9hNlmAA6Nvpfis71pvH71e0xsuRe5xmlWiT8pUiDGEeOuifWUjZI tWFPYs5AQWu134SI+e2vZVUv0n80phplFkPTypXKxv4/M=; Received: (qmail 699 invoked by alias); 8 Jan 2013 15:46:18 -0000 Received: (qmail 686 invoked by uid 22791); 8 Jan 2013 15:46:16 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_CX X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Jan 2013 15:46:04 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 7A214608; Tue, 8 Jan 2013 16:46:02 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8twKUTAWpEjk; Tue, 8 Jan 2013 16:45:57 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 24B63607; Tue, 8 Jan 2013 16:45:57 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id r08FjuIj008179; Tue, 8 Jan 2013 16:45:56 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [testsuite] Fix g++.dg/tls/thread_local* on Solaris 9 Date: Tue, 08 Jan 2013 16:45:55 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org I'm seeing various failures in the g++.dg/tls/thread_local* tests on Solaris 9: With Sun as, I have XPASS: g++.dg/tls/thread_local-cse.C execution test XPASS: g++.dg/tls/thread_local2.C execution test XPASS: g++.dg/tls/thread_local2g.C execution test XPASS: g++.dg/tls/thread_local6.C execution test on both SPARC and x86. The Solaris 9 with as configuration uses emutls. These errors are due to Eric's patch 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. The XFAILs are wrong, instead one just needs to use dg-add-options tls, which the patch below does. Solaris 9/x86 with as also has FAIL: g++.dg/tls/thread_local-wrap4.C scan-assembler-not _ZTW1i@PLT The difference between the as and gas outputs is -.LCFI2: - call .LPR3 - addl $_GLOBAL_OFFSET_TABLE_, %ebx - call _ZTW1i@PLT + call _ZTW1i No idea how best to handle this. On Solaris 9, 10, and 11/x86 with gas and gld, I find FAIL: g++.dg/tls/thread_local-order1.C execution test FAIL: g++.dg/tls/thread_local3g.C -std=gnu++11 execution test FAIL: g++.dg/tls/thread_local4g.C -std=gnu++11 execution test FAIL: g++.dg/tls/thread_local5g.C -std=gnu++11 execution test FAIL: g++.dg/tls/thread_local6g.C execution test This happens (as in two other testcases, cf. PR c++/51923) since the dg-require-cxa-atexit test passes on Solaris with gld though the platform doesn't have __cxa_atexit and I'm ignoring it for now. The patch below adds the missing dg-add-options tls in all run tests, not just the immediately affected ones. Tested with the appropriate runtest invocations on {i386-pc,sparc-sun}-solaris2.{9,10} and x86_64-unknown-linux-gnu. Ok for mainline? Rainer 2013-01-08 Rainer Orth * g++.dg/tls/thread_local-cse.C: Don't xfail on *-*-solaris2.9. Add tls options. * g++.dg/tls/thread_local2.C: Likewise. * g++.dg/tls/thread_local2g.C: Likewise. * g++.dg/tls/thread_local6.C: Likewise. * g++.dg/tls/thread_local-order1.C: Add tls options. * g++.dg/tls/thread_local-order2.C: Likewise. * g++.dg/tls/thread_local3.C: Likewise. * g++.dg/tls/thread_local3g.C: Likewise. * g++.dg/tls/thread_local4.C: Likewise. * g++.dg/tls/thread_local4g.C: Likewise. * g++.dg/tls/thread_local5.C: Likewise. * g++.dg/tls/thread_local5g.C: Likewise. * g++.dg/tls/thread_local6g.C: Likewise. # HG changeset patch # Parent 7eebbf02cdbac34362d53d0bfa39b375afefb2e3 Fix g++.dg/tls/thread_local* on Solaris 9 diff --git a/gcc/testsuite/g++.dg/tls/thread_local-cse.C b/gcc/testsuite/g++.dg/tls/thread_local-cse.C --- a/gcc/testsuite/g++.dg/tls/thread_local-cse.C +++ b/gcc/testsuite/g++.dg/tls/thread_local-cse.C @@ -1,7 +1,8 @@ // Test for CSE of the wrapper function: we should only call it once // for the two references to ir. -// { dg-do run { xfail *-*-solaris2.9 } } +// { dg-do run } // { dg-options "-std=c++11 -O -fno-inline -save-temps" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-alias } // { dg-final { scan-assembler-times "call *_ZTW2ir" 1 { xfail *-*-* } } } diff --git a/gcc/testsuite/g++.dg/tls/thread_local-order1.C b/gcc/testsuite/g++.dg/tls/thread_local-order1.C --- a/gcc/testsuite/g++.dg/tls/thread_local-order1.C +++ b/gcc/testsuite/g++.dg/tls/thread_local-order1.C @@ -1,5 +1,6 @@ // { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-alias } // { dg-require-cxa-atexit "" } diff --git a/gcc/testsuite/g++.dg/tls/thread_local-order2.C b/gcc/testsuite/g++.dg/tls/thread_local-order2.C --- a/gcc/testsuite/g++.dg/tls/thread_local-order2.C +++ b/gcc/testsuite/g++.dg/tls/thread_local-order2.C @@ -4,6 +4,7 @@ // { dg-do run { xfail *-*-* } } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-alias } diff --git a/gcc/testsuite/g++.dg/tls/thread_local2.C b/gcc/testsuite/g++.dg/tls/thread_local2.C --- a/gcc/testsuite/g++.dg/tls/thread_local2.C +++ b/gcc/testsuite/g++.dg/tls/thread_local2.C @@ -1,5 +1,6 @@ -// { dg-do run { xfail *-*-solaris2.9 } } +// { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } extern "C" void abort(); diff --git a/gcc/testsuite/g++.dg/tls/thread_local2g.C b/gcc/testsuite/g++.dg/tls/thread_local2g.C --- a/gcc/testsuite/g++.dg/tls/thread_local2g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local2g.C @@ -1,5 +1,6 @@ -// { dg-do run { xfail *-*-solaris2.9 } } +// { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-alias } diff --git a/gcc/testsuite/g++.dg/tls/thread_local3.C b/gcc/testsuite/g++.dg/tls/thread_local3.C --- a/gcc/testsuite/g++.dg/tls/thread_local3.C +++ b/gcc/testsuite/g++.dg/tls/thread_local3.C @@ -3,6 +3,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-options -pthread } +// { dg-add-options tls } int c; int d; diff --git a/gcc/testsuite/g++.dg/tls/thread_local3g.C b/gcc/testsuite/g++.dg/tls/thread_local3g.C --- a/gcc/testsuite/g++.dg/tls/thread_local3g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local3g.C @@ -5,6 +5,7 @@ // { dg-require-alias } // { dg-require-cxa-atexit "" } // { dg-options -pthread } +// { dg-add-options tls } int c; int d; diff --git a/gcc/testsuite/g++.dg/tls/thread_local4.C b/gcc/testsuite/g++.dg/tls/thread_local4.C --- a/gcc/testsuite/g++.dg/tls/thread_local4.C +++ b/gcc/testsuite/g++.dg/tls/thread_local4.C @@ -5,6 +5,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-options -pthread } +// { dg-add-options tls } #include #include diff --git a/gcc/testsuite/g++.dg/tls/thread_local4g.C b/gcc/testsuite/g++.dg/tls/thread_local4g.C --- a/gcc/testsuite/g++.dg/tls/thread_local4g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local4g.C @@ -7,6 +7,7 @@ // { dg-require-alias } // { dg-require-cxa-atexit "" } // { dg-options -pthread } +// { dg-add-options tls } #include #include diff --git a/gcc/testsuite/g++.dg/tls/thread_local5.C b/gcc/testsuite/g++.dg/tls/thread_local5.C --- a/gcc/testsuite/g++.dg/tls/thread_local5.C +++ b/gcc/testsuite/g++.dg/tls/thread_local5.C @@ -5,6 +5,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-options -pthread } +// { dg-add-options tls } #include #include diff --git a/gcc/testsuite/g++.dg/tls/thread_local5g.C b/gcc/testsuite/g++.dg/tls/thread_local5g.C --- a/gcc/testsuite/g++.dg/tls/thread_local5g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local5g.C @@ -7,6 +7,7 @@ // { dg-require-alias } // { dg-require-cxa-atexit "" } // { dg-options -pthread } +// { dg-add-options tls } #include #include diff --git a/gcc/testsuite/g++.dg/tls/thread_local6.C b/gcc/testsuite/g++.dg/tls/thread_local6.C --- a/gcc/testsuite/g++.dg/tls/thread_local6.C +++ b/gcc/testsuite/g++.dg/tls/thread_local6.C @@ -1,7 +1,8 @@ // Test for cleanups in the main thread without -pthread. -// { dg-do run { xfail *-*-solaris2.9 } } +// { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } extern "C" void _exit (int); diff --git a/gcc/testsuite/g++.dg/tls/thread_local6g.C b/gcc/testsuite/g++.dg/tls/thread_local6g.C --- a/gcc/testsuite/g++.dg/tls/thread_local6g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local6g.C @@ -2,6 +2,7 @@ // { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-cxa-atexit "" } // { dg-require-alias }