From bee774cecb3f3872f858e078f6def770b3d3c2f1 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 5 May 2020 13:35:09 -0400 Subject: [PATCH] Patch ieee128-lib-patch006b --- gcc/testsuite/ChangeLog.meissner | 6 ++++++ gcc/testsuite/gcc.dg/nextafter-2.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/gcc/testsuite/ChangeLog.meissner b/gcc/testsuite/ChangeLog.meissner index 98683f43554..054ab3f5c6f 100644 --- a/gcc/testsuite/ChangeLog.meissner +++ b/gcc/testsuite/ChangeLog.meissner @@ -1,3 +1,9 @@ +2020-05-05 Michael Meissner + + (ieee128-lib-patch006b) + * gcc.dg/nextafter-2.c: Add support for long double being IEEE + 128-bit on PowerPC systems. + 2020-05-05 Michael Meissner Clone branch diff --git a/gcc/testsuite/gcc.dg/nextafter-2.c b/gcc/testsuite/gcc.dg/nextafter-2.c index e51ae94be0c..64e9e3c485f 100644 --- a/gcc/testsuite/gcc.dg/nextafter-2.c +++ b/gcc/testsuite/gcc.dg/nextafter-2.c @@ -13,4 +13,14 @@ # define NO_LONG_DOUBLE 1 # endif #endif + +#if defined(_ARCH_PPC) && defined(__LONG_DOUBLE_IEEE128__) +/* On PowerPC systems, long double uses either the IBM long double format, or + IEEE 128-bit format. The compiler switches the long double built-in + function names and glibc switches the names when math.h is included. + Because this test is run with -fno-builtin, include math.h so that the + appropriate nextafter functions are called. */ +#include +#endif + #include "nextafter-1.c" -- 2.30.2