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 3dbd09176217339b87937601be662b8f244eb4e5..613da848d72eae92a2b4718016f75af2a0fb2d59 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 aed0ed4540687260237ea026e2862cf05c7b6c5e..099288716e3fe31a24096eabfbc13968d198c422 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 2523dc3d696d7b388596b32c2dcbcb2b2011902a..f5923386b79544661c3a3713420fbee23b6d22fa 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 da7821e20ee019398943e95f0e80a56bb5d67543..1fd115abd87b3f90cfdb3bdba63c712f10a69819 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 c2dd942f6e7a724514583b5e328ffd10aa984edc..f296c852e7684b837e447024875fe0d3249967f6 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 223dec3d11fafdea521946a4d48081ffe21652cc..579c01cb37d379d716646482d82f1e843026487a 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
 
index 0b615988a77a2b4ba9705b02b2dc0166c1aa54f3..45a0c74a9f7b2c94319b7357380b5c4254110c36 100644 (file)
@@ -21,6 +21,3 @@
 #include <condition_variable>
 
 // { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
-
-
-
index 22463f4bc55dab11594c91fb53d70a104b442086..c67214e4b2100df55856be62321163bf8540ccfe 100644 (file)
@@ -21,6 +21,3 @@
 #include <future>
 
 // { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
-
-
-