[committed,3/9] libstdc++: Remove redundant -std=gnu++17 options from any/optional/variant tests

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

Commit Message

Martin Sebor via Gcc-patches May 10, 2021, 3:27 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 8240175b87e331c87993876e782971eda46f9a6e
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon May 10 16:22:53 2021

    libstdc++: Remove redundant -std=gnu++17 option from any/optional/variant 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/20_util/any/assign/1.cc: Remove -std=gnu++17 from
            dg-options directive.
            * testsuite/20_util/any/assign/2.cc: Likewise.
            * testsuite/20_util/any/assign/emplace.cc: Likewise.
            * testsuite/20_util/any/assign/exception.cc: Likewise.
            * testsuite/20_util/any/assign/self.cc: Likewise.
            * testsuite/20_util/any/cons/1.cc: Likewise.
            * testsuite/20_util/any/cons/2.cc: Likewise.
            * testsuite/20_util/any/cons/90415.cc: Likewise.
            * testsuite/20_util/any/cons/92156.cc: Likewise.
            * testsuite/20_util/any/cons/aligned.cc: Likewise.
            * testsuite/20_util/any/cons/explicit.cc: Likewise.
            * testsuite/20_util/any/cons/in_place.cc: Likewise.
            * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
            * testsuite/20_util/any/make_any.cc: Likewise.
            * testsuite/20_util/any/misc/any_cast.cc: Likewise.
            * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise.
            * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
            * testsuite/20_util/any/misc/swap.cc: Likewise.
            * testsuite/20_util/any/modifiers/1.cc: Likewise.
            * testsuite/20_util/any/modifiers/83658.cc: Likewise.
            * testsuite/20_util/any/modifiers/92156.cc: Likewise.
            * testsuite/20_util/any/observers/type.cc: Likewise.
            * testsuite/20_util/any/requirements.cc: Likewise.
            * testsuite/20_util/any/typedefs.cc: Likewise.
            * testsuite/20_util/optional/77288.cc: Likewise.
            * testsuite/20_util/optional/84601.cc: Likewise.
            * testsuite/20_util/optional/assignment/1.cc: Likewise.
            * testsuite/20_util/optional/assignment/2.cc: Likewise.
            * testsuite/20_util/optional/assignment/3.cc: Likewise.
            * testsuite/20_util/optional/assignment/4.cc: Likewise.
            * testsuite/20_util/optional/assignment/5.cc: Likewise.
            * testsuite/20_util/optional/assignment/6.cc: Likewise.
            * testsuite/20_util/optional/assignment/7.cc: Likewise.
            * testsuite/20_util/optional/assignment/8.cc: Likewise.
            * testsuite/20_util/optional/assignment/9.cc: Likewise.
            * testsuite/20_util/optional/bad_access.cc: Likewise.
            * testsuite/20_util/optional/cons/77727.cc: Likewise.
            * testsuite/20_util/optional/cons/85642.cc: Likewise.
            * testsuite/20_util/optional/cons/copy.cc: Likewise.
            * testsuite/20_util/optional/cons/deduction.cc: Likewise.
            * testsuite/20_util/optional/cons/default.cc: Likewise.
            * testsuite/20_util/optional/cons/move.cc: Likewise.
            * testsuite/20_util/optional/cons/trivial.cc: Likewise.
            * testsuite/20_util/optional/cons/value.cc: Likewise.
            * testsuite/20_util/optional/cons/value_neg.cc: Likewise.
            * testsuite/20_util/optional/constexpr/cons/default.cc:
            Likewise.
            * testsuite/20_util/optional/constexpr/cons/value.cc: Likewise.
            * testsuite/20_util/optional/constexpr/in_place.cc: Likewise.
            * testsuite/20_util/optional/constexpr/make_optional.cc:
            Likewise.
            * testsuite/20_util/optional/constexpr/nullopt.cc: Likewise.
            * testsuite/20_util/optional/constexpr/observers/1.cc: Likewise.
            * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
            * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
            * testsuite/20_util/optional/constexpr/observers/4.cc: Likewise.
            * testsuite/20_util/optional/constexpr/observers/5.cc: Likewise.
            * testsuite/20_util/optional/constexpr/relops/1.cc: Likewise.
            * testsuite/20_util/optional/constexpr/relops/2.cc: Likewise.
            * testsuite/20_util/optional/constexpr/relops/3.cc: Likewise.
            * testsuite/20_util/optional/constexpr/relops/4.cc: Likewise.
            * testsuite/20_util/optional/constexpr/relops/5.cc: Likewise.
            * testsuite/20_util/optional/constexpr/relops/6.cc: Likewise.
            * testsuite/20_util/optional/hash.cc: Likewise.
            * testsuite/20_util/optional/in_place.cc: Likewise.
            * testsuite/20_util/optional/make_optional.cc: Likewise.
            * testsuite/20_util/optional/nullopt.cc: Likewise.
            * testsuite/20_util/optional/observers/1.cc: Likewise.
            * testsuite/20_util/optional/observers/2.cc: Likewise.
            * testsuite/20_util/optional/observers/3.cc: Likewise.
            * testsuite/20_util/optional/observers/4.cc: Likewise.
            * testsuite/20_util/optional/observers/5.cc: Likewise.
            * testsuite/20_util/optional/observers/6.cc: Likewise.
            * testsuite/20_util/optional/relops/1.cc: Likewise.
            * testsuite/20_util/optional/relops/2.cc: Likewise.
            * testsuite/20_util/optional/relops/3.cc: Likewise.
            * testsuite/20_util/optional/relops/4.cc: Likewise.
            * testsuite/20_util/optional/relops/5.cc: Likewise.
            * testsuite/20_util/optional/relops/6.cc: Likewise.
            * testsuite/20_util/optional/relops/7.cc: Likewise.
            * testsuite/20_util/optional/requirements.cc: Likewise.
            * testsuite/20_util/optional/swap/1.cc: Likewise.
            * testsuite/20_util/optional/swap/2.cc: Likewise.
            * testsuite/20_util/optional/typedefs.cc: Likewise.
            * testsuite/20_util/variant/80165.cc: Likewise.
            * testsuite/20_util/variant/85183.cc: Likewise.
            * testsuite/20_util/variant/86874.cc: Likewise.
            * testsuite/20_util/variant/87431.cc: Likewise.
            * testsuite/20_util/variant/87619.cc: Likewise.
            * testsuite/20_util/variant/91807.cc: Likewise.
            * testsuite/20_util/variant/any.cc: Likewise.
            * testsuite/20_util/variant/compile.cc: Likewise.
            * testsuite/20_util/variant/deduction.cc: Likewise.
            * testsuite/20_util/variant/exception_safety.cc: Likewise.
            * testsuite/20_util/variant/hash.cc: Likewise.
            * testsuite/20_util/variant/index_type.cc: Likewise.
            * testsuite/20_util/variant/relops/89851.cc: Likewise.
            * testsuite/20_util/variant/relops/90008.cc: Likewise.
            * testsuite/20_util/variant/run.cc: Likewise.
            * testsuite/20_util/variant/visit.cc: Likewise.

