[committed,2/5] libstdc++: Use c++NN_only effective target to tests

Message ID 20200731190041.GA1313035@redhat.com
State New
Headers show
Series
  • [committed,1/5] libstdc++: Ensure c++NN effective target present in all C++17 tests
Related show

Commit Message

Jonathan Wakely via Gcc-patches July 31, 2020, 7 p.m.
Some tests really are only intended for a specific -std mode, so add a
target selector to make that explicit.

Also reorder the dg-do directives to come after the dg-options ones, so
that the target selector in the dg-do directive is applied after the
dg-options that sets the -std option.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/reference_wrapper/83427.cc: Adjust
	effective-target to specific language mode only.
	* testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
	Likewise.
	* testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
	Likewise.
	* testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
	Likewise.
	* testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
	Likewise.
	* testsuite/26_numerics/valarray/69116.cc:
	Likewise.
	* testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
	Remove whitespace at end of file.
	* testsuite/30_threads/headers/future/std_c++0x_neg.cc:
	Likewise.

Tested powerpc64le-linux, committed to trunk.
commit 566f42273467817a31a7a1ae058ba759837eec22
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jul 31 19:58:02 2020

    libstdc++: Use c++NN_only effective target to tests
    
    Some tests really are only intended for a specific -std mode, so add a
    target selector to make that explicit.
    
    Also reorder the dg-do directives to come after the dg-options ones, so
    that the target selector in the dg-do directive is applied after the
    dg-options that sets the -std option.
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/20_util/reference_wrapper/83427.cc: Adjust
            effective-target to specific language mode only.
            * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
            Likewise.
            * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
            Likewise.
            * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
            Likewise.
            * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
            Likewise.
            * testsuite/26_numerics/valarray/69116.cc:
            Likewise.
            * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
            Remove whitespace at end of file.
            * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
            Likewise.

Patch

diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc
index 3dbd0917621..613da848d72 100644
--- a/libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc
+++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc
@@ -16,7 +16,7 @@ 
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++17" }
-// { dg-do compile { target c++17 } }
+// { dg-do compile { target c++17_only } }
 
 #include <functional>
 
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++11.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++11.cc
index aed0ed45406..099288716e3 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++11.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++11.cc
@@ -1,5 +1,5 @@ 
 // { dg-options "-std=gnu++11" }
-// { dg-do compile }
+// { dg-do compile { target c++11_only } }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++14.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++14.cc
index 2523dc3d696..f5923386b79 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++14.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++14.cc
@@ -1,5 +1,5 @@ 
 // { dg-options "-std=gnu++14" }
-// { dg-do compile }
+// { dg-do compile { target c++14_only } }
 
 // Copyright (C) 2016-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc
index da7821e20ee..1fd115abd87 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc
@@ -1,5 +1,5 @@ 
 // { dg-options "-std=gnu++11" }
-// { dg-do compile }
+// { dg-do compile { target c++11_only } }
 // { dg-require-normal-namespace "" }
 
 // Copyright (C) 2016-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc
index c2dd942f6e7..f296c852e76 100644
--- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc
+++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc
@@ -1,5 +1,5 @@ 
 // { dg-options "-std=gnu++14" }
-// { dg-do compile }
+// { dg-do compile { target c++14_only } }
 // { dg-require-normal-namespace "" }
 
 // Copyright (C) 2016-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/26_numerics/valarray/69116.cc b/libstdc++-v3/testsuite/26_numerics/valarray/69116.cc
index 223dec3d11f..579c01cb37d 100644
--- a/libstdc++-v3/testsuite/26_numerics/valarray/69116.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/69116.cc
@@ -15,8 +15,8 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
 // { dg-options "-std=gnu++98" }
+// { dg-do compile { target c++98_only } }
 
 // libstdc++/69116
 
diff --git a/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc b/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
index 0b615988a77..45a0c74a9f7 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
@@ -21,6 +21,3 @@ 
 #include <condition_variable>
 
 // { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
-
-
-
diff --git a/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc b/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
index 22463f4bc55..c67214e4b21 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
@@ -21,6 +21,3 @@ 
 #include <future>
 
 // { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
-
-
-