From: Matthias Kretz Date: Thu, 25 May 2023 10:07:45 +0000 (+0200) Subject: libstdc++: Fix test assumptions on long and long double X-Git-Tag: releases/gcc-11.5.0~751 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7ede951fbeecf54b31b84ae7b17e99ce203d4de;p=thirdparty%2Fgcc.git libstdc++: Fix test assumptions on long and long double Expect that long might not fit into the long double mantissa bits. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/tests/operator_cvt.cc: Make long double <-> (u)long conversion tests conditional on sizeof(long double) and sizeof(long). (cherry picked from commit 291549d43e823f163fa9961e42a751b5ce0d57fb) --- diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc index 8e7cfc5c25bb..972888f7bcb0 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc @@ -220,8 +220,6 @@ template binary_op_return_type(); binary_op_return_type(); binary_op_return_type(); - binary_op_return_type(); - binary_op_return_type(); binary_op_return_type(); binary_op_return_type(); @@ -231,8 +229,6 @@ template binary_op_return_type, ushort>(); binary_op_return_type, int>(); binary_op_return_type, uint>(); - binary_op_return_type, long>(); - binary_op_return_type, ulong>(); binary_op_return_type, float>(); binary_op_return_type, double>(); binary_op_return_type, vf64>(); @@ -245,8 +241,6 @@ template binary_op_return_type, ushort>(); binary_op_return_type, int>(); binary_op_return_type, uint>(); - binary_op_return_type, long>(); - binary_op_return_type, ulong>(); binary_op_return_type, float>(); binary_op_return_type, double>(); @@ -258,6 +252,24 @@ template VERIFY((is_substitution_failure, ullong>)); VERIFY((is_substitution_failure, llong>)); VERIFY((is_substitution_failure, ullong>)); + if constexpr (sizeof(long) == sizeof(llong)) + { + VERIFY((is_substitution_failure)); + VERIFY((is_substitution_failure)); + VERIFY((is_substitution_failure, long>)); + VERIFY((is_substitution_failure, ulong>)); + VERIFY((is_substitution_failure, long>)); + VERIFY((is_substitution_failure, ulong>)); + } + else + { + binary_op_return_type(); + binary_op_return_type(); + binary_op_return_type, long>(); + binary_op_return_type, ulong>(); + binary_op_return_type, long>(); + binary_op_return_type, ulong>(); + } } else { @@ -267,6 +279,12 @@ template binary_op_return_type, ullong>(); binary_op_return_type, llong>(); binary_op_return_type, ullong>(); + binary_op_return_type(); + binary_op_return_type(); + binary_op_return_type, long>(); + binary_op_return_type, ulong>(); + binary_op_return_type, long>(); + binary_op_return_type, ulong>(); } VERIFY((is_substitution_failure, vldouble>));