diff --git a/libstdc++-v3/testsuite/20_util/any/assign/1.cc b/libstdc++-v3/testsuite/20_util/any/assign/1.cc
index 2e3a487b3aa..f417f9b286f 100644
--- a/libstdc++-v3/testsuite/20_util/any/assign/1.cc
+++ b/libstdc++-v3/testsuite/20_util/any/assign/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/20_util/any/assign/2.cc b/libstdc++-v3/testsuite/20_util/any/assign/2.cc
index ae703a781c2..a80e9638477 100644
--- a/libstdc++-v3/testsuite/20_util/any/assign/2.cc
+++ b/libstdc++-v3/testsuite/20_util/any/assign/2.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/20_util/any/assign/emplace.cc b/libstdc++-v3/testsuite/20_util/any/assign/emplace.cc
index 77d524d5c5d..9e699e22eb9 100644
--- a/libstdc++-v3/testsuite/20_util/any/assign/emplace.cc
+++ b/libstdc++-v3/testsuite/20_util/any/assign/emplace.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/any/assign/exception.cc b/libstdc++-v3/testsuite/20_util/any/assign/exception.cc
index edc7c0083d2..5e984c08710 100644
--- a/libstdc++-v3/testsuite/20_util/any/assign/exception.cc
+++ b/libstdc++-v3/testsuite/20_util/any/assign/exception.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2016-2021 Free Software Foundation, Inc.
@@ -38,7 +37,7 @@  struct Bad2
 };
 
 int del_count = 0;
