aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2016-07-01 20:38:51 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2016-07-01 20:38:51 +0000
commite2298656eb195614bcf70e385ddf44a4b137a081 (patch)
treebd9e08d5897fbca44ee27895f676cd7092f86dac /gcc
parenta550396b8071de85da71fb2cfebe5d63cc31fc01 (diff)
downloadgcc-e2298656eb195614bcf70e385ddf44a4b137a081.zip
gcc-e2298656eb195614bcf70e385ddf44a4b137a081.tar.gz
gcc-e2298656eb195614bcf70e385ddf44a4b137a081.tar.bz2
const-float128-ped.c: Require __float128 effective target and options.
2016-07-01 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * gcc.dg/const-float128-ped.c: Require __float128 effective target and options. * gcc.dg/const-float128.c: Likewise. * gcc.dg/torture/float128-cmp-invalid.c: Require __float128 and base_quadfloat_support effective targets, and __float128 options. * gcc.dg/torture/float128-div-underflow.c: Likewise. * gcc.dg/torture/float128-extend-nan.c: Likewise. * gcc.dg/torture/float128-nan.c: Likewise. * gcc.dg/torture/fp-int-convert-float128-timode-2.c: Likewise. * gcc.dg/torture/fp-int-convert-float128-timode-3.c: Likewise. * gcc.dg/torture/fp-int-convert-float128-timode.c: Likewise. * lib/target-supports.exp (check_effective_target___float128): New. (add_options_for___float128): New. (check_effective_target_base_quadword_support): New. From-SVN: r237924
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog19
-rw-r--r--gcc/testsuite/gcc.dg/const-float128-ped.c4
-rw-r--r--gcc/testsuite/gcc.dg/const-float128.c4
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-div-underflow.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-extend-nan.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-nan.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c5
-rw-r--r--gcc/testsuite/lib/target-supports.exp34
11 files changed, 87 insertions, 9 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a1255a0..11af4b3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,22 @@
+2016-07-01 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/const-float128-ped.c: Require __float128 effective
+ target and options.
+ * gcc.dg/const-float128.c: Likewise.
+ * gcc.dg/torture/float128-cmp-invalid.c: Require
+ __float128 and base_quadfloat_support effective targets, and
+ __float128 options.
+ * gcc.dg/torture/float128-div-underflow.c: Likewise.
+ * gcc.dg/torture/float128-extend-nan.c: Likewise.
+ * gcc.dg/torture/float128-nan.c: Likewise.
+ * gcc.dg/torture/fp-int-convert-float128-timode-2.c: Likewise.
+ * gcc.dg/torture/fp-int-convert-float128-timode-3.c: Likewise.
+ * gcc.dg/torture/fp-int-convert-float128-timode.c: Likewise.
+ * lib/target-supports.exp (check_effective_target___float128):
+ New.
+ (add_options_for___float128): New.
+ (check_effective_target_base_quadword_support): New.
+
2016-07-01 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71720
diff --git a/gcc/testsuite/gcc.dg/const-float128-ped.c b/gcc/testsuite/gcc.dg/const-float128-ped.c
index 6a6b622..c1869cc 100644
--- a/gcc/testsuite/gcc.dg/const-float128-ped.c
+++ b/gcc/testsuite/gcc.dg/const-float128-ped.c
@@ -1,5 +1,7 @@
/* Test 'q' suffix with -pedantic on __float128 type constants. */
-/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target __float128 } */
/* { dg-options "-pedantic" } */
+/* { dg-add-options __float128 } */
__float128 a = 123.456789q; /* { dg-warning "non-standard suffix on floating constant" } */
diff --git a/gcc/testsuite/gcc.dg/const-float128.c b/gcc/testsuite/gcc.dg/const-float128.c
index 116e459..15394b4 100644
--- a/gcc/testsuite/gcc.dg/const-float128.c
+++ b/gcc/testsuite/gcc.dg/const-float128.c
@@ -1,6 +1,8 @@
/* Test 'q' and 'Q' suffixes on __float128 type constants. */
-/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target __float128 } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
__float128 a = 123.456789q;
__float128 b = 123.456789Q;
diff --git a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
index 19998f4..1f675ef 100644
--- a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
+++ b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
@@ -1,7 +1,10 @@
/* Test for "invalid" exceptions from __float128 comparisons. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
index f721e56..dc284de 100644
--- a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
+++ b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
@@ -1,7 +1,10 @@
/* Test for spurious underflow from __float128 division. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
index 60f9bbe..65dc520 100644
--- a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
+++ b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
@@ -1,7 +1,10 @@
/* Test extensions to __float128 quiet signaling NaNs. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "-fsignaling-nans" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <float.h>
diff --git a/gcc/testsuite/gcc.dg/torture/float128-nan.c b/gcc/testsuite/gcc.dg/torture/float128-nan.c
index 6e0d474..0ad04316 100644
--- a/gcc/testsuite/gcc.dg/torture/float128-nan.c
+++ b/gcc/testsuite/gcc.dg/torture/float128-nan.c
@@ -1,7 +1,10 @@
/* Test __float128 NaN generation. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdbool.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
index 9990e19..b46acb3 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
@@ -1,9 +1,12 @@
/* Test floating-point conversions. __float128 type with TImode: bug
53317. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target int128 } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
index 944494d..fa6eb6b 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
@@ -1,8 +1,11 @@
/* Test for correct rounding of conversions from __int128 to
__float128. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target int128 } */
/* { dg-options "-frounding-math" } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c
index 8318f8a..493dee8 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c
@@ -1,7 +1,10 @@
/* Test floating-point conversions. __float128 type with TImode. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
#include "fp-int-convert.h"
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 05ad5c1..4ef52ac 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2370,6 +2370,40 @@ proc check_effective_target_has_q_floating_suffix { } {
float dummy = 1.0q;
} "$opts"]
}
+
+# Return 1 if the target supports __float128,
+# 0 otherwise.
+
+proc check_effective_target___float128 { } {
+ if { [istarget powerpc*-*-*] } {
+ return [check_ppc_float128_sw_available]
+ }
+ if { [istarget ia64-*-*]
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*] } {
+ return 1
+ }
+ return 0
+}
+
+proc add_options_for___float128 { flags } {
+ if { [istarget powerpc*-*-*] } {
+ return "$flags -mfloat128 -mvsx"
+ }
+ return "$flags"
+}
+
+# Return 1 if the target supports any special run-time requirements
+# for __float128 or _Float128,
+# 0 otherwise.
+
+proc check_effective_target_base_quadfloat_support { } {
+ if { [istarget powerpc*-*-*] } {
+ return [check_vsx_hw_available]
+ }
+ return 1
+}
+
# Return 1 if the target supports compiling fixed-point,
# 0 otherwise.