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

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

Commit Message

H.J. Lu via Gcc-patches May 10, 2021, 3:30 p.m.
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.

Patch

commit 0498d2d09a2364aae1e6b5e085c8ebb8fc517684
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon May 10 16:22:54 2021

    libstdc++: Remove redundant -std=gnu++17 option from remaining 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/17_intro/headers/c++2017/all_attributes.cc: Remove
            -std=gnu++17 from dg-options directive.
            * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
            Likewise.
            * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
            Likewise.
            * testsuite/17_intro/headers/c++2017/operator_names.cc:
            Likewise.
            * testsuite/17_intro/headers/c++2017/parallel_mode.cc: Likewise.
            * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
            * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
            Likewise.
            * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Likewise.
            * testsuite/18_support/byte/81076.cc: Likewise.
            * testsuite/18_support/byte/global_neg.cc: Likewise.
            * testsuite/18_support/byte/ops.cc: Likewise.
            * testsuite/18_support/byte/requirements.cc: Likewise.
            * testsuite/18_support/headers/cfloat/values_c++17.cc: Likewise.
            * testsuite/18_support/launder/1.cc: Likewise.
            * testsuite/18_support/launder/nodiscard.cc: Likewise.
            * testsuite/18_support/launder/requirements.cc: Likewise.
            * testsuite/18_support/launder/requirements_neg.cc: Likewise.
            * testsuite/18_support/new_aligned.cc: Likewise.
            * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
            Likewise.
            * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
            Likewise.
            * testsuite/19_diagnostics/error_condition/hash.cc: Likewise.
            * testsuite/20_util/addressof/requirements/constexpr.cc:
            Likewise.
            * testsuite/20_util/as_const/1.cc: Likewise.
            * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
            * testsuite/20_util/bind/83427.cc: Likewise.
            * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
            * testsuite/20_util/bool_constant/requirements.cc: Likewise.
            * testsuite/20_util/duration/arithmetic/constexpr_c++17.cc:
            Likewise.
            * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
            Likewise.
            * testsuite/20_util/duration_cast/rounding.cc: Likewise.
            * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
            Likewise.
            * testsuite/20_util/from_chars/1_neg.cc: Likewise.
            * testsuite/20_util/from_chars/requirements.cc: Likewise.
            * testsuite/20_util/function/91456.cc: Likewise.
            * testsuite/20_util/function/cons/deduction.cc: Likewise.
            * testsuite/20_util/function_objects/83607.cc: Likewise.
            * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
            * testsuite/20_util/function_objects/mem_fn/80478.cc: Likewise.
            * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
            * testsuite/20_util/function_objects/not_fn/87538.cc: Likewise.
            * testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/has_unique_object_representations/requirements/typedefs.cc:
            Likewise.
            * testsuite/20_util/has_unique_object_representations/value.cc:
            Likewise.
            * testsuite/20_util/hash/nullptr.cc: Likewise.
            * testsuite/20_util/in_place/requirements.cc: Likewise.
            * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise.
            * testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/is_aggregate/requirements/typedefs.cc:
            Likewise.
            * testsuite/20_util/is_aggregate/value.cc: Likewise.
            * testsuite/20_util/is_invocable/83395.cc: Likewise.
            * testsuite/20_util/is_invocable/91456.cc: Likewise.
            * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/is_invocable/requirements/typedefs.cc:
            Likewise.
            * testsuite/20_util/is_invocable/value.cc: Likewise.
            * testsuite/20_util/is_literal_type/deprecated-1z.cc: Likewise.
            * testsuite/20_util/is_nothrow_constructible/94003.cc: Likewise.
            * testsuite/20_util/is_nothrow_invocable/83395.cc: Likewise.
            * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc: Likewise.
            * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
            * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
            Likewise.
            * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
            * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
            Likewise.
            * testsuite/20_util/is_nothrow_swappable_with/value.cc:
            Likewise.
            * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/is_swappable/requirements/typedefs.cc:
            Likewise.
            * testsuite/20_util/is_swappable/value.cc: Likewise.
            * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
            Likewise.
            * testsuite/20_util/is_swappable_with/value.cc: Likewise.
            * testsuite/20_util/logical_traits/83134.cc: Likewise.
            * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/20_util/logical_traits/requirements/typedefs.cc:
            Likewise.
            * testsuite/20_util/logical_traits/value.cc: Likewise.
            * testsuite/20_util/pair/cons/deduction.cc: Likewise.
            * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
            * testsuite/20_util/ratio/requirements/ratio_equal_v.cc:
            Likewise.
            * testsuite/20_util/reference_wrapper/83427.cc: Likewise.
            * testsuite/20_util/reference_wrapper/deduction.cc: Likewise.
            * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
            * testsuite/20_util/shared_ptr/cons/deduction.cc: Likewise.
            * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
            Likewise.
            * testsuite/20_util/time_point/arithmetic/constexpr.cc:
            Likewise.
            * testsuite/20_util/time_point_cast/rounding.cc: Likewise.
            * testsuite/20_util/to_chars/3.cc: Likewise.
            * testsuite/20_util/to_chars/chars_format.cc: Likewise.
            * testsuite/20_util/to_chars/lwg3266.cc: Likewise.
            * testsuite/20_util/to_chars/requirements.cc: Likewise.
            * testsuite/20_util/tuple/78939.cc: Likewise.
            * testsuite/20_util/tuple/apply/1.cc: Likewise.
            * testsuite/20_util/tuple/apply/2.cc: Likewise.
            * testsuite/20_util/tuple/cons/deduction.cc: Likewise.
            * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
            * testsuite/20_util/tuple/make_from_tuple/2.cc: Likewise.
            * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
            * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
            * testsuite/20_util/unique_ptr/cons/deduction_neg.cc: Likewise.
            * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
            Likewise.
            * testsuite/20_util/variable_templates_for_traits.cc: Likewise.
            * testsuite/20_util/void_t/1.cc: Likewise.
            * testsuite/20_util/weak_ptr/cons/deduction.cc: Likewise.
            * testsuite/24_iterators/container_access.cc: Likewise.
            * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
            Likewise.
            * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
            Likewise.
            * testsuite/24_iterators/range_access/range_access_cpp17.cc:
            Likewise.
            * testsuite/24_iterators/range_access/range_access_cpp17_neg.cc:
            Likewise.
            * testsuite/26_numerics/gcd/gcd_neg.cc: Likewise.
            * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
            Likewise.
            * testsuite/26_numerics/headers/cmath/hypot.cc: Likewise.
            * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
            Likewise.
            * testsuite/26_numerics/lcm/1.cc: Likewise.
            * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
            * testsuite/26_numerics/valarray/deduction.cc: Likewise.
            * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
            Likewise.
            * testsuite/27_io/manipulators/standard/char/quoted_sv.cc:
            Likewise.
            * testsuite/27_io/manipulators/standard/wchar_t/quoted_sv.cc:
            Likewise.
            * testsuite/27_io/types/4.cc: Likewise.
            * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
            * testsuite/libstdc++-prettyprinters/91997.cc: Likewise.
            * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.

diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
index b23bbb91bc8..c4e38d6423a 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.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 } }
 
 // Ensure the library only uses the __name__ form for attributes.
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_exceptions.cc
index d5b7ba9f0bf..2d13a9153a2 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_exceptions.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_exceptions.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -fno-exceptions" }
+// { dg-options "-fno-exceptions" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc
index 87e718ef7a4..dec97d47097 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -pedantic-errors" }
+// { dg-options "-pedantic-errors" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/operator_names.cc
index 155c97233f3..63b2918af75 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/operator_names.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/operator_names.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -fno-operator-names" }
+// { dg-options "-fno-operator-names" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/parallel_mode.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/parallel_mode.cc
index cabd552181b..a82fe4fe965 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/parallel_mode.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/parallel_mode.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-require-normal-mode "" }
 
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++.cc
index 90f85412ff8..3a63e513769 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++.cc
@@ -1,5 +1,4 @@ 
 // FreeBSD wants warning clean system headers:
-// { dg-options "-std=gnu++17" }
 // { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } }
 // { dg-do compile { target c++17 } }
 
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc
index 9e199f564ee..97c73ee959d 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc
@@ -1,5 +1,4 @@ 
 // FreeBSD wants warning clean system headers:
-// { dg-options "-std=gnu++17" }
 // { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } }
 // { dg-do compile { target c++17 } }
 
diff --git a/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc b/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc
index 76223cd2559..1ba58ff4d4c 100644
--- a/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc
+++ b/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.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 } }
 // { dg-require-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/18_support/byte/81076.cc b/libstdc++-v3/testsuite/18_support/byte/81076.cc
index 6c17e4bd3c4..7917dcb0cbd 100644
--- a/libstdc++-v3/testsuite/18_support/byte/81076.cc
+++ b/libstdc++-v3/testsuite/18_support/byte/81076.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 <cstddef>
diff --git a/libstdc++-v3/testsuite/18_support/byte/global_neg.cc b/libstdc++-v3/testsuite/18_support/byte/global_neg.cc
index c4d45d4bca1..fb1176f8496 100644
--- a/libstdc++-v3/testsuite/18_support/byte/global_neg.cc
+++ b/libstdc++-v3/testsuite/18_support/byte/global_neg.cc
@@ -15,7 +15,8 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
+// Use -O0 just do disable PCH, otherwise std::byte is declared.
+// { dg-options "-O0" }
 // { dg-do compile { target c++17 } }
 
 #include <stddef.h>
