From 914ba0448eb936df1653cffa3ce02e1d14ef720e Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 5 May 2020 13:38:28 -0400 Subject: [PATCH] Patch ieee128-lib-patch008b --- gcc/testsuite/ChangeLog.meissner | 6 ++++++ gcc/testsuite/gcc.target/powerpc/pr70117.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog.meissner b/gcc/testsuite/ChangeLog.meissner index 880f3fb5ac4..990d542109d 100644 --- a/gcc/testsuite/ChangeLog.meissner +++ b/gcc/testsuite/ChangeLog.meissner @@ -1,3 +1,9 @@ +2020-05-05 Michael Meissner + + (ieee128-lib-patch008b) + * gcc.target/powerpc/pr70117.c: Don't use LDBL_MAX if __ibm128 is + not the same as long double. + 2020-05-05 Michael Meissner (ieee128-lib-patch006b) diff --git a/gcc/testsuite/gcc.target/powerpc/pr70117.c b/gcc/testsuite/gcc.target/powerpc/pr70117.c index 3bbd2c595e0..928efe39c7b 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr70117.c +++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c @@ -9,9 +9,11 @@ 128-bit floating point, because the type is not enabled on those systems. */ #define LDOUBLE __ibm128 +#define IBM128_MAX ((__ibm128) 1.79769313486231580793728971405301199e+308L) #elif defined(__LONG_DOUBLE_IBM128__) #define LDOUBLE long double +#define IBM128_MAX LDBL_MAX #else #error "long double must be either IBM 128-bit or IEEE 128-bit" @@ -75,10 +77,10 @@ main (void) if (__builtin_isnormal (ld)) __builtin_abort (); - ld = LDBL_MAX; + ld = IBM128_MAX; if (!__builtin_isnormal (ld)) __builtin_abort (); - ld = -LDBL_MAX; + ld = -IBM128_MAX; if (!__builtin_isnormal (ld)) __builtin_abort (); -- 2.30.2