-struct Good 
+struct Good
 {
   Good() = default;
   Good(const Good&) = default;
diff --git a/libstdc++-v3/testsuite/20_util/any/assign/self.cc b/libstdc++-v3/testsuite/20_util/any/assign/self.cc
index 1303ae26627..fe2e588a2b8 100644
--- a/libstdc++-v3/testsuite/20_util/any/assign/self.cc
+++ b/libstdc++-v3/testsuite/20_util/any/assign/self.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 <any>
diff --git a/libstdc++-v3/testsuite/20_util/any/cons/1.cc b/libstdc++-v3/testsuite/20_util/any/cons/1.cc
index 132c6dba801..97819fa8144 100644
--- a/libstdc++-v3/testsuite/20_util/any/cons/1.cc
+++ b/libstdc++-v3/testsuite/20_util/any/cons/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/20_util/any/cons/2.cc b/libstdc++-v3/testsuite/20_util/any/cons/2.cc
index a696683f5be..ea8dd898c53 100644
--- a/libstdc++-v3/testsuite/20_util/any/cons/2.cc
+++ b/libstdc++-v3/testsuite/20_util/any/cons/2.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/20_util/any/cons/90415.cc b/libstdc++-v3/testsuite/20_util/any/cons/90415.cc
index e2b42ed8e0d..ea0a14ad798 100644
--- a/libstdc++-v3/testsuite/20_util/any/cons/90415.cc
+++ b/libstdc++-v3/testsuite/20_util/any/cons/90415.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/any/cons/92156.cc b/libstdc++-v3/testsuite/20_util/any/cons/92156.cc
index 83fa4f7a044..00a4449fc7a 100644
--- a/libstdc++-v3/testsuite/20_util/any/cons/92156.cc
+++ b/libstdc++-v3/testsuite/20_util/any/cons/92156.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/any/cons/aligned.cc b/libstdc++-v3/testsuite/20_util/any/cons/aligned.cc
index 7662e9e7b81..888898d05ab 100644
--- a/libstdc++-v3/testsuite/20_util/any/cons/aligned.cc
+++ b/libstdc++-v3/testsuite/20_util/any/cons/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 } }
 // { dg-require-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/any/cons/explicit.cc b/libstdc++-v3/testsuite/20_util/any/cons/explicit.cc
index eb5f2d86cf8..fc991d3e34e 100644
--- a/libstdc++-v3/testsuite/20_util/any/cons/explicit.cc
+++ b/libstdc++-v3/testsuite/20_util/any/cons/explicit.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/any/cons/in_place.cc b/libstdc++-v3/testsuite/20_util/any/cons/in_place.cc
index 3b767d0dc38..1d35e7a5770 100644
--- a/libstdc++-v3/testsuite/20_util/any/cons/in_place.cc
+++ b/libstdc++-v3/testsuite/20_util/any/cons/in_place.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/any/cons/nontrivial.cc b/libstdc++-v3/testsuite/20_util/any/cons/nontrivial.cc
index 29a809f5a89..d783508803a 100644
--- a/libstdc++-v3/testsuite/20_util/any/cons/nontrivial.cc
+++ b/libstdc++-v3/testsuite/20_util/any/cons/nontrivial.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 <any>
diff --git a/libstdc++-v3/testsuite/20_util/any/make_any.cc b/libstdc++-v3/testsuite/20_util/any/make_any.cc
index ec122874920..51689afbd06 100644
--- a/libstdc++-v3/testsuite/20_util/any/make_any.cc
+++ b/libstdc++-v3/testsuite/20_util/any/make_any.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/any/misc/any_cast.cc b/libstdc++-v3/testsuite/20_util/any/misc/any_cast.cc
index 52593dd7595..ea257660e89 100644
--- a/libstdc++-v3/testsuite/20_util/any/misc/any_cast.cc
+++ b/libstdc++-v3/testsuite/20_util/any/misc/any_cast.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2014-2021 Free Software Foundation, Inc.
@@ -37,7 +36,7 @@  void test01()
   any x(5);                                   // x holds int
   VERIFY(any_cast<int>(x) == 5);              // cast to value
   any_cast<int&>(x) = 10;                     // cast to reference