diff --git a/libstdc++-v3/testsuite/18_support/byte/ops.cc b/libstdc++-v3/testsuite/18_support/byte/ops.cc
index 36f66f4c24e..a8fcf08cfc0 100644
--- a/libstdc++-v3/testsuite/18_support/byte/ops.cc
+++ b/libstdc++-v3/testsuite/18_support/byte/ops.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 <cstddef>
diff --git a/libstdc++-v3/testsuite/18_support/byte/requirements.cc b/libstdc++-v3/testsuite/18_support/byte/requirements.cc
index 50a0f2132ef..516ac2c303c 100644
--- a/libstdc++-v3/testsuite/18_support/byte/requirements.cc
+++ b/libstdc++-v3/testsuite/18_support/byte/requirements.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 <cstddef>
diff --git a/libstdc++-v3/testsuite/18_support/headers/cfloat/values_c++17.cc b/libstdc++-v3/testsuite/18_support/headers/cfloat/values_c++17.cc
index f6a99c75d5d..e49a3a63178 100644
--- a/libstdc++-v3/testsuite/18_support/headers/cfloat/values_c++17.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/cfloat/values_c++17.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/18_support/launder/1.cc b/libstdc++-v3/testsuite/18_support/launder/1.cc
index f6722d09d87..2301631068f 100644
--- a/libstdc++-v3/testsuite/18_support/launder/1.cc
+++ b/libstdc++-v3/testsuite/18_support/launder/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 run { target c++17 } }
 
 #include <new>
diff --git a/libstdc++-v3/testsuite/18_support/launder/nodiscard.cc b/libstdc++-v3/testsuite/18_support/launder/nodiscard.cc
index 01c89690368..20bd195b259 100644
--- a/libstdc++-v3/testsuite/18_support/launder/nodiscard.cc
+++ b/libstdc++-v3/testsuite/18_support/launder/nodiscard.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 <new>
diff --git a/libstdc++-v3/testsuite/18_support/launder/requirements.cc b/libstdc++-v3/testsuite/18_support/launder/requirements.cc
index 039bfc39e68..8a17491f09f 100644
--- a/libstdc++-v3/testsuite/18_support/launder/requirements.cc
+++ b/libstdc++-v3/testsuite/18_support/launder/requirements.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 } }
 
 // NB: This file is for testing new with NO OTHER INCLUDES.
