diff mbox series

[committed,6/9] libstdc++: Remove redundant -std=gnu++17 options from strings tests

Message ID 20210510152927.GM3008@redhat.com
State New
Headers show
Series [committed,1/9] libstdc++: Remove redundant -std=gnu++17 options from PSTL tests | expand

Commit Message

Jonathan Wakely May 10, 2021, 3:29 p.m. UTC
GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

Tested powerpc64le-linux. Committed to trunk.
diff mbox series

Patch

commit 8087e70267ce6fa0787152963339ba987e7b514d
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon May 10 16:22:53 2021

    libstdc++: Remove redundant -std=gnu++17 option from strings tests
    
    GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
    dg-options directive prevents running these tests with different modes
    such as -std=c++17 or -std=gnu++20.
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/21_strings/basic_string/79162.cc: Remove
            -std=gnu++17 from dg-options directive.
            * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
            * testsuite/21_strings/basic_string/cons/char/79162.cc:
            Likewise.
            * testsuite/21_strings/basic_string/cons/char/86138.cc:
            Likewise.
            * testsuite/21_strings/basic_string/cons/char/9.cc: Likewise.
            * testsuite/21_strings/basic_string/cons/char/deduction.cc:
            Likewise.
            * testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc:
            Likewise.
            * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
            * testsuite/21_strings/basic_string/cons/wchar_t/79162.cc:
            Likewise.
            * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc:
            Likewise.
            * testsuite/21_strings/basic_string/cons/wchar_t/9.cc: Likewise.
            * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
            Likewise.
            * testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
            Likewise.
            * testsuite/21_strings/basic_string/hash/hash.cc: Likewise.
            * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
            * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
            * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
            Likewise.
            * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
            Likewise.
            * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
            Likewise.
            * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
            Likewise.
            * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
            Likewise.
            * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operations/data/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operations/find/char/5.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operators/char/5.cc:
            Likewise.
            * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/capacity/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/capacity/empty_neg.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/cons/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/cons/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/cons/char/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/include.cc: Likewise.
            * testsuite/21_strings/basic_string_view/inserters/94051.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/literals/types.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/literals/values.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/compare/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/copy/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/substr/char/83511.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/83511.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operators/char/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
            Likewise.
            * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
            * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
            * testsuite/21_strings/char_traits/requirements/char/99181.cc:
            Likewise.
            * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:

diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/79162.cc b/libstdc++-v3/testsuite/21_strings/basic_string/79162.cc
index 0f296f4770a..9b639b701fc 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/79162.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/79162.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2017-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/7.cc
index 0119855636d..e5261f8e02f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/7.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/7.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/79162.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/79162.cc
index 3e315ec894d..0492dbbc2bd 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/79162.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/79162.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
index bd40cab3a16..134b7ef9a5a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 // { dg-final { scan-assembler-not "_ZNSs4_Rep20_S_empty_rep_storageE:" } }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/9.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/9.cc
index ccb7431f427..d8718e23167 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/9.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/9.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/deduction.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/deduction.cc
index 49d42cdef4b..de4748ec5f7 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/deduction.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/deduction.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc
index 5d577dbdc57..1caedcccfce 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2011-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/7.cc
index aef1b4a8ebc..da8a26a52d4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/7.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/79162.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/79162.cc
index 3e315ec894d..0492dbbc2bd 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/79162.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/79162.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
index dffd521f3be..d63d9006c33 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 // { dg-final { scan-assembler-not "_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE:" } }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/9.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/9.cc
index 483768327e3..42e3484d48d 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/9.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc
index 19bb988d7bc..5262869db74 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc
index 1e994be2176..d3e4744ff34 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2011-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/hash/hash.cc b/libstdc++-v3/testsuite/21_strings/basic_string/hash/hash.cc
index 03fecadc129..e5d0a4dc5ee 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/hash/hash.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/hash/hash.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/lwg2758.cc b/libstdc++-v3/testsuite/21_strings/basic_string/lwg2758.cc
index 0f8a2e8592c..9201785c266 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/lwg2758.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/lwg2758.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/lwg2946.cc b/libstdc++-v3/testsuite/21_strings/basic_string/lwg2946.cc
index 8dc2fafe858..15c4167d048 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/lwg2946.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/lwg2946.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2017-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc
index fd511bcb231..472b06ed6c6 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc
index 7dcefae5492..995ec481b46 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc
index 5e5927b7e80..0866783f0b8 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc
index 9b25974c5d3..4f9287449f3 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc
index 6e1c8727bb3..b47542946c9 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc
index ebb5bba1b2c..38cf5bbc74a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc
index 9a27d6f598b..ab17b263793 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc
index 99568bacb5e..4fdc4ef659a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc
index afb58580322..84c458707bf 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc
index f6708ad89c9..40a92f710f4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/2.cc
index edd7029a707..4c654fe7452 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/2.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // C++17 21.3.1.7 [string.ops] string operations
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc
index 92ba287aefe..50433477400 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // PR libstdc++/86169
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc
index 7099695e739..fc3cc1c512c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // C++17 21.3.1.7 [string.ops] string operations
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc
index 54ab1ec9b5d..b98d546a1b4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc
index c2ce143cd96..5afb80a3592 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/5.cc
index 435a1ce7e78..58f6967f75a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/5.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/5.cc
index d362883e95f..e4508948c14 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/5.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/1.cc
index f0ae6f2de31..c61018174a6 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/empty_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/empty_neg.cc
index 1fda0952b04..71fb73f3465 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/empty_neg.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/empty_neg.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/1.cc
index 13d1e770c07..8b21a8be12f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/2.cc
index bda4da77616..c4867f8f04e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/3.cc
index f3bf986e058..0103e30ba8b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/nonnull.cc
index 6a30eacc709..b33af088a3d 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/nonnull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/nonnull.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -Wnonnull" }
+// { dg-options "-Wnonnull" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc
index 2e587a294bd..783ea2326dc 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc
index e6b55a9f28f..ceeed2caefa 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc
index 970abfd029c..eddd5218eb3 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc
index 23928ed6b66..4c1013177eb 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -Wnonnull" }
+// { dg-options "-Wnonnull" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/1.cc
index 80b46ed88cd..7551f71b91c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/2.cc
index 1604b5e8229..2c74568aebf 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/2.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -O0" }
+// { dg-options "-O0" }
 // { dg-do run { target c++17 } }
 // { dg-require-debug-mode "" }
 // { dg-xfail-run-if "expect debug mode assertion to fail" { *-*-* } }
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc
index 427eefbd9ee..0f731c9a485 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -D_GLIBCXX_ASSERTIONS" }
+// { dg-options "-D_GLIBCXX_ASSERTIONS" }
 // { dg-do compile { target c++17 xfail *-*-* } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc
index 9596c83154e..f8f9de9667a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc
index 85fcd0c63c6..5dd206f1a29 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -D_GLIBCXX_ASSERTIONS" }
+// { dg-options "-D_GLIBCXX_ASSERTIONS" }
 // { dg-do compile { target c++17 xfail *-*-* } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/empty.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/empty.cc
index 748429cb5c9..3be7e6c7448 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/empty.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/empty.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back.cc
index b7b5e4eba08..a8a68c3115f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-require-string-conversions "" }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc
index d4a04be0652..03190554a2f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc
index 40d3b2648ce..9c846116bb9 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -D_GLIBCXX_ASSERTIONS" }
+// { dg-options "-D_GLIBCXX_ASSERTIONS" }
 // { dg-do compile { target c++17 xfail *-*-* } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc
