From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C98F0385CC86 for ; Fri, 15 Sep 2023 23:20:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C98F0385CC86 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694820024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bZhEnIsnWhDZ2ptYuYG/N58hLJL8OUSUAdOinC5eI+k=; b=CDfKBIsftUkXDTJRmeCTHSxMF6Gch1RCml0LGhgNnGOZKrGldqG0W5lgLsTszKxPb7QCMh IGCMRP4NPth0ZJpS9hN/s8v5WqsRmUKTECHE6Jne40WaSZAraCtfoRjmtVE079/8WoI4dD aoR3UPCzSOtojTrsIrxg+9wwRTSzfNg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-113-jlYjs8L3O8ySYijfk-dMlg-1; Fri, 15 Sep 2023 19:20:22 -0400 X-MC-Unique: jlYjs8L3O8ySYijfk-dMlg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5BDF4811E7E; Fri, 15 Sep 2023 23:20:22 +0000 (UTC) Received: from localhost (unknown [10.42.28.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F07621B20B1; Fri, 15 Sep 2023 23:20:22 +0000 (UTC) From: Jonathan Wakely To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [committed 11/11] libstdc++: Do not require effective target pthread for some tests Date: Sat, 16 Sep 2023 00:18:59 +0100 Message-ID: <20230915232009.2348586-11-jwakely@redhat.com> In-Reply-To: <20230915232009.2348586-1-jwakely@redhat.com> References: <20230915232009.2348586-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,URI_HEX autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested aarch64-linux. Pushed to trunk. -- >8 -- We can remove { dg-require-effective-target pthread } and allow these tests non-pthread targets and conditionally adding -pthread only for pthread targets. Also remove the { dg-options "-std=gnu++20" } that is no longer needed. libstdc++-v3/ChangeLog: * testsuite/29_atomics/atomic_ref/wait_notify.cc: Do not restrict to pthreads targets. * testsuite/30_threads/jthread/3.cc: Likewise. * testsuite/30_threads/semaphore/100806.cc: Likewise. * testsuite/30_threads/semaphore/try_acquire.cc: Likewise. * testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise. * testsuite/30_threads/semaphore/try_acquire_posix.cc: Likewise. --- libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/jthread/3.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/semaphore/100806.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc | 5 ++--- .../testsuite/30_threads/semaphore/try_acquire_for.cc | 5 ++--- .../testsuite/30_threads/semaphore/try_acquire_posix.cc | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc b/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc index ede46467dac..05316f7a15e 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc @@ -1,6 +1,5 @@ -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } diff --git a/libstdc++-v3/testsuite/30_threads/jthread/3.cc b/libstdc++-v3/testsuite/30_threads/jthread/3.cc index ef0252a678f..796481c5ef6 100644 --- a/libstdc++-v3/testsuite/30_threads/jthread/3.cc +++ b/libstdc++-v3/testsuite/30_threads/jthread/3.cc @@ -15,9 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do compile { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do compile { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } #include diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/100806.cc b/libstdc++-v3/testsuite/30_threads/semaphore/100806.cc index 2fa2628a278..c770f05be00 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/100806.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/100806.cc @@ -1,6 +1,5 @@ -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc index b9661aa8fa2..082ab17dd16 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc @@ -15,9 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc index 250bfe37f7e..901e15c08ed 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc @@ -15,9 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc index a8f0fe3ad2c..8828212ed61 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc @@ -15,9 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } -- 2.41.0