diff --git a/libstdc++-v3/testsuite/18_support/launder/requirements_neg.cc b/libstdc++-v3/testsuite/18_support/launder/requirements_neg.cc
index 62424c9a49b..f486f063238 100644
--- a/libstdc++-v3/testsuite/18_support/launder/requirements_neg.cc
+++ b/libstdc++-v3/testsuite/18_support/launder/requirements_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 <new>
diff --git a/libstdc++-v3/testsuite/18_support/new_aligned.cc b/libstdc++-v3/testsuite/18_support/new_aligned.cc
index b20bb8855b4..b3943a47c23 100644
--- a/libstdc++-v3/testsuite/18_support/new_aligned.cc
+++ b/libstdc++-v3/testsuite/18_support/new_aligned.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 <new>
diff --git a/libstdc++-v3/testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc b/libstdc++-v3/testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc
index 0c80c1d3c43..83200add683 100644
--- a/libstdc++-v3/testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc
+++ b/libstdc++-v3/testsuite/18_support/uncaught_exceptions/uncaught_exceptions.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 <cassert>
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/is_error_code_v.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/is_error_code_v.cc
index a0166908ff2..1a46c876a57 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/error_code/is_error_code_v.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/is_error_code_v.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/19_diagnostics/error_condition/hash.cc b/libstdc++-v3/testsuite/19_diagnostics/error_condition/hash.cc
index 497aed8ce56..87d43e0d09a 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/error_condition/hash.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_condition/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 <system_error>
diff --git a/libstdc++-v3/testsuite/20_util/addressof/requirements/constexpr.cc b/libstdc++-v3/testsuite/20_util/addressof/requirements/constexpr.cc
index 95fd08e6234..fb13de9e72d 100644
--- a/libstdc++-v3/testsuite/20_util/addressof/requirements/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/addressof/requirements/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 <utility>
diff --git a/libstdc++-v3/testsuite/20_util/as_const/1.cc b/libstdc++-v3/testsuite/20_util/as_const/1.cc
index 0c68aa180d1..46e6b3c7594 100644
--- a/libstdc++-v3/testsuite/20_util/as_const/1.cc
+++ b/libstdc++-v3/testsuite/20_util/as_const/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 <utility>
diff --git a/libstdc++-v3/testsuite/20_util/as_const/rvalue_neg.cc b/libstdc++-v3/testsuite/20_util/as_const/rvalue_neg.cc
index 4e6bdcb9d0d..29fd6bbefa8 100644
--- a/libstdc++-v3/testsuite/20_util/as_const/rvalue_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/as_const/rvalue_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 <utility>
diff --git a/libstdc++-v3/testsuite/20_util/bind/83427.cc b/libstdc++-v3/testsuite/20_util/bind/83427.cc
index fc8147dcbee..7a865464e26 100644
--- a/libstdc++-v3/testsuite/20_util/bind/83427.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/83427.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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/bind/is_placeholder_v.cc b/libstdc++-v3/testsuite/20_util/bind/is_placeholder_v.cc
index fc0a2c401bd..aefd23d97fb 100644
--- a/libstdc++-v3/testsuite/20_util/bind/is_placeholder_v.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/is_placeholder_v.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/20_util/bool_constant/requirements.cc b/libstdc++-v3/testsuite/20_util/bool_constant/requirements.cc
index 417a718f316..09a23b0645c 100644
--- a/libstdc++-v3/testsuite/20_util/bool_constant/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/bool_constant/requirements.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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/duration/arithmetic/constexpr_c++17.cc b/libstdc++-v3/testsuite/20_util/duration/arithmetic/constexpr_c++17.cc
index bea79725500..52d2a07bbbc 100644
--- a/libstdc++-v3/testsuite/20_util/duration/arithmetic/constexpr_c++17.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/arithmetic/constexpr_c++17.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2011-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc
index 698ec5fc08b..4b08351e447 100644
--- a/libstdc++-v3/testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/requirements/treat_as_floating_point_v.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/20_util/duration_cast/rounding.cc b/libstdc++-v3/testsuite/20_util/duration_cast/rounding.cc
index a1ed0dae66d..3f8cb6cf790 100644
--- a/libstdc++-v3/testsuite/20_util/duration_cast/rounding.cc
+++ b/libstdc++-v3/testsuite/20_util/duration_cast/rounding.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 <chrono>
diff --git a/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc b/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc
index c3359df3fb4..60d0e35ad5a 100644
--- a/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc
+++ b/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/weak_from_this.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 <memory>
diff --git a/libstdc++-v3/testsuite/20_util/from_chars/1_neg.cc b/libstdc++-v3/testsuite/20_util/from_chars/1_neg.cc
index ea1586c6b6d..890cd826ee8 100644
--- a/libstdc++-v3/testsuite/20_util/from_chars/1_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/from_chars/1_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 <charconv>
diff --git a/libstdc++-v3/testsuite/20_util/from_chars/requirements.cc b/libstdc++-v3/testsuite/20_util/from_chars/requirements.cc
index a671dbb5cec..2f101d6ac5f 100644
--- a/libstdc++-v3/testsuite/20_util/from_chars/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/from_chars/requirements.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-require-normal-namespace "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/function/91456.cc b/libstdc++-v3/testsuite/20_util/function/91456.cc
index 2900c390057..83c88f8d9a5 100644
--- a/libstdc++-v3/testsuite/20_util/function/91456.cc
+++ b/libstdc++-v3/testsuite/20_util/function/91456.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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/function/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/function/cons/deduction.cc
index 20f127f3858..8e1b4d45581 100644
--- a/libstdc++-v3/testsuite/20_util/function/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/20_util/function/cons/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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/83607.cc b/libstdc++-v3/testsuite/20_util/function_objects/83607.cc
index 1bf11c1c4a7..ee82419a779 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/83607.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/83607.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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/invoke/59768.cc b/libstdc++-v3/testsuite/20_util/function_objects/invoke/59768.cc
index 90e2dfa63de..e605b28084e 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/invoke/59768.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/invoke/59768.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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/80478.cc b/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/80478.cc
index 964965f6c46..e5de8b18820 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/80478.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/80478.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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/not_fn/1.cc b/libstdc++-v3/testsuite/20_util/function_objects/not_fn/1.cc
index c1e5d90d4a6..3837433efa2 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/not_fn/1.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/not_fn/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 run { target c++17 } }
 
 #include <functional>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/not_fn/87538.cc b/libstdc++-v3/testsuite/20_util/function_objects/not_fn/87538.cc
