[libcxx-commits] [libcxx] 0d5b359 - [libcxx] [test] Narrow down a MinGW bug workaround in rand.dist.uni.int/eval.pass.cpp
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 27 03:21:08 PST 2022
Author: Martin Storsjö
Date: 2022-01-27T13:19:06+02:00
New Revision: 0d5b35934e010d4207b0b111e2e2905ba36fa77b
URL: https://github.com/llvm/llvm-project/commit/0d5b35934e010d4207b0b111e2e2905ba36fa77b
DIFF: https://github.com/llvm/llvm-project/commit/0d5b35934e010d4207b0b111e2e2905ba36fa77b.diff
LOG: [libcxx] [test] Narrow down a MinGW bug workaround in rand.dist.uni.int/eval.pass.cpp
Differential Revision: https://reviews.llvm.org/D118235
Added:
Modified:
libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
index 03ec0eaa37fa2..e36625af9ebe0 100644
--- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
@@ -7,9 +7,6 @@
//===----------------------------------------------------------------------===//
//
// REQUIRES: long_tests
-//
-// This fails on MinGW for some unknown reason.
-// UNSUPPORTED: target={{.+}}-windows-gnu
// <random>
@@ -28,6 +25,12 @@
#include "test_macros.h"
+// The __int128 conversions to/from floating point crash on MinGW on x86_64.
+// This is fixed in Clang 14 by https://reviews.llvm.org/D110413.
+#if defined(__x86_64__) && defined(__MINGW32__) && defined(__clang_major__) && __clang_major__ < 14
+ #define TEST_BUGGY_I128_FP
+#endif
+
template <class T>
T sqr(T x)
{
@@ -130,7 +133,7 @@ int main(int, char**)
// or unsigned long long.
// (We support __int128 as an extension.)
-#ifndef _LIBCPP_HAS_NO_INT128
+#if !defined(_LIBCPP_HAS_NO_INT128) && !defined(TEST_BUGGY_I128_FP)
test_statistics<__int128_t, std::minstd_rand0>();
test_statistics<__uint128_t, std::minstd_rand0>();
More information about the libcxx-commits
mailing list