index 88f887da20f..aec3df446d8 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc
index f0fda1744ad..aeae1a2bef6 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -O0" }
+// { dg-options "-O0" }
 // { dg-do run { target c++17 } }
 // { dg-require-debug-mode "" }
 // { dg-xfail-run-if "expect debug mode assertion to fail" { *-*-* } }
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc
index e1d7236931c..26d2d4da54b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -D_GLIBCXX_ASSERTIONS" }
+// { dg-options "-D_GLIBCXX_ASSERTIONS" }
 // { dg-do compile { target c++17 xfail *-*-* } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc
index 4ed3742fefa..11a759ccbc2 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc
index 664652c5bfa..c853dada7dc 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -D_GLIBCXX_ASSERTIONS" }
+// { dg-options "-D_GLIBCXX_ASSERTIONS" }
 // { dg-do compile { target c++17 xfail *-*-* } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc
index cab5bc9be12..b5f10f426c8 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc
index d67a29b1b6a..8197f7ee072 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-require-string-conversions "" }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc
index bd32d88482a..fdcabd7363d 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -D_GLIBCXX_ASSERTIONS" }
+// { dg-options "-D_GLIBCXX_ASSERTIONS" }
 // { dg-do compile { target c++17 xfail *-*-* } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/include.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/include.cc
index 6dea6c4b44b..e9132540591 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/include.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/include.cc
@@ -19,7 +19,7 @@ 
 
 // NB: This issue affected only debug-mode.
 
-// { dg-options "-std=gnu++17 -fno-rtti" }
+// { dg-options "-fno-rtti" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/94051.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/94051.cc
index 74c3b22936b..60416dcbe3e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/94051.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/94051.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <iosfwd>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/1.cc
index 895fc9d168b..15ceeddf930 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/2.cc
index b808cf18105..ba1861bf065 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/2.cc
@@ -22,7 +22,6 @@ 
 // working, not to mention other major details like char_traits, and
 // all of the string_view class.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-require-fileio "" }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/3.cc
index ec1bb5dc239..eca66f652ed 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc
index 3dd056a9853..4dc9dd75139 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc
index 25177768cd9..35b7689c318 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc
index 2f424f27cec..566517d2303 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-require-fileio "" }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc
index cfcb8e84d20..08260a08e4b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/types-char8_t.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/types-char8_t.cc
index 3086f28262f..60713667c91 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/types-char8_t.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/types-char8_t.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -fchar8_t" }
+// { dg-options "-fchar8_t" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/types.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/types.cc
index 9a30a6cabee..8a562f0cf11 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/types.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/types.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/values-char8_t.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/values-char8_t.cc
index a491a4e9bf7..04550d6e669 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/values-char8_t.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/values-char8_t.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -fchar8_t" }
+// { dg-options "-fchar8_t" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/values.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/values.cc
index 447b12050e9..79033d8d7ea 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/values.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/literals/values.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc
index 112ff072a84..3ef4fe22a1f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc
index 3ff036fcb9b..ef1a26e8d9e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc
index 7fe9c41227b..5e49949a749 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc
index c546c113875..38e6770ef39 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc
index 3688c66944d..d4547cfeda7 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc
index 898faba8e59..0e4091fb6c4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc
index 5d64081ae8c..79baca278b4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc
index e58c94133a4..06a18b52b99 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/2.cc
index 0d46eddcea0..76f398cdf46 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/2.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc
index b5061111820..4cd71d6d677 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc
index 17ee76bbc6d..6cbd79ba334 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -Wnonnull" }
+// { dg-options "-Wnonnull" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc
index 978e70fc801..25132a5a371 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc
index f550ab1c76e..79c3d6351d7 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc
index 686838f6e54..4d0db13f73d 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc
index 3cca58caeb4..cfd2d56d93b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/2.cc
index 932918c6a12..6505f32fb4c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/2.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc
index f96a7df0fcc..d9482100ae2 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc
index 0031a4c5cae..9240e3ad952 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/char/1.cc
index 8a0dfd990bb..cce1105c255 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2014 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc
index f4c9a51cd50..6c6aee2efb7 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2014 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/1.cc
index 054329031f5..8e5692aa78c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/2.cc
index 750de8f8e93..185ee3e9547 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/3.cc
index 99d717c2f42..dc84c7d03ec 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/4.cc
index 61b6a4d7da2..ac635dc8527 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/4.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc
index 8e3edd02c3e..257bdcaf15e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -Wnonnull" }
+// { dg-options "-Wnonnull" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc
index 63e6eaaf7d5..e4be1aacd3c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc
index 70013e7fbcd..5bdf2107042 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc
index 24cd37271d4..1e12923f083 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc
index c873d2d4147..09e02e02e34 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc
index 909ca9693e1..03133b68754 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc
index 5040750c80f..a21e0de8303 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc
index f1eedc237d1..701b7226aa8 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc
index e75e96f678e..a2f2bf96720 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -Wnonnull" }
+// { dg-options "-Wnonnull" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc
index 38bf2c93afc..1521ff5e359 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc
index edf62afdc18..fd4e16085e4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc
index f67c2d76b7b..0c5e2de0606 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc
index 7125b41ae8f..4b8abb9d387 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2014-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/1.cc
index 4c6779c49f5..1bf4de383a7 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/83511.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/83511.cc
index 29514ecec94..c287f9b98ac 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/83511.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/83511.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2018-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc
index f801cc188ff..a1cc6ea46ba 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/83511.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/83511.cc
index f7e05e6f9e7..b8d53dfa07d 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/83511.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/83511.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2018-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/2.cc
index 43bc49e44e5..ef11c5e9819 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/89446.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/89446.cc
index 61e3051f292..3d21df83fb6 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/89446.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/89446.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -fexceptions -fnon-call-exceptions -O1" }
+// { dg-options "-fexceptions -fnon-call-exceptions -O1" }
 // { dg-do run { target { powerpc*-*-linux* i?86-*-linux* x86_64-*-linux* } } }
 // { dg-require-effective-target c++17 }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc
