]> gcc.gnu.org Git - gcc.git/commit
Force IBM long double for conversion test on PowerPC.
authorMichael Meissner <meissner@linux.ibm.com>
Thu, 29 Apr 2021 00:30:26 +0000 (20:30 -0400)
committerMichael Meissner <meissner@linux.ibm.com>
Thu, 29 Apr 2021 00:30:26 +0000 (20:30 -0400)
commite992fc9828fd6fbdeec3339465bc68cdfc204c92
treed1e7706054179f806fd15b64c75047f9826da117
parentcc403383825d146932e3b11c3369ac93cf3db692
Force IBM long double for conversion test on PowerPC.

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.

This patch explicitly sets the long double type to IBM extended double.

I have run tests on a little endian power9 system with 3 compilers.  There
were no regressions with these patches, and the two tests in the following
patches now work if the default long double is not IBM 128-bit:

    * One compiler used the default IBM 128-bit format;
    * One compiler used the IEEE 128-bit format; (and)
    * One compiler used 64-bit long doubles.

I have also tested compilers on a big endian power8 system with a compiler
defaulting to power8 code generation and another with the default cpu
set.  There were no regressions.

Can I check this patch into the master branch?

gcc/testsuite/
2021-04-28  Michael Meissner  <meissner@linux.ibm.com>

* c-c++-common/dfp/convert-bfp-11.c: Force using IBM 128-bit long
double.  Remove check for 64-bit long double.
gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
This page took 0.065103 seconds and 5 git commands to generate.