libstdc++: Fix new tests that fail for ILP32 targets
authorJonathan Wakely <jwakely@redhat.com>
Tue, 18 Feb 2020 18:56:30 +0000 (18:56 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 18 Feb 2020 18:57:30 +0000 (18:57 +0000)
* testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
assumption that long is wider than int.
* testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
* testsuite/20_util/integer_comparisons/less.cc: Likewise.
* testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
* testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/integer_comparisons/equal.cc
libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal.cc
libstdc++-v3/testsuite/20_util/integer_comparisons/less.cc
libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal.cc
libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal.cc

index 6efae7271b2d512cbf23d3d7dd2981031f5c77b7..601d26480fa6e0bfdaf3b271853c0b2a55d71857 100644 (file)
@@ -1,5 +1,12 @@
 2020-02-18  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
+       assumption that long is wider than int.
+       * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
+       * testsuite/20_util/integer_comparisons/less.cc: Likewise.
+       * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
+       * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
+
        P1976R2 Fixed-size span construction from dynamic range
        * include/std/span (__cpp_lib_span): Update value.
        (span(It, size_type), span(It, End)): Make conditionally explicit. Add
index 16d4e3bd65c10d5abf963073d8bb0da166248caf..10ba39432be390100fbb522d459fb6eafdd1ee1f 100644 (file)
@@ -56,7 +56,7 @@ test03()
   VERIFY( !std::cmp_equal(ss, u) );
   VERIFY( !std::cmp_equal(u, ss) );
 
-  unsigned long ul = (unsigned long) -1;
+  unsigned long long ul = (unsigned long long) -1;
   VERIFY( !std::cmp_equal(s, ul) );
   VERIFY( !std::cmp_equal(ul, s) );
   VERIFY( !std::cmp_equal(ss, ul) );
index 61f461b40561a2390b3f5647141f9ce769e548b5..f80c62f12748e9e0e02293e1018ff630694729d0 100644 (file)
@@ -62,7 +62,7 @@ test03()
   VERIFY( std::cmp_greater_equal(u, ss) );
   VERIFY( std::cmp_greater_equal(u, -2U) );
 
-  unsigned long ul = (unsigned long) -1;
+  unsigned long long ul = (unsigned long long) -1;
   VERIFY( !std::cmp_greater_equal(s, ul) );
   VERIFY( std::cmp_greater_equal(ul, s) );
   VERIFY( !std::cmp_greater_equal(ss, ul) );
index a35006fc2fbb43b1b2e42a0feb67157140c5ebbd..b70f491710343a2c7238b3991badff1c7f37731e 100644 (file)
@@ -60,7 +60,7 @@ test03()
   VERIFY( std::cmp_less(ss, u) );
   VERIFY( !std::cmp_less(u, ss) );
 
-  unsigned long ul = (unsigned long) -1;
+  unsigned long long ul = (unsigned long long) -1;
   VERIFY( std::cmp_less(s, ul) );
   VERIFY( !std::cmp_less(ul, s) );
   VERIFY( std::cmp_less(ss, ul) );
index 7875802856c1db3f31758dc9b528fb46949f5145..b3a3ac8d2fa18b7ba22d690a2fe3c98eba4f6985 100644 (file)
@@ -62,7 +62,7 @@ test03()
   VERIFY( !std::cmp_less_equal(u, ss) );
   VERIFY( std::cmp_less_equal(-2U, u) );
 
-  unsigned long ul = (unsigned long) -1;
+  unsigned long long ul = (unsigned long long) -1;
   VERIFY( std::cmp_less_equal(s, ul) );
   VERIFY( !std::cmp_less_equal(ul, s) );
   VERIFY( std::cmp_less_equal(ss, ul) );
index 81cbb3f49210dfba286b0a255a0a65d91a174d33..97f6fe6cfc30c7916dc3b33c4af1180ae29f6f94 100644 (file)
@@ -57,7 +57,7 @@ test03()
   VERIFY( std::cmp_not_equal(ss, u) );
   VERIFY( std::cmp_not_equal(u, ss) );
 
-  unsigned long ul = (unsigned long) -1;
+  unsigned long long ul = (unsigned long long) -1;
   VERIFY( std::cmp_not_equal(s, ul) );
   VERIFY( std::cmp_not_equal(ul, s) );
   VERIFY( std::cmp_not_equal(ss, ul) );