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: vendors/ARM/release-12.3.rel1~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6ce93538145372d2d6077e3991a3053c1262e14;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 3241d33f654b..6f9d3c3b780c 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>));