public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed 8/9] libstdc++: Remove redundant -std=gnu++17 options from algorithm tests
Date: Mon, 10 May 2021 16:30:15 +0100	[thread overview]
Message-ID: <20210510153015.GO3008@redhat.com> (raw)
In-Reply-To: <YJlQnPWJ/c47B+m0@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

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.



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 16452 bytes --]

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

    libstdc++: Remove redundant -std=gnu++17 option from algorithm 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/function_objects/searchers.cc: Remove
            -std=gnu++17 from dg-options directive.
            * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
            Likewise.
            * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
            Likewise.
            * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
            Likewise.
            * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.cc:
            Likewise.
            * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
            Likewise.
            * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
            Likewise.
            * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
            Likewise.
            * testsuite/25_algorithms/clamp/1.cc: Likewise.
            * testsuite/25_algorithms/clamp/2.cc: Likewise.
            * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
            * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
            Likewise.
            * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
            Likewise.
            * testsuite/25_algorithms/for_each/for_each_n.cc: Likewise.
            * testsuite/25_algorithms/for_each/for_each_n_debug.cc:
            Likewise.
            * testsuite/25_algorithms/sample/1.cc: Likewise.
            * testsuite/25_algorithms/sample/2.cc: Likewise.
            * testsuite/25_algorithms/sample/3.cc: Likewise.
            * testsuite/25_algorithms/sample/81221.cc: Likewise.
            * testsuite/25_algorithms/search/searcher.cc: Likewise.
            * testsuite/26_numerics/exclusive_scan/1.cc: Likewise.
            * testsuite/26_numerics/inclusive_scan/1.cc: Likewise.
            * testsuite/26_numerics/reduce/1.cc: Likewise.
            * testsuite/26_numerics/reduce/2.cc: Likewise.
            * testsuite/26_numerics/transform_exclusive_scan/1.cc: Likewise.
            * testsuite/26_numerics/transform_inclusive_scan/1.cc: Likewise.
            * testsuite/26_numerics/transform_reduce/1.cc: Likewise.

diff --git a/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc b/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc
index 4f134d91e00..f8899659cbe 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/searchers.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/specialized_algorithms/memory_management_tools/1.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc
index a4a7725ce3c..cabed8bd461 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/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 <memory>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc
index 626f2e1c6ee..e114168842e 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_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>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc
index 51fb18949e4..865f29cddbd 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.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 && { ! simulator } } } }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.cc
index 6d9635ee6c9..8ab9df32347 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.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/specialized_algorithms/uninitialized_value_construct_n/94540.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc
index 9de74c29074..5fd4e550f75 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.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 && { ! simulator } } } }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc
index 5833f7ed6c3..f1f4f1f46e4 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.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/unique_ptr/specialized_algorithms/swap_cxx17.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc
index fdb3cf89d13..f1c17a42694 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/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/25_algorithms/clamp/1.cc b/libstdc++-v3/testsuite/25_algorithms/clamp/1.cc
index e4719d7a13a..2a24c58cee6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/clamp/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/clamp/1.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/25_algorithms/clamp/2.cc b/libstdc++-v3/testsuite/25_algorithms/clamp/2.cc
index 7884ede32c3..23256477147 100644
--- a/libstdc++-v3/testsuite/25_algorithms/clamp/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/clamp/2.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2000-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/25_algorithms/clamp/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/clamp/constexpr.cc
index 2f66bf858fc..46bf0f5a22a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/clamp/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/clamp/constexpr.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/25_algorithms/clamp/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc
index 5017aacfee7..b64064017cc 100644
--- a/libstdc++-v3/testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.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/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc
index 50726161bb9..2ede166c002 100644
--- a/libstdc++-v3/testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.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/25_algorithms/for_each/for_each_n.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/for_each_n.cc
index 72065d181bb..625f3782e72 100644
--- a/libstdc++-v3/testsuite/25_algorithms/for_each/for_each_n.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/for_each/for_each_n.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/25_algorithms/for_each/for_each_n_debug.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/for_each_n_debug.cc
index 24ec995d90e..43cb98db4a4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/for_each/for_each_n_debug.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/for_each/for_each_n_debug.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 <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/sample/1.cc b/libstdc++-v3/testsuite/25_algorithms/sample/1.cc
index ade52b6cf7c..d8adfbb49b2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sample/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sample/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 } }
 // { dg-require-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/sample/2.cc b/libstdc++-v3/testsuite/25_algorithms/sample/2.cc
