libstdc++: Add dg-require-effective-target to std::span assert 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)
The current dg directives say that the tests can run for any standard
mode, but should fail for C++20. What we want is that they only run for
C++20, and are always expected to fail.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
effective-target from xfail selector.
* testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/first_assert_neg.cc: Likewise.
* testsuite/23_containers/span/front_assert_neg.cc: Likewise.
* testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
* testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/last_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_2_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_3_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_4_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_5_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_6_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.

13 files changed:
libstdc++-v3/testsuite/23_containers/span/back_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/first_2_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/first_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/front_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/index_op_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/last_2_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/last_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_2_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_3_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_4_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_5_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_6_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_assert_neg.cc

index 76f2a7e..f536f91 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index 0019fca..d959e5c 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index 7b93abc..096f78c 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index 62dec39..8687f18 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index 10432eb..595e588 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index cc12c1f..5f990d9 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index 773bea4..9f3b4c2 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index a3b856e..9a2d8f5 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index 2c55942..81dff28 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index 8a08263..b8cd9a4 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index c383647..94a2b2c 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index a58d763..4a30e35 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
index 9160489..57c1b6f 100644 (file)
@@ -16,7 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail c++2a } }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS