https://gcc.gnu.org/g:0f39769ab39ba74c9890c1553c016469c043965c

commit r15-4077-g0f39769ab39ba74c9890c1553c016469c043965c
Author: Georg-Johann Lay <a...@gjlay.de>
Date:   Fri Oct 4 17:43:47 2024 +0200

    testsuite - Some float64 and float32x test require double64plus.
    
    Some of the float64 and float32x test cases are using double built-ins
    and hence require double64plus resp. that double is at least as good
    as float32x (double_float32xplus).
    
    gcc/testsuite/
            * lib/target-supports.exp 
(check_effective_target_double_float32xplus):
            New proc.
            * gcc.dg/torture/float32x-builtin.c: Add
            dg-require-effective-target double_float32xplus.
            * gcc.dg/torture/float32x-tg-2.c: Same.
            * gcc.dg/torture/float32x-tg.c: Same.
            * gcc.dg/torture/float64-builtin.c: Add
            dg-require-effective-target double64plus.
            * gcc.dg/torture/float64-tg-2.c: Same.
            * gcc.dg/torture/float64-tg.c: Same.

Diff:
---
 gcc/testsuite/gcc.dg/torture/float32x-builtin.c |  1 +
 gcc/testsuite/gcc.dg/torture/float32x-tg-2.c    |  1 +
 gcc/testsuite/gcc.dg/torture/float32x-tg.c      |  1 +
 gcc/testsuite/gcc.dg/torture/float64-builtin.c  |  1 +
 gcc/testsuite/gcc.dg/torture/float64-tg-2.c     |  1 +
 gcc/testsuite/gcc.dg/torture/float64-tg.c       |  1 +
 gcc/testsuite/lib/target-supports.exp           | 11 +++++++++++
 7 files changed, 17 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/torture/float32x-builtin.c 
b/gcc/testsuite/gcc.dg/torture/float32x-builtin.c
index 71eb7e2cdc89..0404d3927053 100644
--- a/gcc/testsuite/gcc.dg/torture/float32x-builtin.c
+++ b/gcc/testsuite/gcc.dg/torture/float32x-builtin.c
@@ -4,6 +4,7 @@
 /* { dg-add-options float32x } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
 
 #define WIDTH 32
 #define EXT 1
diff --git a/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c 
b/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c
index 6179aba7cdd0..dd7e2064a1a5 100644
--- a/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c
+++ b/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c
@@ -4,6 +4,7 @@
 /* { dg-add-options float32x } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
 
 #define WIDTH 32
 #define EXT 1
diff --git a/gcc/testsuite/gcc.dg/torture/float32x-tg.c 
b/gcc/testsuite/gcc.dg/torture/float32x-tg.c
index b65b03f558bb..87d9bef2b030 100644
--- a/gcc/testsuite/gcc.dg/torture/float32x-tg.c
+++ b/gcc/testsuite/gcc.dg/torture/float32x-tg.c
@@ -4,6 +4,7 @@
 /* { dg-add-options float32x } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
 
 #define WIDTH 32
 #define EXT 1
diff --git a/gcc/testsuite/gcc.dg/torture/float64-builtin.c 
b/gcc/testsuite/gcc.dg/torture/float64-builtin.c
index 413768443aee..2462017e4d59 100644
--- a/gcc/testsuite/gcc.dg/torture/float64-builtin.c
+++ b/gcc/testsuite/gcc.dg/torture/float64-builtin.c
@@ -4,6 +4,7 @@
 /* { dg-add-options float64 } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
 
 #define WIDTH 64
 #define EXT 0
diff --git a/gcc/testsuite/gcc.dg/torture/float64-tg-2.c 
b/gcc/testsuite/gcc.dg/torture/float64-tg-2.c
index d0e4316611fd..f034e76cfeb9 100644
--- a/gcc/testsuite/gcc.dg/torture/float64-tg-2.c
+++ b/gcc/testsuite/gcc.dg/torture/float64-tg-2.c
@@ -4,6 +4,7 @@
 /* { dg-add-options float64 } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
 
 #define WIDTH 64
 #define EXT 0
diff --git a/gcc/testsuite/gcc.dg/torture/float64-tg.c 
b/gcc/testsuite/gcc.dg/torture/float64-tg.c
index a7188312d574..d17ee0ecb199 100644
--- a/gcc/testsuite/gcc.dg/torture/float64-tg.c
+++ b/gcc/testsuite/gcc.dg/torture/float64-tg.c
@@ -4,6 +4,7 @@
 /* { dg-add-options float64 } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
 
 #define WIDTH 64
 #define EXT 0
diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index f92f7f1af9c6..459af8e58c66 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3965,6 +3965,17 @@ proc check_effective_target_floatn_nx_runtime {} {
     return 1
 }
 
+# Return 1 when double is at least as good as _Float32x, i.e. double can
+# be used to emulate _Float32x.
+
+proc check_effective_target_double_float32xplus {} {
+    return [check_no_compiler_messages_nocache double_float32xplus object {
+       _Float32x x;
+       int dummy1[__DBL_MANT_DIG__ >= __FLT32X_MANT_DIG__ ? 1 : -1];
+       int dummy2[__DBL_MAX_EXP__ >= __FLT32X_MAX_EXP__ ? 1 : -1];
+    } [add_options_for_float32x ""]]
+}
+
 # Add options needed to use the _FloatN / _FloatNx type indicated in
 # the function name.

Reply via email to