[libc-commits] [libc] [libc][math][c23] Fix setpayloadsig smoke test on RV32 (PR #102538)
Job Henandez Lara via libc-commits
libc-commits at lists.llvm.org
Thu Aug 8 17:02:36 PDT 2024
Jobhdez wrote:
> The following is still crashing:
>
> ```
> /home/mgadelha/tools/llvm-project/libc/test/src/math/smoke/SetPayloadSigTest.h:71:48: error: no viable conversion from 'long double' to 'StorageType' (aka 'BigInt<128U, false, unsigned long long>')
> 71 | EXPECT_EQ(FPBits::signaling_nan(Sign::POS, nan_payload).uintval(),
> | ^~~~~~~~~~~
> /home/mgadelha/tools/llvm-project/libc/test/UnitTest/LibcTest.h:420:50: note: expanded from macro 'EXPECT_EQ'
> 420 | #define EXPECT_EQ(LHS, RHS) LIBC_TEST_BINOP_(EQ, LHS, RHS, )
> | ^~~
> /home/mgadelha/tools/llvm-project/libc/test/UnitTest/LibcTest.h:413:72: note: expanded from macro 'LIBC_TEST_BINOP_'
> 413 | LIBC_TEST_SCAFFOLDING_(test(LIBC_NAMESPACE::testing::TestCond::COND, LHS, \
> | ^~~
> /home/mgadelha/tools/llvm-project/libc/test/UnitTest/LibcTest.h:406:7: note: expanded from macro 'LIBC_TEST_SCAFFOLDING_'
> 406 | if (TEST) \
> | ^~~~
> /home/mgadelha/tools/llvm-project/libc/test/src/math/smoke/setpayloadsigf128_test.cpp:13:1: note: in instantiation of member function 'SetPayloadSigTestTemplate<long double>::testValidPayloads' requested here
> 13 | LIST_SETPAYLOADSIG_TESTS(float128, LIBC_NAMESPACE::setpayloadsigf128)
> | ^
> /home/mgadelha/tools/llvm-project/libc/test/src/math/smoke/SetPayloadSigTest.h:81:54: note: expanded from macro 'LIST_SETPAYLOADSIG_TESTS'
> 81 | TEST_F(LlvmLibcSetPayloadSigTest, ValidPayloads) { testValidPayloads(&func); }
> | ^
> /home/mgadelha/tools/llvm-project/libc/src/__support/big_int.h:362:25: note: candidate constructor not viable: no known conversion from 'long double' to 'const BigInt<128, false> &' for 1st argument
> 362 | LIBC_INLINE constexpr BigInt(const BigInt &other) = default;
> | ^ ~~~~~~~~~~~~~~~~~~~
> /home/mgadelha/tools/llvm-project/libc/src/__support/big_int.h:365:25: note: candidate template ignored: could not match 'BigInt<OtherBits, OtherSigned, unsigned long long>' against 'long double'
> 365 | LIBC_INLINE constexpr BigInt(
> | ^
> /home/mgadelha/tools/llvm-project/libc/src/__support/big_int.h:379:45: note: candidate template ignored: could not match 'unsigned long long[N]' against 'long double'
> 379 | template <size_t N> LIBC_INLINE constexpr BigInt(const WordType (&nums)[N]) {
> | ^
> /home/mgadelha/tools/llvm-project/libc/src/__support/big_int.h:393:25: note: candidate template ignored: substitution failure [with T = long double]: implicit instantiation of undefined template '__llvm_libc_20_0_0_git::cpp::enable_if<false>'
> 393 | LIBC_INLINE constexpr BigInt(T v) {
> | ^
> /home/mgadelha/tools/llvm-project/libc/src/__support/big_int.h:385:34: note: explicit constructor is not a candidate
> 385 | LIBC_INLINE constexpr explicit BigInt(
> | ^
> /home/mgadelha/tools/llvm-project/libc/src/__support/FPUtil/FPBits.h:394:63: note: passing argument to parameter 'v' here
> 394 | StorageType v = 0) {
> | ^
> 1 error generated.
> ```
Ok I will address it. I’ll tag you when I change it.
https://github.com/llvm/llvm-project/pull/102538
More information about the libc-commits
mailing list