libstdc++: Ensure c++NN effective-target present in more tests
authorJonathan Wakely <jwakely@redhat.com>
Fri, 31 Jul 2020 18:58:03 +0000 (19:58 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 31 Jul 2020 18:58:03 +0000 (19:58 +0100)
Add effective-target keywords to tests that would fail for certain
standard modes without the -std=gnu++NN option.

libstdc++-v3/ChangeLog:

* testsuite/18_support/set_terminate.cc: Require C++11 or
higher.
* testsuite/28_regex/simple_c++11.cc: Likewise.
* testsuite/tr1/headers/c++200x/complex.cc: Likewise.
* testsuite/24_iterators/headers/iterator/synopsis.cc:
Require C++14 or lower.

libstdc++-v3/testsuite/18_support/set_terminate.cc
libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis.cc
libstdc++-v3/testsuite/28_regex/simple_c++11.cc
libstdc++-v3/testsuite/tr1/headers/c++200x/complex.cc

index 4df6e068f583ec6a115dd1aa8c15629d22013401..b832f30a365ae4684508e9802b7f0d858c91edb4 100644 (file)
@@ -16,7 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++11" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
 
 #include <exception>
 #include <testsuite_hooks.h>
index e0b364c38346df66bf4312df88224deee17ccf9d..53bd9c9891c70bd4074cde91ea8e37f4670611ad 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-options "-std=gnu++98" }
-// { dg-do compile }
+// { dg-do compile { target { ! c++17 } } }
 // { dg-require-normal-namespace "" }
 
 // Copyright (C) 2007-2020 Free Software Foundation, Inc.
index 056966b238f9877b64a98c231ed553d257dfe81e..8b3fda5c98da9a94de2ce083a772197ef1d18515 100644 (file)
@@ -16,7 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++11" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
 
 #include <regex>
 
index 9eb9d33301c3bc74c69b01d29ef128f4ad9f5993..652b534cd69a9799dfc6aee3eefc88ea5cb58261 100644 (file)
@@ -1,5 +1,5 @@
-// { dg-do compile }
 // { dg-options "-std=gnu++11" }
+// { dg-do compile { target c++11 } }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
 //