[sorry, I failed to add [PATCH] to the subject of the two previous patches]

Though -mpower9-vector makes float128 support possible, some target
systems such as vxworks disable float128 types by default
(TARGET_FLOAT128_ENABLE_TYPE is defined to 0), so explicit -mfloat128
is needed to enable it, and then the fact that the full support may be
unavailable is flagged with a warning.

This patch adds -mfloat128 and prunes the warning in two tests that
use the _Float128 type without explicitly enabling it.

Tested on x86_64-linux-gnu x ppc64-vx7r2 with gcc-11.  Ok to install?


for  gcc/testsuite/ChangeLog

        * gcc.target/powerpc/pr82748-1.c: Add -mfloat128 and prune its
        warning.
        * gcc.target/powerpc/pr82748-2.c: Likewise.
---
 gcc/testsuite/gcc.target/powerpc/pr82748-1.c |    3 ++-
 gcc/testsuite/gcc.target/powerpc/pr82748-2.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/pr82748-1.c 
b/gcc/testsuite/gcc.target/powerpc/pr82748-1.c
index 15a746bcf63ea..2bb6be1183a59 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr82748-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr82748-1.c
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mpower9-vector -O2 -mabi=ieeelongdouble -Wno-psabi" } */
+/* { dg-options "-mpower9-vector -O2 -mfloat128 -mabi=ieeelongdouble 
-Wno-psabi" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* Make sure the old 'q' builtin functions work correctly when the long double
    default has been changed to be IEEE 128-bit floating point.  */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr82748-2.c 
b/gcc/testsuite/gcc.target/powerpc/pr82748-2.c
index 0079394b1016e..c031ae037dd8d 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr82748-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr82748-2.c
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mpower9-vector -O2 -mabi=ibmlongdouble -Wno-psabi" } */
+/* { dg-options "-mpower9-vector -O2 -mfloat128 -mabi=ibmlongdouble 
-Wno-psabi" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* Make sure the old 'q' builtin functions work correctly when the long double
    default uses the IBM double-double format.  */

-- 
Alexandre Oliva, happy hacker                https://FSFLA.org/blogs/lxo/
   Free Software Activist                       GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>

Reply via email to