Adjust testcases for C++17 compatibility
authorJonathan Wakely <jwakely@redhat.com>
Wed, 17 Aug 2016 13:39:05 +0000 (14:39 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 17 Aug 2016 13:39:05 +0000 (14:39 +0100)
* testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: Disable
test for C++17.
* testsuite/experimental/chrono/value.cc: Avoid ambiguities in C++17.
* testsuite/experimental/ratio/value.cc: Likewise.
* testsuite/ext/pb_ds/regression/hash_map_rand.cc: Disable test for
C++17.
* testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
* testsuite/tr1/5_numerical_facilities/special_functions/
10_cyl_bessel_k/airy.cc: Adjust namespace of __detail::__airy for
C++17 compatibility.

From-SVN: r239534

14 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc
libstdc++-v3/testsuite/experimental/chrono/value.cc
libstdc++-v3/testsuite/experimental/ratio/value.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand.cc
libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/airy.cc

index 2016a95c5da43831f3b262d4c535dbbebb330e5d..be50c0d703f0084ab4e1f492f67ed523231bbee0 100644 (file)
@@ -1,5 +1,23 @@
 2016-08-17  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: Disable
+       test for C++17.
+       * testsuite/experimental/chrono/value.cc: Avoid ambiguities in C++17.
+       * testsuite/experimental/ratio/value.cc: Likewise.
+       * testsuite/ext/pb_ds/regression/hash_map_rand.cc: Disable test for
+       C++17.
+       * testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
+       * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
+       * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
+       * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
+       * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
+       * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
+       * testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
+       * testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
+       * testsuite/tr1/5_numerical_facilities/special_functions/
+       10_cyl_bessel_k/airy.cc: Adjust namespace of __detail::__airy for
+       C++17 compatibility.
+
        * testsuite/24_iterators/headers/iterator/range_access.cc: Adjust
        expected signatures for C++14 compatibility.
 
index 8910c7e9a906637418fb07744004aa2af14c9964..14be44755ffab521b44a1cebef77ce0c9167732d 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++11" }
-// { dg-do compile }
+// { dg-do compile { target { ! c++1z } } }
 
 // Copyright (C) 2007-2016 Free Software Foundation, Inc.
 //
index 80117fd54b5e950f6196958f8138903b2565b70c..64c16feaef06a698cc55e977ab0b789de3b0efd1 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++14" }
-// { dg-do compile }
+// { dg-do compile { target c++14 } }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
@@ -20,8 +19,8 @@
 
 #include <experimental/chrono>
 
-using namespace std::chrono;
-using namespace std::chrono::experimental;
+using std::chrono::treat_as_floating_point;
+using std::chrono::experimental::treat_as_floating_point_v;
 
 // These tests are rather simple, the front-end tests already test
 // variable templates, and the library tests for the underlying
index 4c8a7f0f28733aa45fe69f06039ea03610f8b349..17a732ba8c49424077990684d3959a2036905c9d 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++14" }
-// { dg-do compile }
+// { dg-do compile { target c++14 } }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
 
 #include <experimental/ratio>
 
-using namespace std;
-using namespace std::experimental;
+using std::ratio;
+using std::ratio_equal;
+using std::ratio_not_equal;
+using std::ratio_less;
+using std::ratio_less_equal;
+using std::ratio_greater;
+using std::ratio_greater_equal;
+using std::experimental::ratio_equal_v;
+using std::experimental::ratio_not_equal_v;
+using std::experimental::ratio_less_v;
+using std::experimental::ratio_less_equal_v;
+using std::experimental::ratio_greater_v;
+using std::experimental::ratio_greater_equal_v;
 
 // These tests are rather simple, the front-end tests already test
 // variable templates, and the library tests for the underlying
index f4c39e018ccd5c5829cc8fb942f3d592a64c7c75..ce50a3022fa95a68685b5cd8685b304ccf8ec0ab 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
index 52ff7dcd195b14b3ba647e66fe6411594e5b9a5a..f476efb87de89c03a5356229abbde8785c401c10 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
index 0ffb103a7829cbc57782ba35d85e296e5241cb04..b06060942035df939b703c3a8d581e691bb94143 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 
 // -*- C++ -*-
index ec85e1a728eaa326804d7afeb584af59b53b3c56..7ba175f55042f25f367d49d686b991fdddef8c78 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 
 // -*- C++ -*-
index 295827e477ecd24697b4c0ef6606142163ad3151..a94d37de491e7749fd04e0691f1f0d40e5c13d88 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
index 81f5de94f35637a4331b100ebada9f0476770125..2a4f1749150560f597c1889be94bbbb22399133f 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
index 0c8296730482dd9a5319733211f73567b0711c6e..46e718da94e4c91f022b4db65f019babd52bedf0 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
index c3632581cebf5c5f1e552b037e5431ccf5941191..2286a8538d705c5f75d468eabc361fe2ecb85c5c 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
index a9a27f7d0a1ac488364ace28be01133794f3a148..52faa6e24030010d677595e119429b0508202aa2 100644 (file)
@@ -1,3 +1,5 @@
+// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17
+// { dg-do run { target { ! c++1z } } }
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
index 24619d5e482118f25eafb97c80a473ee6555ea65..f3aa2ed5c1f377b6ed237ecc72bce7d2375bd528 100644 (file)
 void
 test01()
 {
-  bool test __attribute__((unused)) = true;
   double x, Ai, Bi, Aip, Bip;
   x = 1.0;
+#if __cplusplus <= 201402L
   std::tr1::__detail::__airy(x, Ai, Bi, Aip, Bip);
+#else
+  std::__detail::__airy(x, Ai, Bi, Aip, Bip);
+#endif
 }