libstdc++: Use c++NN_only effective target to tests
authorJonathan Wakely <jwakely@redhat.com>
Fri, 31 Jul 2020 18:58:02 +0000 (19:58 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 31 Jul 2020 18:58:02 +0000 (19:58 +0100)
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.

libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc
libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++11.cc
libstdc++-v3/testsuite/24_iterators/headers/iterator/range_access_c++14.cc
libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc
libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc
libstdc++-v3/testsuite/26_numerics/valarray/69116.cc
libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc

index 3dbd091..613da84 100644 (file)
@@ -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>
 
index aed0ed4..0992887 100644 (file)
@@ -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.
 //
index 2523dc3..f592338 100644 (file)
@@ -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.
 //
index da7821e..1fd115a 100644 (file)
@@ -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.
index c2dd942..f296c85 100644 (file)
@@ -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.
index 223dec3..579c01c 100644 (file)
@@ -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