From: Jonathan Wakely Date: Tue, 18 Feb 2020 18:56:30 +0000 (+0000) Subject: libstdc++: Fix new tests that fail for ILP32 targets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce7b39d0fc694e5ec80520b7cc76f91a5476d7db;p=gcc.git libstdc++: Fix new tests that fail for ILP32 targets * 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. --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6efae7271b2..601d26480fa 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,12 @@ 2020-02-18 Jonathan Wakely + * 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 diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/equal.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/equal.cc index 16d4e3bd65c..10ba39432be 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/equal.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/equal.cc @@ -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) ); diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal.cc index 61f461b4056..f80c62f1274 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal.cc @@ -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) ); diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/less.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/less.cc index a35006fc2fb..b70f4917103 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/less.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/less.cc @@ -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) ); diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal.cc index 7875802856c..b3a3ac8d2fa 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal.cc @@ -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) ); diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal.cc index 81cbb3f4921..97f6fe6cfc3 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal.cc @@ -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) );