public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Matthias Kretz <mkretz@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-9664] libstdc++: Fix test assumptions on long and long double Date: Tue, 30 May 2023 20:04:59 +0000 (GMT) [thread overview] Message-ID: <20230530200459.A959B3855882@sourceware.org> (raw) https://gcc.gnu.org/g:c6ce93538145372d2d6077e3991a3053c1262e14 commit r12-9664-gc6ce93538145372d2d6077e3991a3053c1262e14 Author: Matthias Kretz <m.kretz@gsi.de> Date: Thu May 25 12:07:45 2023 +0200 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 <m.kretz@gsi.de> 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: --- .../experimental/simd/tests/operator_cvt.cc | 30 +++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc index 3241d33f654..6f9d3c3b780 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 <typename V> binary_op_return_type<vldouble, short>(); binary_op_return_type<vldouble, ushort>(); binary_op_return_type<vldouble, uint>(); - binary_op_return_type<vldouble, long>(); - binary_op_return_type<vldouble, ulong>(); binary_op_return_type<vldouble, float>(); binary_op_return_type<vldouble, double>(); @@ -231,8 +229,6 @@ template <typename V> binary_op_return_type<vf64<long double>, ushort>(); binary_op_return_type<vf64<long double>, int>(); binary_op_return_type<vf64<long double>, uint>(); - binary_op_return_type<vf64<long double>, long>(); - binary_op_return_type<vf64<long double>, ulong>(); binary_op_return_type<vf64<long double>, float>(); binary_op_return_type<vf64<long double>, double>(); binary_op_return_type<vf64<long double>, vf64<long double>>(); @@ -245,8 +241,6 @@ template <typename V> binary_op_return_type<simd<long double, A>, ushort>(); binary_op_return_type<simd<long double, A>, int>(); binary_op_return_type<simd<long double, A>, uint>(); - binary_op_return_type<simd<long double, A>, long>(); - binary_op_return_type<simd<long double, A>, ulong>(); binary_op_return_type<simd<long double, A>, float>(); binary_op_return_type<simd<long double, A>, double>(); @@ -258,6 +252,24 @@ template <typename V> VERIFY((is_substitution_failure<vf64<ldouble>, ullong>)); VERIFY((is_substitution_failure<simd<ldouble, A>, llong>)); VERIFY((is_substitution_failure<simd<ldouble, A>, ullong>)); + if constexpr (sizeof(long) == sizeof(llong)) + { + VERIFY((is_substitution_failure<vldouble, long>)); + VERIFY((is_substitution_failure<vldouble, ulong>)); + VERIFY((is_substitution_failure<vf64<ldouble>, long>)); + VERIFY((is_substitution_failure<vf64<ldouble>, ulong>)); + VERIFY((is_substitution_failure<simd<ldouble, A>, long>)); + VERIFY((is_substitution_failure<simd<ldouble, A>, ulong>)); + } + else + { + binary_op_return_type<vldouble, long>(); + binary_op_return_type<vldouble, ulong>(); + binary_op_return_type<vf64<long double>, long>(); + binary_op_return_type<vf64<long double>, ulong>(); + binary_op_return_type<simd<long double, A>, long>(); + binary_op_return_type<simd<long double, A>, ulong>(); + } } else { @@ -267,6 +279,12 @@ template <typename V> binary_op_return_type<vf64<long double>, ullong>(); binary_op_return_type<simd<long double, A>, llong>(); binary_op_return_type<simd<long double, A>, ullong>(); + binary_op_return_type<vldouble, long>(); + binary_op_return_type<vldouble, ulong>(); + binary_op_return_type<vf64<long double>, long>(); + binary_op_return_type<vf64<long double>, ulong>(); + binary_op_return_type<simd<long double, A>, long>(); + binary_op_return_type<simd<long double, A>, ulong>(); } VERIFY((is_substitution_failure<vf64<long double>, vldouble>));
reply other threads:[~2023-05-30 20:04 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230530200459.A959B3855882@sourceware.org \ --to=mkretz@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).