]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Do not require effective target pthread for some tests
authorJonathan Wakely <jwakely@redhat.com>
Fri, 15 Sep 2023 13:49:36 +0000 (14:49 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 15 Sep 2023 23:10:46 +0000 (00:10 +0100)
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
libstdc++-v3/testsuite/30_threads/jthread/3.cc
libstdc++-v3/testsuite/30_threads/semaphore/100806.cc
libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc
libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc
libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc

index ede46467dac38055665a58102e8dc9d71f69d357..05316f7a15e7c5fb7d6544e537f556463bf1ce9c 100644 (file)
@@ -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 }
 
index ef0252a678f56cd759256a5bbe318fad5f956170..796481c5ef6b14d9821f187b2cbca7b48ccccd0f 100644 (file)
@@ -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>
index 2fa2628a27836cc0f27c6d7bf727cbac4e95123f..c770f05be009a60dfa53612f09f614f36d60b20d 100644 (file)
@@ -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 }
 
index b9661aa8fa20ae82482539c3aae4c34068a64523..082ab17dd16e469fcc31afda042524785ba95dda 100644 (file)
@@ -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 }
 
index 250bfe37f7eae646277c3a2ca74f81c796da219b..901e15c08ed3a921f79af597ecd63b29b940a777 100644 (file)
@@ -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 }
 
index a8f0fe3ad2c95bed9cf378e29afa73d761476a63..8828212ed61121a45648946d5c336cc40daf24fc 100644 (file)
@@ -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 }