index e032c76bb61..f3394784adb 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc
index 2f3131f7fe9..d593627b4d1 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17 -fexceptions -fnon-call-exceptions -O1" }
+// { dg-options "-fexceptions -fnon-call-exceptions -O1" }
 // { dg-do run { target { powerpc*-*-linux* i?86-*-linux* x86_64-*-linux* } } }
 // { dg-require-effective-target c++17 }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/range_access/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/range_access/char/1.cc
index 3d398f48b5c..856aafde552 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/range_access/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/range_access/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc
index e557109af0c..c6d83c47bfd 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc
index 7457cfaa4bc..664fa07fd4f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc
@@ -20,7 +20,6 @@ 
 
 #include <string_view>
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 template class std::basic_string_view<int, std::char_traits<int>>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc
index 3b050020ba0..b5b246f7169 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc
index c444632ac52..abf26e1c4d7 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc
index 91bff846530..7f4956a289a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc
index 0206aca00dd..5b216c94a02 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -fchar8_t" }
+// { dg-options "-fchar8_t" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc
index f8c248da95f..f8f9637c750 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/traits_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/traits_neg.cc
index ecc12db0b86..a6cdf91efa5 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/traits_neg.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/traits_neg.cc
@@ -15,7 +15,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/typedefs.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/typedefs.cc
index 1171d3379fa..a3282fb0323 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/typedefs.cc
@@ -1,5 +1,4 @@ 
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2013-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/typedefs.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/typedefs.cc
index 855d3201a0e..26cbc203501 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/typedefs.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/typedefs.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2014-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/types/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/types/1.cc
index 6de859de3a8..f9d16acd786 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/types/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/types/1.cc
@@ -17,7 +17,6 @@ 
 // <http://www.gnu.org/licenses/>.
 //
 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/99181.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/99181.cc
index 01a70da046c..af690fcb525 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/99181.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/99181.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc
index 32e31e13abb..7db31031b8a 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2017-2021 Free Software Foundation, Inc.