-  VERIFY(any_cast<int>(x) == 10); 
+  VERIFY(any_cast<int>(x) == 10);
 
   x = "Meow";                                 // x holds const char*
   VERIFY(strcmp(any_cast<const char*>(x), "Meow") == 0);
@@ -46,7 +45,7 @@  void test01()
 
   x = string("Meow");                         // x holds string
   string s, s2("Jane");
-  s = move(any_cast<string&>(x));             // move from any 
+  s = move(any_cast<string&>(x));             // move from any
   VERIFY(s == "Meow");
   any_cast<string&>(x) = move(s2);            // move to any
   VERIFY(any_cast<const string&>(x) == "Jane");
diff --git a/libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc b/libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc
index 2ff55585038..799304b1e1f 100644
--- a/libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.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/any/misc/any_cast_no_rtti.cc b/libstdc++-v3/testsuite/20_util/any/misc/any_cast_no_rtti.cc
index 3bda2d6d711..201d7eea272 100644
--- a/libstdc++-v3/testsuite/20_util/any/misc/any_cast_no_rtti.cc
+++ b/libstdc++-v3/testsuite/20_util/any/misc/any_cast_no_rtti.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=gnu++17 -fno-rtti" }
+// { dg-options "-fno-rtti" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2014-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/any/misc/swap.cc b/libstdc++-v3/testsuite/20_util/any/misc/swap.cc
index 4b2ff76651b..2610f0fc3d8 100644
--- a/libstdc++-v3/testsuite/20_util/any/misc/swap.cc
+++ b/libstdc++-v3/testsuite/20_util/any/misc/swap.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/20_util/any/modifiers/1.cc b/libstdc++-v3/testsuite/20_util/any/modifiers/1.cc
index 1e8af5f94ca..f5bb4aabbcf 100644
--- a/libstdc++-v3/testsuite/20_util/any/modifiers/1.cc
+++ b/libstdc++-v3/testsuite/20_util/any/modifiers/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/20_util/any/modifiers/83658.cc b/libstdc++-v3/testsuite/20_util/any/modifiers/83658.cc
index 47d762ac013..f4a72ed0412 100644
--- a/libstdc++-v3/testsuite/20_util/any/modifiers/83658.cc
+++ b/libstdc++-v3/testsuite/20_util/any/modifiers/83658.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 <any>
diff --git a/libstdc++-v3/testsuite/20_util/any/modifiers/92156.cc b/libstdc++-v3/testsuite/20_util/any/modifiers/92156.cc
index 7127f3e61f0..6b04db2f10e 100644
--- a/libstdc++-v3/testsuite/20_util/any/modifiers/92156.cc
+++ b/libstdc++-v3/testsuite/20_util/any/modifiers/92156.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/any/observers/type.cc b/libstdc++-v3/testsuite/20_util/any/observers/type.cc
index 613966142b0..f9b3668a090 100644
--- a/libstdc++-v3/testsuite/20_util/any/observers/type.cc
+++ b/libstdc++-v3/testsuite/20_util/any/observers/type.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/20_util/any/requirements.cc b/libstdc++-v3/testsuite/20_util/any/requirements.cc
index 9609277d3d7..0affcc8d82d 100644
--- a/libstdc++-v3/testsuite/20_util/any/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/any/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/any/typedefs.cc b/libstdc++-v3/testsuite/20_util/any/typedefs.cc
index 47acd63bd7f..a13cdf24abd 100644
--- a/libstdc++-v3/testsuite/20_util/any/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/any/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/20_util/optional/77288.cc b/libstdc++-v3/testsuite/20_util/optional/77288.cc
index 551fef174dc..f61b73a1fe5 100644
--- a/libstdc++-v3/testsuite/20_util/optional/77288.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/77288.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/optional/84601.cc b/libstdc++-v3/testsuite/20_util/optional/84601.cc
index b8a1706d271..ddac999d49e 100644
--- a/libstdc++-v3/testsuite/20_util/optional/84601.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/84601.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 }  }
 
 #include <optional>