index c4e11a1d0d0..db452a9fe9d 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/not_fn/87538.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/not_fn/87538.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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc
index 39ac9d739e9..2b0cc75f64a 100644
--- a/libstdc++-v3/testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.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/20_util/has_unique_object_representations/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/has_unique_object_representations/requirements/typedefs.cc
index b8dce4272a3..56c0555aaa1 100644
--- a/libstdc++-v3/testsuite/20_util/has_unique_object_representations/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/has_unique_object_representations/requirements/typedefs.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/20_util/has_unique_object_representations/value.cc b/libstdc++-v3/testsuite/20_util/has_unique_object_representations/value.cc
index 7a49ffa55ce..d0c5005f34e 100644
--- a/libstdc++-v3/testsuite/20_util/has_unique_object_representations/value.cc
+++ b/libstdc++-v3/testsuite/20_util/has_unique_object_representations/value.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/20_util/hash/nullptr.cc b/libstdc++-v3/testsuite/20_util/hash/nullptr.cc
index 4f9b1c20f73..7b4c3bfcbc4 100644
--- a/libstdc++-v3/testsuite/20_util/hash/nullptr.cc
+++ b/libstdc++-v3/testsuite/20_util/hash/nullptr.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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/in_place/requirements.cc b/libstdc++-v3/testsuite/20_util/in_place/requirements.cc
index b380aac493e..707342ad2be 100644
--- a/libstdc++-v3/testsuite/20_util/in_place/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/in_place/requirements.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/20_util/is_aggregate/incomplete_neg.cc b/libstdc++-v3/testsuite/20_util/is_aggregate/incomplete_neg.cc
index b30d93fc8c6..a9f606ddb10 100644
--- a/libstdc++-v3/testsuite/20_util/is_aggregate/incomplete_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/is_aggregate/incomplete_neg.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc
index 4185f540b5e..80cb1f9e4c0 100644
--- a/libstdc++-v3/testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/is_aggregate/requirements/explicit_instantiation.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/20_util/is_aggregate/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_aggregate/requirements/typedefs.cc
index cf17ecec684..377314de823 100644
--- a/libstdc++-v3/testsuite/20_util/is_aggregate/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/is_aggregate/requirements/typedefs.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/20_util/is_aggregate/value.cc b/libstdc++-v3/testsuite/20_util/is_aggregate/value.cc
index a1b4ddba159..4d35334f748 100644
--- a/libstdc++-v3/testsuite/20_util/is_aggregate/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_aggregate/value.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/20_util/is_invocable/83395.cc b/libstdc++-v3/testsuite/20_util/is_invocable/83395.cc
index 1be3be573d5..0b90f1d09ee 100644
--- a/libstdc++-v3/testsuite/20_util/is_invocable/83395.cc
+++ b/libstdc++-v3/testsuite/20_util/is_invocable/83395.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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/is_invocable/91456.cc b/libstdc++-v3/testsuite/20_util/is_invocable/91456.cc
index bdfc12a1858..aa1570200e7 100644
--- a/libstdc++-v3/testsuite/20_util/is_invocable/91456.cc
+++ b/libstdc++-v3/testsuite/20_util/is_invocable/91456.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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc
index 48ed5c34184..15b7155c165 100644
--- a/libstdc++-v3/testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/is_invocable/requirements/explicit_instantiation.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/20_util/is_invocable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_invocable/requirements/typedefs.cc
index f0fa0bea69c..6515fc06362 100644
--- a/libstdc++-v3/testsuite/20_util/is_invocable/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/is_invocable/requirements/typedefs.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/20_util/is_invocable/value.cc b/libstdc++-v3/testsuite/20_util/is_invocable/value.cc
index 18afc8fe052..76f17f0cae9 100644
--- a/libstdc++-v3/testsuite/20_util/is_invocable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_invocable/value.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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/is_literal_type/deprecated-1z.cc b/libstdc++-v3/testsuite/20_util/is_literal_type/deprecated-1z.cc
index 6cc972f3541..121e46c5775 100644
--- a/libstdc++-v3/testsuite/20_util/is_literal_type/deprecated-1z.cc
+++ b/libstdc++-v3/testsuite/20_util/is_literal_type/deprecated-1z.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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_constructible/94003.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_constructible/94003.cc
index aa0de5e0d29..51ba6256d2b 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_constructible/94003.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_constructible/94003.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 <optional>
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/83395.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/83395.cc
index 4c3fd82fb80..a4d396781cd 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/83395.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/83395.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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc
index f6bf3466533..fb4b4c1fd49 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.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/20_util/is_nothrow_invocable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc
index 3dc5fb99232..e9055f11d58 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/requirements/typedefs.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/20_util/is_nothrow_invocable/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/value.cc
index 0ef48522099..310addb91ab 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/value.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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc
index 772319ebb8a..9a2957f66c0 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc
index e98f98c8c6f..8ea83ec4d90 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/value.cc
index b6d8db6551a..c68c7c68411 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/value.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc
index f3eb3b9fbc2..b7d1b3fa08e 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.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/20_util/is_nothrow_swappable_with/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc
index 7fc48266d99..ac6d7b8da1c 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.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/20_util/is_nothrow_swappable_with/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/value.cc
index 1e291c79091..a0761593981 100644
--- a/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/value.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/20_util/is_swappable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc
index c68d72ec304..b1b91a5e5be 100644
--- a/libstdc++-v3/testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/is_swappable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_swappable/requirements/typedefs.cc
index 816db3a0568..f088682c74d 100644
--- a/libstdc++-v3/testsuite/20_util/is_swappable/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/is_swappable/requirements/typedefs.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/is_swappable/value.cc b/libstdc++-v3/testsuite/20_util/is_swappable/value.cc
index d04760cd571..e67f1bc2f1a 100644
--- a/libstdc++-v3/testsuite/20_util/is_swappable/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_swappable/value.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc
index 3e2ab2860c2..6b07d31477e 100644
--- a/libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.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/20_util/is_swappable_with/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/typedefs.cc
index 5cad2ee79f3..107041a414a 100644
--- a/libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/typedefs.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/20_util/is_swappable_with/value.cc b/libstdc++-v3/testsuite/20_util/is_swappable_with/value.cc
index 4af7a31f515..553e743446d 100644
--- a/libstdc++-v3/testsuite/20_util/is_swappable_with/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_swappable_with/value.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/20_util/logical_traits/83134.cc b/libstdc++-v3/testsuite/20_util/logical_traits/83134.cc
index 4b16a4545e7..925253e31e1 100644
--- a/libstdc++-v3/testsuite/20_util/logical_traits/83134.cc
+++ b/libstdc++-v3/testsuite/20_util/logical_traits/83134.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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc
index 1c451691eb3..fa8abad90b9 100644
--- a/libstdc++-v3/testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/logical_traits/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/logical_traits/requirements/typedefs.cc
index 11904ded489..e0b8a00a345 100644
--- a/libstdc++-v3/testsuite/20_util/logical_traits/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/logical_traits/requirements/typedefs.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 //
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/20_util/logical_traits/value.cc b/libstdc++-v3/testsuite/20_util/logical_traits/value.cc
index 1e384d5e731..1b3d94ee52d 100644
--- a/libstdc++-v3/testsuite/20_util/logical_traits/value.cc
+++ b/libstdc++-v3/testsuite/20_util/logical_traits/value.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 //
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc
index 64818780bb4..65dd36022f8 100644
--- a/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/20_util/pair/cons/deduction.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/20_util/pair/swap_cxx17.cc b/libstdc++-v3/testsuite/20_util/pair/swap_cxx17.cc
index c1d54cfe3ac..8872ff05748 100644
--- a/libstdc++-v3/testsuite/20_util/pair/swap_cxx17.cc
+++ b/libstdc++-v3/testsuite/20_util/pair/swap_cxx17.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/20_util/ratio/requirements/ratio_equal_v.cc b/libstdc++-v3/testsuite/20_util/ratio/requirements/ratio_equal_v.cc
index bac0e351f1a..0720ebe9883 100644
--- a/libstdc++-v3/testsuite/20_util/ratio/requirements/ratio_equal_v.cc
+++ b/libstdc++-v3/testsuite/20_util/ratio/requirements/ratio_equal_v.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/20_util/reference_wrapper/83427.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc
index bd0efb81e5b..eb26b906f92 100644
--- a/libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc
+++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/83427.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_only } }
 
 #include <functional>
diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/deduction.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/deduction.cc
index fbdbd6f59f7..c89e08bba58 100644
--- a/libstdc++-v3/testsuite/20_util/reference_wrapper/deduction.cc
+++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/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 <functional>
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/casts/reinterpret.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/casts/reinterpret.cc
index 667a756d88b..281892996cf 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/casts/reinterpret.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/casts/reinterpret.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/20_util/shared_ptr/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/deduction.cc
index be42289ee18..8a3702cb245 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/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 <memory>
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/weak_type.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/weak_type.cc
index c3f5dbee5c1..1ab622db2cb 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/weak_type.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/weak_type.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 <memory>
diff --git a/libstdc++-v3/testsuite/20_util/time_point/arithmetic/constexpr.cc b/libstdc++-v3/testsuite/20_util/time_point/arithmetic/constexpr.cc
index fb50bd813b2..e868a2781b8 100644
--- a/libstdc++-v3/testsuite/20_util/time_point/arithmetic/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/time_point/arithmetic/constexpr.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2011-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/time_point_cast/rounding.cc b/libstdc++-v3/testsuite/20_util/time_point_cast/rounding.cc
index 5de87c7ecce..0190ad1a840 100644
--- a/libstdc++-v3/testsuite/20_util/time_point_cast/rounding.cc
+++ b/libstdc++-v3/testsuite/20_util/time_point_cast/rounding.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 <chrono>
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/3.cc b/libstdc++-v3/testsuite/20_util/to_chars/3.cc
index e559f351b78..30b02a53944 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/3.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/3.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 } }
 // { dg-require-string-conversions "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/chars_format.cc b/libstdc++-v3/testsuite/20_util/to_chars/chars_format.cc
