aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2024-10-04 17:43:47 +0200
committerGeorg-Johann Lay <avr@gjlay.de>2024-10-04 20:26:50 +0200
commit0f39769ab39ba74c9890c1553c016469c043965c (patch)
treedbe901a69b977e8914b1db418fe4d3a039789701
parent6064420ebddede802904a740363047b5403598d1 (diff)
downloadgcc-0f39769ab39ba74c9890c1553c016469c043965c.zip
gcc-0f39769ab39ba74c9890c1553c016469c043965c.tar.gz
gcc-0f39769ab39ba74c9890c1553c016469c043965c.tar.bz2
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.
-rw-r--r--gcc/testsuite/gcc.dg/torture/float32x-builtin.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/float32x-tg-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/float32x-tg.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/float64-builtin.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/float64-tg-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/float64-tg.c1
-rw-r--r--gcc/testsuite/lib/target-supports.exp11
7 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/float32x-builtin.c b/gcc/testsuite/gcc.dg/torture/float32x-builtin.c
index 71eb7e2..0404d39 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 6179aba..dd7e206 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 b65b03f..87d9bef2 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 4137684..2462017 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 d0e4316..f034e76 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 a718831..d17ee0e 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 f92f7f1..459af8e 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.