diff --git a/libstdc++-v3/testsuite/20_util/optional/assignment/1.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/1.cc
index fabd9e2e0cb..05c348556d6 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/1.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/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/20_util/optional/assignment/2.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/2.cc
index 7ef1e0ba88d..fce659a414c 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/2.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/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/20_util/optional/assignment/3.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/3.cc
index 69124834ce6..0a57f132b28 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/3.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/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/20_util/optional/assignment/4.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/4.cc
index 1889c936213..303df38e96c 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/4.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/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/20_util/optional/assignment/5.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/5.cc
index ae2f35cceb3..cd6056d4466 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/5.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/5.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/20_util/optional/assignment/6.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/6.cc
index 5dd1bb4d295..75cee462ade 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/6.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/6.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/20_util/optional/assignment/7.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/7.cc
index 1bda92b6bf9..12fda375c5c 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/7.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/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/20_util/optional/assignment/8.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/8.cc
index c3b96984ed1..b2bafce334f 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/8.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/8.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 }  }
 
 // Copyright (C) 2018-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/optional/assignment/9.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/9.cc
index 68abfb0e1e6..49643f88cdb 100644
--- a/libstdc++-v3/testsuite/20_util/optional/assignment/9.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/assignment/9.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2018-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/optional/bad_access.cc b/libstdc++-v3/testsuite/20_util/optional/bad_access.cc
index 01ec6f11387..ce5f3e00ca8 100644
--- a/libstdc++-v3/testsuite/20_util/optional/bad_access.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/bad_access.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/optional/cons/77727.cc b/libstdc++-v3/testsuite/20_util/optional/cons/77727.cc
index 4159f12aa49..bd853529ab1 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/77727.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/cons/77727.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/optional/cons/85642.cc b/libstdc++-v3/testsuite/20_util/optional/cons/85642.cc
index 3cf35caadd9..39e4853db36 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/85642.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/cons/85642.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/optional/cons/copy.cc b/libstdc++-v3/testsuite/20_util/optional/cons/copy.cc
index 0051cae03f1..88511068da2 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/copy.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/cons/copy.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/20_util/optional/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc
index 6ff8bec7f62..4d57571a094 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/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 <optional>
diff --git a/libstdc++-v3/testsuite/20_util/optional/cons/default.cc b/libstdc++-v3/testsuite/20_util/optional/cons/default.cc
index 01d0914a3aa..790cbed3085 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/default.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/cons/default.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/20_util/optional/cons/move.cc b/libstdc++-v3/testsuite/20_util/optional/cons/move.cc
index 9b481796b9b..481ef4a5288 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/move.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/cons/move.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/20_util/optional/cons/trivial.cc b/libstdc++-v3/testsuite/20_util/optional/cons/trivial.cc
index 908edeed6c0..575272e0364 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/trivial.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/cons/trivial.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 }  }
 
 // Copyright (C) 2018-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/optional/cons/value.cc b/libstdc++-v3/testsuite/20_util/optional/cons/value.cc
