From: Michael Meissner <meissner@linux.ibm.com>
To: gcc-patches@gcc.gnu.org,
Michael Meissner <meissner@linux.ibm.com>,
Segher Boessenkool <segher@kernel.crashing.org>,
David Edelsohn <dje.gcc@gmail.com>,
Bill Schmidt <wschmidt@linux.ibm.com>,
Peter Bergner <bergner@linux.ibm.com>
Subject: [PATCH] PowerPC Fix ibm128 defaults for pr70117.c test.
Date: Sun, 15 Nov 2020 12:17:47 -0500 [thread overview]
Message-ID: <20201115171747.GA10343@ibm-toto.the-meissners.org> (raw)
From 698d9fd8a5701fa4ed9690ddf71d57765921778c Mon Sep 17 00:00:00 2001
From: Michael Meissner <meissner@linux.ibm.com>
Date: Sun, 15 Nov 2020 00:48:23 -0500
Subject: [PATCH] PowerPC Fix ibm128 defaults for pr70117.c test.
This patch was previously posted as a combined patch with 2 other testsuite
patches. I moved it to a separate patch.
This patch fixes up a failure that I saw when I built a compiler with the long
double default set to IEEE 128-bit instead of IBM 128-bit. Now compilers with
either 128-bit long double default pass this test. Can I check this into the
master branch?
gcc/testsuite/
2020-11-15 Michael Meissner <meissner@linux.ibm.com>
PR target/70117
* gcc.target/powerpc/pr70117.c: Add support for long double being
IEEE 128-bit.
---
gcc/testsuite/gcc.target/powerpc/pr70117.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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.22.0
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797
next reply other threads:[~2020-11-15 17:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 17:17 Michael Meissner [this message]
2020-11-18 5:34 ` will schmidt
2020-11-18 21:43 ` Segher Boessenkool
2020-11-18 21:53 ` Jakub Jelinek
2020-11-18 22:29 ` Segher Boessenkool
2020-11-19 1:13 ` Paul A. Clarke
2020-11-19 14:08 ` Segher Boessenkool
2020-11-19 8:08 ` Michael Meissner
2020-11-19 14:03 ` Segher Boessenkool
2020-11-21 5:27 ` Michael Meissner
2020-11-23 18:59 ` Segher Boessenkool
2020-11-23 19:10 ` Jakub Jelinek
2020-11-23 20:13 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201115171747.GA10343@ibm-toto.the-meissners.org \
--to=meissner@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).