index dbf41f9ffba..e13cb315b31 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/chars_format.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/chars_format.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 <charconv>
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/lwg3266.cc b/libstdc++-v3/testsuite/20_util/to_chars/lwg3266.cc
index 28ce29a7b8c..b9ab36a2b25 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/lwg3266.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/lwg3266.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 <charconv>
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/requirements.cc b/libstdc++-v3/testsuite/20_util/to_chars/requirements.cc
index ec8ed5c2606..42e857b2988 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/requirements.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-require-normal-namespace "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/tuple/78939.cc b/libstdc++-v3/testsuite/20_util/tuple/78939.cc
index 9934cda4a54..0a6cfa7b692 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/78939.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/78939.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-additional-options "-Wno-deprecated" { target c++2a } }
 // { dg-do compile { target c++17 } }
 
diff --git a/libstdc++-v3/testsuite/20_util/tuple/apply/1.cc b/libstdc++-v3/testsuite/20_util/tuple/apply/1.cc
index 83c31a37ef7..e8352cfb6ef 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/apply/1.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/apply/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 run { target c++17 } }
 
 #include <tuple>
diff --git a/libstdc++-v3/testsuite/20_util/tuple/apply/2.cc b/libstdc++-v3/testsuite/20_util/tuple/apply/2.cc
index be8fc7b4739..a2cdb62e44c 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/apply/2.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/apply/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 } }
 
 // Test noexcept-specifier on std::apply
diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc
index af09c971f00..70582d89bfa 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.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/20_util/tuple/make_from_tuple/1.cc b/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc
index 42479d184c0..2d3ab9ad094 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/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 run { target c++17 } }
 
 #include <tuple>
diff --git a/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/2.cc b/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/2.cc
index b3e9486a1df..f12876b6d35 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/2.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/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 } }
 
 // Test noexcept-specifier on std::make_from_tuple
diff --git a/libstdc++-v3/testsuite/20_util/tuple/swap_cxx17.cc b/libstdc++-v3/testsuite/20_util/tuple/swap_cxx17.cc
index 1f06be82059..96cfe44c1fc 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/swap_cxx17.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/swap_cxx17.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/20_util/tuple/tuple_size_v.cc b/libstdc++-v3/testsuite/20_util/tuple/tuple_size_v.cc
index c2376418d1f..2ecafff25d8 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/tuple_size_v.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/tuple_size_v.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/20_util/unique_ptr/cons/deduction_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/deduction_neg.cc
index 16646edd3b9..2a607291fd1 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/deduction_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/deduction_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 <memory>
@@ -32,5 +31,5 @@  test01()
   std::unique_ptr bad2{new double, D()}; // { dg-error "class template argument deduction failed" }
 }
 
-// { dg-error "no matching function" "" { target *-*-* } 29 }
-// { dg-error "no matching function" "" { target *-*-* } 32 }
+// { dg-error "no matching function" "" { target *-*-* } 28 }
+// { dg-error "no matching function" "" { target *-*-* } 31 }
diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc
index e624cf56837..bf405e07d2e 100644
--- a/libstdc++-v3/testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc
+++ b/libstdc++-v3/testsuite/20_util/uses_allocator/requirements/uses_allocator_v.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/20_util/variable_templates_for_traits.cc b/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc
index 60d7aa94938..a5c48fe5e3a 100644
--- a/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc
+++ b/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-additional-options "-Wno-deprecated" { target c++2a } }
 // { dg-do compile { target c++17 } }
 
