[libcxx-commits] [PATCH] D123980: [libcxx] Disable long double -> int128 test with msan

Vitaly Buka via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 18 21:10:22 PDT 2022


vitalybuka updated this revision to Diff 423528.
vitalybuka added a comment.

rebase


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123980/new/

https://reviews.llvm.org/D123980

Files:
  libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp


Index: libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
===================================================================
--- libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
+++ libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
@@ -21,6 +21,8 @@
 #include <cstring>
 #include <limits>
 
+#include "test_macros.h"
+
 // std::bit_cast does not preserve padding bits, so if T has padding bits,
 // the results might not memcmp cleanly.
 template<bool HasUniqueObjectRepresentations = true, typename T>
@@ -230,7 +232,8 @@
 #if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__
         test_roundtrip_through<double, false>(i);
 #endif
-#if defined(__SIZEOF_INT128__) && __SIZEOF_LONG_DOUBLE__ == __SIZEOF_INT128__
+#if defined(__SIZEOF_INT128__) && __SIZEOF_LONG_DOUBLE__ == __SIZEOF_INT128__ &&                                       \
+    !TEST_HAS_FEATURE(memory_sanitizer) // Some bits are just padding.
         test_roundtrip_through<__int128_t, false>(i);
         test_roundtrip_through<__uint128_t, false>(i);
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123980.423528.patch
Type: text/x-patch
Size: 1042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220419/ab9ac40c/attachment.bin>


More information about the libcxx-commits mailing list