diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
index 8346191412c00f47798f7afb6df7d90ad6760c2e..19efcadb7ec4ae5643b7968988e6112d2d003d03 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
@@ -1,6 +1,5 @@
-// { dg-do run }
+// { dg-do run { target c++11 } }
 // { dg-additional-options "-pthread" { target pthread } }
-// { dg-require-effective-target c++11 }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2023 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
index 20c910c2fcd99f4073e3e3e4b87abc4da268148d..af0e65e9469c11e06a0c33dc30e33325e2bc305b 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
@@ -17,10 +17,9 @@
 
 // 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
 
-// { dg-do run }
+// { dg-do run { target c++11 } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-add-options libatomic }
-// { dg-require-effective-target c++11 }
 // { dg-require-gthreads "" }
 // { dg-require-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
index d6c8611aa85b4da92477f698f913261f66977c58..07f7c49bf1008ae41ae26b85ca5b0068e641ae72 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
@@ -17,10 +17,9 @@
 
 // 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
 
-// { dg-do run }
+// { dg-do run { target c++11 } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-add-options libatomic }
-// { dg-require-effective-target c++11 }
 // { dg-require-gthreads "" }
 // { dg-require-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate.cc
index f9a4a2f36946f3fe9f0e0ff6f81115dd09b3d9af..822a410b6c2a18c2127f4be30511b4f6ec1d305f 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate_single.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate_single.cc
index a29575fdd80e1e4f38bb48b1da16cc0ba3e7a000..4acfde6e9d7b811de53110bba04967fc024fcbcd 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate_single.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate_single.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-require-effective-target c++17 }
+// { dg-do run { target c++17 } }
 // { dg-require-gthreads "" }
 
 // This runs the same tests as allocate.cc but without -pthread
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons.cc
index f8b74d9d8cc42e543b80ed0cebbf563db0cebc39..a3f98586684ac26d5ced000b039c227c43cc953d 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons_single.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons_single.cc
index ab215ba3c9354edb75be3977fc822809d5f9e2e8..9668a51c346b0b30b60a3e92721faa9c9af07058 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons_single.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons_single.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-require-effective-target c++17 }
+// { dg-do run { target c++17 } }
 // { dg-require-gthreads "" }
 
 // This runs the same tests as cons.cc but without -pthread
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/is_equal.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/is_equal.cc
index 5be6bd6966394fa23d18800245c4285a0e909223..aacf00b079cdd603bb47172800d925752d9708c1 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/is_equal.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/is_equal.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/multithreaded.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/multithreaded.cc
index a7283bf54053a1981e580f045585675de9b6a92c..7992367ffdaa91b3a18f9daffaf80e2cc747959f 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/multithreaded.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/multithreaded.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/options.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/options.cc
index a869b993ee30317a155a29d2ab7767c9763e799e..9d98b5038db94ca45188851b530010b223af9575 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/options.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/options.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release.cc
index d1c60432dd71b317908927a33bfbcbe9b67555f6..6752d6e270c9ce81a6d98f52c1b937b73e0b0e6c 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release_single.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release_single.cc
index f69e96034ad223285373834cd3d1a1f5b8d697d7..9645bc64c02c630979058eff9a24284b0d3ca5c0 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release_single.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release_single.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-require-effective-target c++17 }
+// { dg-do run { target c++17 } }
 // { dg-require-gthreads "" }
 
 // This runs the same tests as release.cc but without -pthread
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
index edebaa6acabaf6c22d6d13fda727fa9d37247ccf..bac1f3509b51d73f395b0a6064aeea1dcc6d3aef 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
@@ -15,11 +15,9 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -pthread" }
 // { dg-add-options libatomic }
-// { dg-do run }
-// { dg-require-effective-target c++2a }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++20 } }
+// { dg-additional-options "-pthread" { target pthread } }
 
 #include <condition_variable>
 #include <thread>
diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc
index f6162879e544a30b423a0722f02a94719d19b658..e780955dbecf5857f5c55cabc79c169d2e095b8f 100644
--- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc
+++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc
@@ -15,10 +15,9 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -pthread"  }
 // { dg-add-options libatomic }
-// { dg-require-effective-target c++2a }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++20 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <stop_token>
diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc
index 6bdd4d13f54f17f7434f71bf813b5d211a94d2f0..f13761ca0fe737d061d4943908ca7ba484f6555e 100644
--- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc
+++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc
@@ -15,10 +15,9 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -pthread"  }
 // { dg-add-options libatomic }
-// { dg-require-effective-target c++2a }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++20 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <stop_token>