R/R-3.6.2-ppc64-no-const-long...

17 lines
609 B
Diff

diff -up R-3.6.2/src/main/arithmetic.c.ppc64 R-3.6.2/src/main/arithmetic.c
--- R-3.6.2/src/main/arithmetic.c.ppc64 2019-10-18 18:15:02.000000000 -0400
+++ R-3.6.2/src/main/arithmetic.c 2019-12-18 09:05:50.363220122 -0500
@@ -177,7 +177,12 @@ void attribute_hidden InitArithmetic()
}
#if HAVE_LONG_DOUBLE && (SIZEOF_LONG_DOUBLE > SIZEOF_DOUBLE)
+# ifdef __PPC64__
+ // PowerPC 64 (when gcc has -mlong-double-128) fails constant folding with LDOUBLE
+# define q_1_eps (1 / LDBL_EPSILON)
+# else
static LDOUBLE q_1_eps = 1 / LDBL_EPSILON;
+# endif
#else
static double q_1_eps = 1 / DBL_EPSILON;
#endif