index 7d42b99ecba..8144492a3c8 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sample/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sample/2.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-require-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/sample/3.cc b/libstdc++-v3/testsuite/25_algorithms/sample/3.cc
index 6aeb1a97f8b..7b20c67690e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sample/3.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sample/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-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc b/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc
index 36f504c758d..26301627b3c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sample/81221.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-parallel-mode "" }
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/search/searcher.cc b/libstdc++-v3/testsuite/25_algorithms/search/searcher.cc
index d1b9e45f622..fe477ba4361 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search/searcher.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search/searcher.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 <algorithm>
diff --git a/libstdc++-v3/testsuite/26_numerics/exclusive_scan/1.cc b/libstdc++-v3/testsuite/26_numerics/exclusive_scan/1.cc
index 1c8c2352160..b0f684aa5b3 100644
--- a/libstdc++-v3/testsuite/26_numerics/exclusive_scan/1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/exclusive_scan/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/26_numerics/inclusive_scan/1.cc b/libstdc++-v3/testsuite/26_numerics/inclusive_scan/1.cc
index 183ef629416..ab330a12093 100644
--- a/libstdc++-v3/testsuite/26_numerics/inclusive_scan/1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/inclusive_scan/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/26_numerics/reduce/1.cc b/libstdc++-v3/testsuite/26_numerics/reduce/1.cc
index eceb3bea769..134874cc344 100644
--- a/libstdc++-v3/testsuite/26_numerics/reduce/1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/reduce/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/26_numerics/reduce/2.cc b/libstdc++-v3/testsuite/26_numerics/reduce/2.cc
index 12396c6f37a..7df4ef4b34e 100644
--- a/libstdc++-v3/testsuite/26_numerics/reduce/2.cc
+++ b/libstdc++-v3/testsuite/26_numerics/reduce/2.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/26_numerics/transform_exclusive_scan/1.cc b/libstdc++-v3/testsuite/26_numerics/transform_exclusive_scan/1.cc
index 486c836ba07..5bade1fa332 100644
--- a/libstdc++-v3/testsuite/26_numerics/transform_exclusive_scan/1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/transform_exclusive_scan/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/26_numerics/transform_inclusive_scan/1.cc b/libstdc++-v3/testsuite/26_numerics/transform_inclusive_scan/1.cc
index 790d5f79ac5..8f36147763d 100644
--- a/libstdc++-v3/testsuite/26_numerics/transform_inclusive_scan/1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/transform_inclusive_scan/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/26_numerics/transform_reduce/1.cc b/libstdc++-v3/testsuite/26_numerics/transform_reduce/1.cc
index 20556289d6e..5be79d93c82 100644
--- a/libstdc++-v3/testsuite/26_numerics/transform_reduce/1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/transform_reduce/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 
 // Copyright (C) 2019-2021 Free Software Foundation, Inc.

  parent reply	other threads:[~2021-05-10 15:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 15:26 [committed 1/9] libstdc++: Remove redundant -std=gnu++17 options from PSTL tests Jonathan Wakely
2021-05-10 15:27 ` [committed 2/9] libstdc++: Remove redundant -std=gnu++17 options from filesystem tests Jonathan Wakely
2021-05-10 15:27 ` [committed 3/9] libstdc++: Remove redundant -std=gnu++17 options from any/optional/variant tests Jonathan Wakely
2021-05-10 15:28 ` [committed 4/9] libstdc++: Remove redundant -std=gnu++17 options from concurrency tests Jonathan Wakely
2021-05-10 15:29 ` [committed 5/9] libstdc++: Remove redundant -std=gnu++17 options from PMR tests Jonathan Wakely
2021-05-10 15:29 ` [committed 6/9] libstdc++: Remove redundant -std=gnu++17 options from strings tests Jonathan Wakely
2021-05-10 15:29 ` [committed 7/9] libstdc++: Remove redundant -std=gnu++17 options from containers tests Jonathan Wakely
2021-05-10 15:31   ` Jonathan Wakely
2021-05-10 15:30 ` Jonathan Wakely [this message]
2021-05-10 15:30 ` [committed 9/9] libstdc++: Remove redundant -std=gnu++17 options from remaining tests Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210510153015.GO3008@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).