PowerPC: Require IBM long double for conversion test.

The test c-c++-common/dfp/convert-bfp-11.c explicit expects long double to use
the IBM 128-bit extended double format.  In particular, some of the tests
expect an infinity to be created if decimal values that are converted that are
too large for IBM extended double.  However, the numbers do fit in the range
for IEEE 128-bit format, since it has a larger exponent than the IBM 128-bit
format.  The test fails because an infinity is not generated.

I have tested this patch, and the first patch in the series on a little endian
power9 computer running Linux, and I verified that if long double is not IBM
128-bit, the test is listed as UNSUPPORTED, and if long double is IBM 128-bit,
the test passes.

Can I check this into the master branch?  After an appropriate soak in period,
I would like to back port this to the open GCC branches.

gcc/testsuite/
2020-11-21  Michael Meissner  <meiss...@linux.ibm.com>

        * c-c++-common/dfp/convert-bfp-11.c: Require IBM 128-bit long
        double.
---
 gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c 
b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
index 95c433d2c24..8c970bb76db 100644
--- a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
+++ b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
@@ -1,4 +1,5 @@
-/* { dg-skip-if "" { ! "powerpc*-*-linux*" } } */
+/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target ppc_long_double_ibm } */
 
 /* Test decimal float conversions to and from IBM 128-bit long double. 
    Checks are skipped at runtime if long double is not 128 bits.
-- 
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