diff --git a/libstdc++-v3/testsuite/20_util/void_t/1.cc b/libstdc++-v3/testsuite/20_util/void_t/1.cc
index ded6be168eb..b8dc9e0c781 100644
--- a/libstdc++-v3/testsuite/20_util/void_t/1.cc
+++ b/libstdc++-v3/testsuite/20_util/void_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 <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/cons/deduction.cc
index 2aa6abe4ae2..0333942db29 100644
--- a/libstdc++-v3/testsuite/20_util/weak_ptr/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/20_util/weak_ptr/cons/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 <memory>
diff --git a/libstdc++-v3/testsuite/24_iterators/container_access.cc b/libstdc++-v3/testsuite/24_iterators/container_access.cc
index bcdc782512f..d795eafae45 100644
--- a/libstdc++-v3/testsuite/24_iterators/container_access.cc
+++ b/libstdc++-v3/testsuite/24_iterators/container_access.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2015-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++17.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++17.cc
index 506b18c7648..d0ae2d3b740 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++17.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++17.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/24_iterators/headers/iterator/synopsis_c++17.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc
index 633288eafb4..4039bd61f62 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 // { dg-require-normal-namespace "" }
 
diff --git a/libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17.cc b/libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17.cc
index 358e19345e1..33f724206c6 100644
--- a/libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17.cc
+++ b/libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17.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/24_iterators/range_access/range_access_cpp17_neg.cc b/libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17_neg.cc
index a56a11057a9..06055bf7e6a 100644
--- a/libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17_neg.cc
+++ b/libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17_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 <iterator>
diff --git a/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc b/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc
index 90aaee75af6..e68a051aaa4 100644
--- a/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc
+++ b/libstdc++-v3/testsuite/26_numerics/gcd/gcd_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 <numeric>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++17.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++17.cc
index 3b337f83bf5..28d63bbbeb9 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++17.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++17.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 <cmath>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
index 1e504070912..ad785459721 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.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 <cmath>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/special_functions_global.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/special_functions_global.cc
index c4856b227ed..6ac8beef56a 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/special_functions_global.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/special_functions_global.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 } }
 
 #undef __STDCPP_WANT_MATH_SPEC_FUNCS__
diff --git a/libstdc++-v3/testsuite/26_numerics/lcm/1.cc b/libstdc++-v3/testsuite/26_numerics/lcm/1.cc
index b23796c22da..2495fa10ddd 100644
--- a/libstdc++-v3/testsuite/26_numerics/lcm/1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/lcm/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 <numeric>
diff --git a/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc b/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc
index 485b9a4dd01..dbe23ab7f26 100644
--- a/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc
+++ b/libstdc++-v3/testsuite/26_numerics/lcm/lcm_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 <numeric>
diff --git a/libstdc++-v3/testsuite/26_numerics/valarray/deduction.cc b/libstdc++-v3/testsuite/26_numerics/valarray/deduction.cc
index 5c709b779c4..52c8f8e44af 100644
--- a/libstdc++-v3/testsuite/26_numerics/valarray/deduction.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/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 <valarray>
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc
index d7c6ad05212..b410b7729c6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -fno-inline" }
+// { dg-options "-fno-inline" }
 // { dg-do link { target c++17 } }
 
 #include <iostream>
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/quoted_sv.cc b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/quoted_sv.cc
index 3f76b5b8d84..ec6041d27d5 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/quoted_sv.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/quoted_sv.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/27_io/manipulators/standard/wchar_t/quoted_sv.cc b/libstdc++-v3/testsuite/27_io/manipulators/standard/wchar_t/quoted_sv.cc
index 282173a654d..3881d33ae85 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/standard/wchar_t/quoted_sv.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/standard/wchar_t/quoted_sv.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/27_io/types/4.cc b/libstdc++-v3/testsuite/27_io/types/4.cc
index 99cf63b2093..c9e1708ccd4 100644
--- a/libstdc++-v3/testsuite/27_io/types/4.cc
+++ b/libstdc++-v3/testsuite/27_io/types/4.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 } }
 
 // In C++17 these names are not reserved by the library.
diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/deduction.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/deduction.cc
index aed7c5f2f63..9064b779679 100644
--- a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/deduction.cc
+++ b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/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 } }
 // { dg-timeout-factor 3 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/91997.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/91997.cc
index d1bdf08b6b1..f47fbff4da7 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/91997.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/91997.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -g -O0 -Wno-unused" }
+// { dg-options "-g -O0 -Wno-unused" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc
index 98e21e963fe..72c66d3b785 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-g -O0 -std=gnu++17" }
+// { dg-options "-g -O0" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2014-2021 Free Software Foundation, Inc.