[libc-commits] [libc] [libc] Fixing float128 UB error (PR #211593)
via libc-commits
libc-commits at lists.llvm.org
Thu Jul 23 08:48:42 PDT 2026
https://github.com/Sukumarsawant created https://github.com/llvm/llvm-project/pull/211593
DRAFT( to be updated )
>From accfc9c9dc8f35e78f7927c28fd880a085896cf3 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 23 Jul 2026 21:08:19 +0530
Subject: [PATCH] initial test commit
---
libc/test/src/__support/FPUtil/float128_test.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libc/test/src/__support/FPUtil/float128_test.cpp b/libc/test/src/__support/FPUtil/float128_test.cpp
index b4ee0439ba0f5..c971b01925867 100644
--- a/libc/test/src/__support/FPUtil/float128_test.cpp
+++ b/libc/test/src/__support/FPUtil/float128_test.cpp
@@ -87,6 +87,8 @@ TEST(LlvmLibcFloat128Test, IntegerConversion) {
ASSERT_EQ(static_cast<long long>(Float128(LLONG_MIN)), LLONG_MIN);
ASSERT_EQ(static_cast<unsigned>(Float128(UINT_MAX)), UINT_MAX);
ASSERT_EQ(static_cast<unsigned>(Float128(0U)), 0U);
+ int a = static_cast<int>(Float128(1e300));
+ (void)a;
// FP exceptions
LIBC_NAMESPACE::fputil::clear_except(FE_ALL_EXCEPT);
More information about the libc-commits
mailing list