Skip to content

Conversation

krishna2803
Copy link
Contributor

No description provided.

Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
@llvmbot llvmbot added the libc label Sep 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 3, 2025

@llvm/pr-subscribers-libc

Author: Krishna Pandey (krishna2803)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/156733.diff

1 Files Affected:

  • (modified) libc/src/__support/FPUtil/bfloat16.h (+3-1)
diff --git a/libc/src/__support/FPUtil/bfloat16.h b/libc/src/__support/FPUtil/bfloat16.h
index b607fd68e838b..13e151208567d 100644
--- a/libc/src/__support/FPUtil/bfloat16.h
+++ b/libc/src/__support/FPUtil/bfloat16.h
@@ -29,7 +29,9 @@ struct BFloat16 {
 
   LIBC_INLINE BFloat16() = default;
 
-  template <typename T> LIBC_INLINE constexpr explicit BFloat16(T value) {
+  template <typename T>
+  LIBC_INLINE constexpr explicit BFloat16(T value)
+      : bits(static_cast<uint16_t>(0U)) {
     if constexpr (cpp::is_floating_point_v<T>) {
       bits = fputil::cast<bfloat16>(value).bits;
     } else if constexpr (cpp::is_integral_v<T>) {

@overmighty
Copy link
Member

Buildbot failure for context: https://lab.llvm.org/buildbot/#/builders/131/builds/29538.

@krishna2803 krishna2803 merged commit d7a08c5 into llvm:main Sep 3, 2025
21 checks passed
@krishna2803 krishna2803 deleted the fix-buildbot branch September 3, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants