From: Jonathan Wakely <jwakely@redhat.com>
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 [thread overview]
Message-ID: <20230915232009.2348586-11-jwakely@redhat.com> (raw)
In-Reply-To: <20230915232009.2348586-1-jwakely@redhat.com>
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
// <http://www.gnu.org/licenses/>.
-// { 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 <thread>
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
// <http://www.gnu.org/licenses/>.
-// { 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
// <http://www.gnu.org/licenses/>.
-// { 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
// <http://www.gnu.org/licenses/>.
-// { 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
prev parent reply other threads:[~2023-09-15 23:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 23:18 [committed 01/11] libstdc++: Remove dg-options "-std=gnu++20" from <atomic> tests Jonathan Wakely
2023-09-15 23:18 ` [committed 02/11] libstdc++: Remove dg-options "-std=gnu++20" from <compare> tests Jonathan Wakely
2023-09-15 23:18 ` [committed 03/11] libstdc++: Remove dg-options "-std=gnu++20" from 20_utils tests Jonathan Wakely
2023-09-15 23:18 ` [committed 04/11] libstdc++: Remove dg-options "-std=gnu++20" from 21_strings tests Jonathan Wakely
2023-09-15 23:18 ` [committed 05/11] libstdc++: Remove dg-options "-std=gnu++20" from 23_containers tests Jonathan Wakely
2023-09-15 23:18 ` [committed 06/11] libstdc++: Remove dg-options "-std=gnu++20" from 24_iterators tests Jonathan Wakely
2023-09-15 23:18 ` [committed 07/11] libstdc++: Remove dg-options "-std=gnu++20" from 26_numerics tests Jonathan Wakely
2023-09-15 23:18 ` [committed 08/11] libstdc++: Remove dg-options "-std=gnu++20" from 27_io tests Jonathan Wakely
2023-09-15 23:18 ` [committed 09/11] libstdc++: Remove dg-options "-std=gnu++20" from 30_threads tests Jonathan Wakely
2023-09-15 23:18 ` [committed 10/11] libstdc++: Remove dg-options "-std=gnu++20" from remaining tests Jonathan Wakely
2023-09-15 23:18 ` Jonathan Wakely [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230915232009.2348586-11-jwakely@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).