From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id AA6E9396B422 for ; Mon, 10 May 2021 15:30:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AA6E9396B422 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-240-e5M0cyDRMYKyXIXcYpr2rA-1; Mon, 10 May 2021 11:30:29 -0400 X-MC-Unique: e5M0cyDRMYKyXIXcYpr2rA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1DC95107ACCD; Mon, 10 May 2021 15:30:17 +0000 (UTC) Received: from localhost (unknown [10.33.36.164]) by smtp.corp.redhat.com (Postfix) with ESMTP id 918F81037F2F; Mon, 10 May 2021 15:30:16 +0000 (UTC) Date: Mon, 10 May 2021 16:30:15 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed 8/9] libstdc++: Remove redundant -std=gnu++17 options from algorithm tests Message-ID: <20210510153015.GO3008@redhat.com> References: MIME-Version: 1.0 In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="n2RoZOfqketZuWCG" Content-Disposition: inline X-Spam-Status: No, score=-15.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2021 15:30:34 -0000 --n2RoZOfqketZuWCG Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline 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. --n2RoZOfqketZuWCG Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit d7b2d92747f8d236050af3ec5741786f0f878716 Author: Jonathan Wakely 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 // . -// { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } #include 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 // . -// { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } #include 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 // . -// { dg-options "-std=gnu++17" } // { dg-do compile { target c++17 } } #include 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 // . -// { dg-options "-std=gnu++17" } // { dg-do run { target { c++17 && { ! simulator } } } } #include 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 // . -// { dg-options "-std=gnu++17" } // { dg-do compile { target c++17 } } #include 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 // . -// { dg-options "-std=gnu++17" } // { dg-do run { target { c++17 && { ! simulator } } } } #include 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 // . -// { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } #include 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 // . -// { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } #include 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 // . -// { 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 // . -// { 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 // . -// { 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 // . -// { 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 // . -// { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } #include 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. --n2RoZOfqketZuWCG--