[libcxx-commits] [PATCH] D108352: [PowerPC] Fix a test case failure when compiled with libcxx

Albion Fung via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 18 22:23:40 PDT 2021


Conanap created this revision.
Herald added subscribers: shchenz, nemanjai.
Conanap requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

The test case is not ran unless libcxx is used, and a macro
may be undefined. This patch checks for the definition of the
macro before using it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108352

Files:
  libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp


Index: libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
===================================================================
--- libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
+++ libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
@@ -92,7 +92,7 @@
     assert(d0 < d1);  // sanity checking
     assert(d1 < d2);  // sanity checking
 
-#if defined(__PPC__) && __LONG_DOUBLE_128__ && !__LONG_DOUBLE_IEEE128__
+#if defined(__PPC__) && __LONG_DOUBLE_128__ && (!defined(__LONG_DOUBLE_IEEE128__) || !__LONG_DOUBLE_IEEE128__)
 //	For 128 bit long double implemented as 2 doubles on PowerPC,
 //	nextafterl() of libm gives imprecise results which fails the
 //	midpoint() tests below. So skip the test for this case.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108352.367398.patch
Type: text/x-patch
Size: 808 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210819/2b75f343/attachment.bin>


More information about the libcxx-commits mailing list