From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7857) id 57EE83857348; Tue, 30 May 2023 15:09:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57EE83857348 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685459349; bh=b4Sv7nL1dT2T3/fqKq+D80zpjp05jS2GaI8/8zq4Yco=; h=From:To:Subject:Date:From; b=JX4QbPWF4BF7GOkCtAEkkN2udt+yffsXQQBgnEpoQyJGMuomD3QBliLJWJWDc/c4H 9JVxzGXlFCFrpIpaX8NUcEEEcBRregrP0Os5WMaDvnwA1gnHur7vdf1eLd/MYVCRoJ C7idOXMtpLTsiOvM7JUP1IQAayAg6uZJW2U23J1I= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Matthias Kretz To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-7391] libstdc++: Fix test assumptions on long and long double X-Act-Checkin: gcc X-Git-Author: Matthias Kretz X-Git-Refname: refs/heads/releases/gcc-13 X-Git-Oldrev: 15aca2cbe9729f1ee5b9128998654f253f4a2c5f X-Git-Newrev: f51bb83b51be359d0212433e89e560644d44980c Message-Id: <20230530150909.57EE83857348@sourceware.org> Date: Tue, 30 May 2023 15:09:09 +0000 (GMT) List-Id: https://gcc.gnu.org/g:f51bb83b51be359d0212433e89e560644d44980c commit r13-7391-gf51bb83b51be359d0212433e89e560644d44980c Author: Matthias Kretz 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 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 c1acfdf10e0..9b6cb38ff82 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc @@ -219,8 +219,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(); @@ -230,8 +228,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>(); @@ -244,8 +240,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>(); @@ -257,6 +251,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 { @@ -266,6 +278,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>));