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

Message ID 20210510152834.GK3008@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:28 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 9cd88c022fcad783997cd4111b2e6c3700c4b15b
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon May 10 16:22:53 2021

    libstdc++: Remove redundant -std=gnu++17 option from concurrency 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/29_atomics/atomic/69769.cc: Remove -std=gnu++17 from
            dg-options.
            * testsuite/29_atomics/atomic/is_always_lock_free.cc:
            * testsuite/29_atomics/atomic/requirements/typedefs.cc:
            * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
            * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc:
            * testsuite/30_threads/lock_guard/cons/deduction.cc: Likewise.
            * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
            * testsuite/30_threads/scoped_lock/cons/deduction.cc: Likewise.
            * testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc:
            Likewise.
            * testsuite/30_threads/scoped_lock/requirements/typedefs.cc:
            Likewise.
            * testsuite/30_threads/shared_lock/70766.cc: Likewise.
            * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
            * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
            Likewise.
            * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
            * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
            Likewise.
            * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
            * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
            * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
            * testsuite/30_threads/unique_lock/cons/deduction.cc: Likewise.

diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/69769.cc b/libstdc++-v3/testsuite/29_atomics/atomic/69769.cc
index 8258594e67c..d9d0821b8f2 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/69769.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/69769.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-atomic-builtins "" }
 
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/is_always_lock_free.cc b/libstdc++-v3/testsuite/29_atomics/atomic/is_always_lock_free.cc
index 063076ad274..2fa3a40e98c 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/is_always_lock_free.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/is_always_lock_free.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 <atomic>
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/requirements/typedefs.cc b/libstdc++-v3/testsuite/29_atomics/atomic/requirements/typedefs.cc
index 28adc675939..c730e1ab117 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/requirements/typedefs.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-atomic-builtins "" }
 
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/is_always_lock_free.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/is_always_lock_free.cc
index 1d18c93092d..c866118943c 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/is_always_lock_free.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/is_always_lock_free.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 <atomic>
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/typedefs.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/typedefs.cc
index da27c48e97d..981a85bb504 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/typedefs.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-atomic-builtins "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/lock_guard/cons/deduction.cc b/libstdc++-v3/testsuite/30_threads/lock_guard/cons/deduction.cc
index 9dfe6b97063..98091601d52 100644
--- a/libstdc++-v3/testsuite/30_threads/lock_guard/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/30_threads/lock_guard/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 <mutex>
diff --git a/libstdc++-v3/testsuite/30_threads/scoped_lock/cons/1.cc b/libstdc++-v3/testsuite/30_threads/scoped_lock/cons/1.cc
index 278fd8578e7..eef4a7faaaf 100644
--- a/libstdc++-v3/testsuite/30_threads/scoped_lock/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/scoped_lock/cons/1.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/30_threads/scoped_lock/cons/deduction.cc b/libstdc++-v3/testsuite/30_threads/scoped_lock/cons/deduction.cc
index ca7dc2459c2..2b5ea203a0d 100644
--- a/libstdc++-v3/testsuite/30_threads/scoped_lock/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/30_threads/scoped_lock/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 <mutex>
diff --git a/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc
index 0e6e68087a6..6d6ccb04eff 100644
--- a/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 // { dg-require-gthreads "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc b/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc
index dd9626cf090..8cb02cfe54d 100644
--- a/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 // { dg-require-gthreads "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/70766.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/70766.cc
index c8e28dd36c9..6d5755bfd50 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/70766.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/70766.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 <shared_mutex>
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc
index 7c23b9c5f9b..b83de46fea8 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/assign_neg.cc
index 6eb9a653193..667aec5ae56 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/assign_neg.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 // { dg-require-gthreads "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/copy_neg.cc
index 4152981e5bb..67a6a5597db 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/copy_neg.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 // { dg-require-gthreads "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/requirements/standard_layout.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/requirements/standard_layout.cc
index ffb8b044a74..733935442bc 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/requirements/standard_layout.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/requirements/standard_layout.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
 // { dg-require-gthreads "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc
index e5665ab0ce5..42063e7ca21 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc
index 5e03cd144fe..9f68cec828a 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/unlock/1.cc
index d9f2e5ec97d..0427f0f8a05 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/unlock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/unlock/1.cc
@@ -1,4 +1,3 @@ 
-// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/deduction.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/deduction.cc
index b9e0fbceeb2..b676444c755 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/deduction.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/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 <mutex>