const-float128-ped.c: Require __float128 effective target and options.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 1 Jul 2016 20:38:51 +0000 (20:38 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Fri, 1 Jul 2016 20:38:51 +0000 (20:38 +0000)
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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/const-float128-ped.c
gcc/testsuite/gcc.dg/const-float128.c
gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
gcc/testsuite/gcc.dg/torture/float128-nan.c
gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c
gcc/testsuite/lib/target-supports.exp

index a1255a0763f291fde8efba9e1eb775d6e4d59711..11af4b3b730e046ef2946e5ff1e4399a30eef058 100644 (file)
@@ -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
index 6a6b6223ce261205ec27aee9b384f87eda2413e9..c1869cc43f318d9aff3617e089dfe63246248a2e 100644 (file)
@@ -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" } */
index 116e4597b447b0ded2f389615c114360890a93a7..15394b483fc97a2a5b1e4f17a4e0d9e2c178ca86 100644 (file)
@@ -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;
index 19998f4825182669ba1383de8cdf469610bef331..1f675efdd6132a700ad651dbd3ab4ef8061dc9ce 100644 (file)
@@ -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>
index f721e562b8a94511cb46746f77a08ed3403f2b9d..dc284dec6dcb57abb683b62b4d90526fef2dfab6 100644 (file)
@@ -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>
index 60f9bbe9435c352cb630b486b8f08b89b76abab5..65dc520af7f2e0419ae1f6ab58daafd4d7bc8644 100644 (file)
@@ -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>
index 6e0d4744a459402533d3d49043c17163e51e3552..0ad043160a4fbabc6fec86e784fcc27434b3cafd 100644 (file)
@@ -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>
index 9990e190c60239007f8c6df4030d2454874e797c..b46acb39fd50b366ae52cff81f66ab17c60501e3 100644 (file)
@@ -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);
index 944494d9bcc5c6dc6224e087788d59fc7254e93e..fa6eb6b72bf3b0eb0fec67be67ecb1e4b0101199 100644 (file)
@@ -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>
index 8318f8ad8aee27001210565aac5488cd71063e30..493dee892b076e4b5e34dff9da0d065fcf30c5c5 100644 (file)
@@ -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"
 
index 05ad5c1775cbd31816a88a1658fa652ad2d0f2ec..4ef52ace37b8f11c2ea036e4bdd655ef1a6aef59 100644 (file)
@@ -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.