index a942e8f89f9..0621c660679 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/value.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/cons/value.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/20_util/optional/cons/value_neg.cc b/libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc
index c9bb137a2e2..3d17a1a175c 100644
--- a/libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/cons/value_neg.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/20_util/optional/constexpr/cons/default.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/cons/default.cc
index 48a58ac128c..fca3759cc89 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/cons/default.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/cons/default.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/20_util/optional/constexpr/cons/value.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/cons/value.cc
index ff20fb0ae4e..12990243bec 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/cons/value.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/cons/value.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/20_util/optional/constexpr/in_place.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/in_place.cc
index d90e28aaf18..70925c3c5a2 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/in_place.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/in_place.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/20_util/optional/constexpr/make_optional.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/make_optional.cc
index 9feb6e35834..058bcb62a0b 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/make_optional.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/make_optional.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/20_util/optional/constexpr/nullopt.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/nullopt.cc
index 617e4601ecc..33b8b13fbf2 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/nullopt.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/nullopt.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/20_util/optional/constexpr/observers/1.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/1.cc
index 76f7536f40f..6127f115d36 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/1.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/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/20_util/optional/constexpr/observers/2.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/2.cc
index e9ff4deccdf..5d62b86589a 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/2.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/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/20_util/optional/constexpr/observers/3.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/3.cc
index 3a8b2245696..837dae8715d 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/3.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/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/20_util/optional/constexpr/observers/4.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/4.cc
index 7a9ee82a8fa..ebaa7a8fc6e 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/4.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/4.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/20_util/optional/constexpr/observers/5.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/5.cc
index 66224ce23cc..c1e6b5e42de 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/5.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/5.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/20_util/optional/constexpr/relops/1.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/1.cc
index 74b4e2102ef..99a7dd6009e 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/1.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/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/20_util/optional/constexpr/relops/2.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/2.cc
index dd1b62d6229..caecac30c44 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/2.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/2.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/20_util/optional/constexpr/relops/3.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/3.cc
index e334c1fb532..df23c7a48be 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/3.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/3.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/20_util/optional/constexpr/relops/4.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/4.cc
index bc652c3dd4f..3b8edeee8cf 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/4.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/4.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/20_util/optional/constexpr/relops/5.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/5.cc
index 535d70201b6..67fc9816f6a 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/5.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/5.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/20_util/optional/constexpr/relops/6.cc b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/6.cc
index fc8da93364f..a50ff9189d5 100644
--- a/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/6.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/6.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/20_util/optional/hash.cc b/libstdc++-v3/testsuite/20_util/optional/hash.cc
index 138f2bbc095..4e05781b9c9 100644
--- a/libstdc++-v3/testsuite/20_util/optional/hash.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/hash.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/optional/in_place.cc b/libstdc++-v3/testsuite/20_util/optional/in_place.cc
index 9c0f7fd1fe8..2c0715b1620 100644
--- a/libstdc++-v3/testsuite/20_util/optional/in_place.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/in_place.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/20_util/optional/make_optional.cc b/libstdc++-v3/testsuite/20_util/optional/make_optional.cc
index 1acf153a2b4..f012eea0ba1 100644
--- a/libstdc++-v3/testsuite/20_util/optional/make_optional.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/make_optional.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/20_util/optional/nullopt.cc b/libstdc++-v3/testsuite/20_util/optional/nullopt.cc
index 863c1fc0275..b513f0636b8 100644
--- a/libstdc++-v3/testsuite/20_util/optional/nullopt.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/nullopt.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/20_util/optional/observers/1.cc b/libstdc++-v3/testsuite/20_util/optional/observers/1.cc
index 599e61e10ea..315874a64ed 100644
--- a/libstdc++-v3/testsuite/20_util/optional/observers/1.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/observers/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/20_util/optional/observers/2.cc b/libstdc++-v3/testsuite/20_util/optional/observers/2.cc
index 21ffa1b76d8..2438929c17d 100644
--- a/libstdc++-v3/testsuite/20_util/optional/observers/2.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/observers/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/20_util/optional/observers/3.cc b/libstdc++-v3/testsuite/20_util/optional/observers/3.cc
index be8e23c836b..7da1650b72b 100644
--- a/libstdc++-v3/testsuite/20_util/optional/observers/3.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/observers/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/20_util/optional/observers/4.cc b/libstdc++-v3/testsuite/20_util/optional/observers/4.cc
index 70ed935598d..61d0a78cdee 100644
--- a/libstdc++-v3/testsuite/20_util/optional/observers/4.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/observers/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/20_util/optional/observers/5.cc b/libstdc++-v3/testsuite/20_util/optional/observers/5.cc
index fbb386ce073..7869f568cbb 100644
--- a/libstdc++-v3/testsuite/20_util/optional/observers/5.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/observers/5.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/20_util/optional/observers/6.cc b/libstdc++-v3/testsuite/20_util/optional/observers/6.cc
index f9db361d764..2e7669f94d3 100644
--- a/libstdc++-v3/testsuite/20_util/optional/observers/6.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/observers/6.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/optional/relops/1.cc b/libstdc++-v3/testsuite/20_util/optional/relops/1.cc
index 88b5b40fa09..c6ccb70bf1b 100644
--- a/libstdc++-v3/testsuite/20_util/optional/relops/1.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/relops/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/20_util/optional/relops/2.cc b/libstdc++-v3/testsuite/20_util/optional/relops/2.cc
index c540232e88d..dd8ce55998b 100644
--- a/libstdc++-v3/testsuite/20_util/optional/relops/2.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/relops/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/20_util/optional/relops/3.cc b/libstdc++-v3/testsuite/20_util/optional/relops/3.cc
index 488e3a39d56..e385a441193 100644
--- a/libstdc++-v3/testsuite/20_util/optional/relops/3.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/relops/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/20_util/optional/relops/4.cc b/libstdc++-v3/testsuite/20_util/optional/relops/4.cc
index f16fe0d33e2..71697bdeb60 100644
--- a/libstdc++-v3/testsuite/20_util/optional/relops/4.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/relops/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/20_util/optional/relops/5.cc b/libstdc++-v3/testsuite/20_util/optional/relops/5.cc
index 2cbf1b825d8..575023ec2be 100644
--- a/libstdc++-v3/testsuite/20_util/optional/relops/5.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/relops/5.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/20_util/optional/relops/6.cc b/libstdc++-v3/testsuite/20_util/optional/relops/6.cc
index 6b6535db1c2..b313fc9e545 100644
--- a/libstdc++-v3/testsuite/20_util/optional/relops/6.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/relops/6.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/20_util/optional/relops/7.cc b/libstdc++-v3/testsuite/20_util/optional/relops/7.cc
index 8f307c6d281..20bc84a619b 100644
--- a/libstdc++-v3/testsuite/20_util/optional/relops/7.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/relops/7.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 }  }
 
 // Copyright (C) 2017-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/optional/requirements.cc b/libstdc++-v3/testsuite/20_util/optional/requirements.cc
