Skip to content

Commit 23ba373

Browse files
Albion Fungldionne
authored andcommitted
[libc++][PowerPC] Fix a test case failure when compiled with libcxx
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. Fixes http://llvm.org/PR51430 Differential Revision: https://reviews.llvm.org/D108352 (cherry picked from commit 4bef7a8)
1 parent 80878cc commit 23ba373

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void fp_test()
9292
assert(d0 < d1); // sanity checking
9393
assert(d1 < d2); // sanity checking
9494

95-
#if defined(__PPC__) && __LONG_DOUBLE_128__ && !__LONG_DOUBLE_IEEE128__
95+
#if defined(__PPC__) && __LONG_DOUBLE_128__ && !(defined(__LONG_DOUBLE_IEEE128__) && __LONG_DOUBLE_IEEE128__)
9696
// For 128 bit long double implemented as 2 doubles on PowerPC,
9797
// nextafterl() of libm gives imprecise results which fails the
9898
// midpoint() tests below. So skip the test for this case.

0 commit comments

Comments
 (0)