diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-10-08 20:41:24 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-10-09 00:57:48 +0100 |
commit | 29a9de9b40277af98515eabebb75be1f154e9505 (patch) | |
tree | 0ee8913de87e52f5e438afdd79af813d1d6d539e /libstdc++-v3/testsuite | |
parent | d87105d697ced10e1f7af3f1f80ef6c9890c8585 (diff) | |
download | gcc-29a9de9b40277af98515eabebb75be1f154e9505.tar.gz |
libstdc++: Replace uses of _GLIBCXX_USE_INT128 in testsuite
Since r12-435 the _GLIBCXX_USE_INT128 macro is never defined, so all
uses of it in the testsuite are wrong. The tests should be checking
__SIZEOF_INT128__ instead.
Also add some tests for an INT_3 type, which were missing.
libstdc++-v3/ChangeLog:
* testsuite/18_support/numeric_limits/40856.cc: Replace use of
_GLIBCXX_USE_INT128.
* testsuite/18_support/numeric_limits/dr559.cc: Likewise.
* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
* testsuite/20_util/is_floating_point/value.cc: Likewise.
* testsuite/20_util/is_integral/value.cc: Likewise.
* testsuite/20_util/is_signed/value.cc: Likewise.
* testsuite/20_util/is_unsigned/value.cc: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-1.cc:
Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-2.cc:
Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
Likewise.
* testsuite/20_util/type_identity/requirements/typedefs.cc:
Likewise.
* testsuite/26_numerics/bit/bit.count/countl_one.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc:
Likewise.
* testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
libstdc++-v3/ChangeLog:
* testsuite/26_numerics/bit/bit.rotate/rotr.cc:
* testsuite/util/testsuite_common_types.h:
Diffstat (limited to 'libstdc++-v3/testsuite')
25 files changed, 66 insertions, 26 deletions
diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc index 08564fbf174..ee1cf9c0cf8 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc @@ -19,8 +19,8 @@ #include <limits> -// libstdc++/40856 -#if defined _GLIBCXX_USE_INT128 && ! defined __STRICT_ANSI__ +// libstdc++/40856 +#if defined __SIZEOF_INT128__ static_assert(std::numeric_limits<__int128>::is_specialized == true, ""); static_assert(std::numeric_limits<unsigned __int128>::is_specialized == true, ""); diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc index a90cc46b186..96a63676739 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc @@ -98,7 +98,7 @@ int main() do_test<long long>(); do_test<unsigned long long>(); // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ do_test<__int128>(); do_test<unsigned __int128>(); #endif diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc index 49c1c4d6953..b44dcf42826 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc @@ -74,7 +74,7 @@ void test01() do_test<unsigned long long>(); // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ do_test<__int128>(); do_test<unsigned __int128>(); #endif diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc index a136439a761..bc7317c76a3 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc @@ -49,7 +49,7 @@ test01() VERIFY( std::numeric_limits<char32_t>::max_digits10 == 0 ); // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ VERIFY( std::numeric_limits<__int128>::max_digits10 == 0 ); VERIFY( std::numeric_limits<unsigned __int128>::max_digits10 == 0 ); #endif diff --git a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc index 5dbdbf84d99..c84351c706f 100644 --- a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc @@ -53,7 +53,7 @@ void test01() static_assert(test_category<is_floating_point, __float128>(true), ""); #endif -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ static_assert(test_category<is_floating_point, __int128>(false), ""); static_assert(test_category<is_floating_point, unsigned __int128>(false), ""); diff --git a/libstdc++-v3/testsuite/20_util/is_integral/value.cc b/libstdc++-v3/testsuite/20_util/is_integral/value.cc index 46923262965..44962b55895 100644 --- a/libstdc++-v3/testsuite/20_util/is_integral/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_integral/value.cc @@ -55,7 +55,7 @@ void test01() #ifndef __STRICT_ANSI__ // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ static_assert(test_category<is_integral, __int128>(true), ""); static_assert(test_category<is_integral, unsigned __int128>(true), ""); #endif diff --git a/libstdc++-v3/testsuite/20_util/is_signed/value.cc b/libstdc++-v3/testsuite/20_util/is_signed/value.cc index f55d0f62b3a..8d17e972090 100644 --- a/libstdc++-v3/testsuite/20_util/is_signed/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_signed/value.cc @@ -51,7 +51,7 @@ void test01() #ifndef __STRICT_ANSI__ // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ static_assert(test_category<is_signed, __int128>(true), ""); static_assert(test_category<is_signed, unsigned __int128>(false), ""); #endif diff --git a/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc b/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc index bda79ecdb46..d682220358b 100644 --- a/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc @@ -51,7 +51,7 @@ void test01() #ifndef __STRICT_ANSI__ // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ static_assert(test_category<is_unsigned, unsigned __int128>(true), ""); static_assert(test_category<is_unsigned, __int128>(false), ""); #endif diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc index 87b6155564a..c010c9701df 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc @@ -68,7 +68,7 @@ void test01() #ifndef __STRICT_ANSI__ // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ typedef make_signed<unsigned __int128>::type test25_type; static_assert( is_same<test25_type, __int128>::value, "make_signed<unsigned __int128>" ); diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc index 879e19f9779..0edf3d648b5 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc @@ -61,7 +61,7 @@ void test01() #ifndef __STRICT_ANSI__ // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ typedef make_signed<unsigned __int128>::type test25_type; static_assert(is_same<test25_type, __int128>::value, ""); diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc index 3e4649a4f18..e437c53cd8e 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc @@ -62,7 +62,7 @@ void test01() #ifndef __STRICT_ANSI__ // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ typedef make_unsigned<unsigned __int128>::type test25_type; static_assert(is_same<test25_type, unsigned __int128>::value, ""); diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc index 36ec6365785..7e2b8c459e7 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc @@ -61,7 +61,7 @@ void test01() #ifndef __STRICT_ANSI__ // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ typedef make_unsigned<unsigned __int128>::type test25_type; static_assert(is_same<test25_type, unsigned __int128>::value, ""); diff --git a/libstdc++-v3/testsuite/20_util/type_identity/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/type_identity/requirements/typedefs.cc index 302162c4f86..61f84118c63 100644 --- a/libstdc++-v3/testsuite/20_util/type_identity/requirements/typedefs.cc +++ b/libstdc++-v3/testsuite/20_util/type_identity/requirements/typedefs.cc @@ -86,7 +86,7 @@ void test01() #ifndef __STRICT_ANSI__ // GNU Extensions. -#ifdef _GLIBCXX_USE_INT128 +#ifdef __SIZEOF_INT128__ static_assert(test<unsigned __int128>::value, ""); static_assert(test<unsigned __int128>::value, ""); #endif diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countl_one.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countl_one.cc index 9412a80049f..5e2a314e13a 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countl_one.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countl_one.cc @@ -74,7 +74,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -90,6 +90,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countl_zero.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countl_zero.cc index e198f855439..dc4d2e6cbd2 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countl_zero.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countl_zero.cc @@ -71,7 +71,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -87,6 +87,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countr_one.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countr_one.cc index db0e76b3a39..677daa52c2d 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countr_one.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countr_one.cc @@ -73,7 +73,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -89,6 +89,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countr_zero.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countr_zero.cc index f273dcb4b4b..7f45fbc9d32 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countr_zero.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/countr_zero.cc @@ -72,7 +72,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -88,6 +88,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/popcount.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/popcount.cc index 0f088fe6a7c..b37b3ef54a7 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.count/popcount.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.count/popcount.cc @@ -75,7 +75,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -91,6 +91,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc index 509fce4bb09..c6ed47fda07 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc @@ -107,7 +107,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc index d51555f323f..eb2b66b331c 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc @@ -79,7 +79,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -95,6 +95,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_width.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_width.cc index 8e91f5d0e0e..053f81b0c7d 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_width.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_width.cc @@ -79,7 +79,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -95,6 +95,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc index 756d57dbf85..6df9cec6665 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc @@ -127,7 +127,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -143,6 +143,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.rotate/rotl.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.rotate/rotl.cc index 6022b9b3834..8a879eb85b2 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.rotate/rotl.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.rotate/rotl.cc @@ -104,7 +104,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -120,6 +120,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.rotate/rotr.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.rotate/rotr.cc index a77c45d9786..46c20636cf5 100644 --- a/libstdc++-v3/testsuite/26_numerics/bit/bit.rotate/rotr.cc +++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.rotate/rotr.cc @@ -106,7 +106,7 @@ static_assert( test( X{} ).did_not_match() ); enum E : unsigned { e }; static_assert( test( e ).did_not_match() ); -#if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128 +#if !defined(__STRICT_ANSI__) && defined __SIZEOF_INT128__ static_assert( test( (unsigned __int128)0 ) ); static_assert( test( (__int128)0 ).did_not_match() ); #endif @@ -122,6 +122,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() ); static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) ); static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() ); #endif +#if defined(__GLIBCXX_TYPE_INT_N_3) +static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) ); +static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() ); +#endif #include <cstddef> static_assert( test( (std::byte)0 ).did_not_match() ); diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h index 9a3152b3a84..392264fd207 100644 --- a/libstdc++-v3/testsuite/util/testsuite_common_types.h +++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h @@ -327,7 +327,7 @@ namespace __gnu_test #else typedef node<null_type> char8_typelist; #endif -# if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128) +# if !defined(__STRICT_ANSI__) && defined(__SIZEOF_INT128__) __extension__ typedef __int128 a17; __extension__ typedef unsigned __int128 a18; typedef node<_GLIBCXX_TYPELIST_CHAIN2(a17, a18)> int128_typelist; |