index a3753ecc2d9..550c0c4eac0 100644
--- a/libstdc++-v3/testsuite/20_util/optional/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/requirements.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/20_util/optional/swap/1.cc b/libstdc++-v3/testsuite/20_util/optional/swap/1.cc
index b8f7017bc0f..b3814f3e8a4 100644
--- a/libstdc++-v3/testsuite/20_util/optional/swap/1.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/swap/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/20_util/optional/swap/2.cc b/libstdc++-v3/testsuite/20_util/optional/swap/2.cc
index a1c0a2920bd..b21475d28d0 100644
--- a/libstdc++-v3/testsuite/20_util/optional/swap/2.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/swap/2.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/optional/typedefs.cc b/libstdc++-v3/testsuite/20_util/optional/typedefs.cc
index f8735855af0..1b49ce19e90 100644
--- a/libstdc++-v3/testsuite/20_util/optional/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/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/20_util/variant/80165.cc b/libstdc++-v3/testsuite/20_util/variant/80165.cc
index add976c7256..621585b47dc 100644
--- a/libstdc++-v3/testsuite/20_util/variant/80165.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/80165.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 #include <tuple>
diff --git a/libstdc++-v3/testsuite/20_util/variant/85183.cc b/libstdc++-v3/testsuite/20_util/variant/85183.cc
index 5f4342b28bb..f3a6bcdde6d 100644
--- a/libstdc++-v3/testsuite/20_util/variant/85183.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/85183.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 <variant>
diff --git a/libstdc++-v3/testsuite/20_util/variant/86874.cc b/libstdc++-v3/testsuite/20_util/variant/86874.cc
index 6a9844e4f16..3f104d42499 100644
--- a/libstdc++-v3/testsuite/20_util/variant/86874.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/86874.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 <variant>
diff --git a/libstdc++-v3/testsuite/20_util/variant/87431.cc b/libstdc++-v3/testsuite/20_util/variant/87431.cc
index b829d61e116..9ee554b40fc 100644
--- a/libstdc++-v3/testsuite/20_util/variant/87431.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/87431.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 <variant>
diff --git a/libstdc++-v3/testsuite/20_util/variant/87619.cc b/libstdc++-v3/testsuite/20_util/variant/87619.cc
index fdb7e54133e..e83fa0306b6 100644
--- a/libstdc++-v3/testsuite/20_util/variant/87619.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/87619.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 <variant>
diff --git a/libstdc++-v3/testsuite/20_util/variant/91807.cc b/libstdc++-v3/testsuite/20_util/variant/91807.cc
index fc60bc4da70..19be5953fe4 100644
--- a/libstdc++-v3/testsuite/20_util/variant/91807.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/91807.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 
 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/variant/any.cc b/libstdc++-v3/testsuite/20_util/variant/any.cc
