PowerPC: PR target/70117, Force long double to be IBM 128-bit.

This patch replaces the following patch:
| Date: Sat, 21 Nov 2020 00:37:10 -0500
| Subject: [PATCH 2/3] PowerPC: require IBM long double for pr70117.
| Message-ID: <20201121053710.gd17...@ibm-toto.the-meissners.org>
| https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559840.html

This patch uses the ppc_long_double_override_ibm target supports option that
was in the previous patch to make sure pr70117.c uses IBM extended double that
this test was designed for.

I have run this test on a power9 little endian server system with 3 compilers,
one configured for IBM long double, 1 configured for IEEE long double, and 1
configured for 64-bit long double.  All of the compilers used GLIBC 2.32, which
is needed to support switching the long double type, but this patch should work
with older GLIBCs as long as the compiler long double format matches GLIBC's
long double.

Can I check this change into the master branch once the previous patch is
applied?

gcc/testsuite/
2020-12-03  Michael Meissner  <meiss...@linux.ibm.com>

        PR target/70117
        * gcc.target/powerpc/pr70117.c: Force the long double type to use
        the IBM 128-bit format.
---
 gcc/testsuite/gcc.target/powerpc/pr70117.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/pr70117.c 
b/gcc/testsuite/gcc.target/powerpc/pr70117.c
index 3bbd2c595e0..6efece1c7c8 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr70117.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c
@@ -1,5 +1,6 @@
-/* { dg-do run { target { powerpc*-*-linux* powerpc*-*-darwin* powerpc*-*-aix* 
rs6000-*-* } } } */
-/* { dg-options "-std=c99 -mlong-double-128 -O2" } */
+/* { dg-do run } */
+/* { dg-require-effective-target ppc_long_double_override_ibm } */
+/* { dg-options "-std=c99 -O2 -mlong-double-128 -mabi=ibmlongdouble 
-Wno-psabi" } */
 
 #include <float.h>
 
-- 
2.22.0


-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797

Reply via email to