index e865f9cdecf..b3febf8aed7 100644
--- a/libstdc++-v3/testsuite/20_util/variant/any.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/any.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/variant/compile.cc b/libstdc++-v3/testsuite/20_util/variant/compile.cc
index e5042751e66..3a2e9724757 100644
--- a/libstdc++-v3/testsuite/20_util/variant/compile.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/compile.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/variant/deduction.cc b/libstdc++-v3/testsuite/20_util/variant/deduction.cc
index 869eeb76a72..8aa7a7044bd 100644
--- a/libstdc++-v3/testsuite/20_util/variant/deduction.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/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/variant/exception_safety.cc b/libstdc++-v3/testsuite/20_util/variant/exception_safety.cc
index 7a3401980ff..b386c9e36f4 100644
--- a/libstdc++-v3/testsuite/20_util/variant/exception_safety.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/exception_safety.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 <variant>
diff --git a/libstdc++-v3/testsuite/20_util/variant/hash.cc b/libstdc++-v3/testsuite/20_util/variant/hash.cc
index ee36c72384e..4d47593c2d6 100644
--- a/libstdc++-v3/testsuite/20_util/variant/hash.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/hash.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/variant/index_type.cc b/libstdc++-v3/testsuite/20_util/variant/index_type.cc
index 97acf785c21..c24e6842367 100644
--- a/libstdc++-v3/testsuite/20_util/variant/index_type.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/index_type.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target { ilp32 || lp64 } } }
 // { dg-require-effective-target c++17 }
 
diff --git a/libstdc++-v3/testsuite/20_util/variant/relops/89851.cc b/libstdc++-v3/testsuite/20_util/variant/relops/89851.cc
index 32a3c774a01..fcf851a5f33 100644
--- a/libstdc++-v3/testsuite/20_util/variant/relops/89851.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/relops/89851.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 <variant>
diff --git a/libstdc++-v3/testsuite/20_util/variant/relops/90008.cc b/libstdc++-v3/testsuite/20_util/variant/relops/90008.cc
index 2c16c848623..1309d54bf24 100644
--- a/libstdc++-v3/testsuite/20_util/variant/relops/90008.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/relops/90008.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 <variant>
diff --git a/libstdc++-v3/testsuite/20_util/variant/run.cc b/libstdc++-v3/testsuite/20_util/variant/run.cc
index 7fe46d8eebb..95edd4d7e30 100644
--- a/libstdc++-v3/testsuite/20_util/variant/run.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/run.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/variant/visit.cc b/libstdc++-v3/testsuite/20_util/variant/visit.cc
index ebe0344b585..81cab0878f6 100644
--- a/libstdc++-v3/testsuite/20_util/variant/visit.cc
+++ b/libstdc++-v3/testsuite/20_util/variant/visit.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 <variant>