diff options
author | Paul Koning <ni1d@arrl.net> | 2018-11-05 14:36:16 -0500 |
---|---|---|
committer | Paul Koning <pkoning@gcc.gnu.org> | 2018-11-05 14:36:16 -0500 |
commit | 510e072da902bb3651dcfcdcee48d75e12ace6d6 (patch) | |
tree | 60419340b2359c2e54c57882e0d343d53c92cf3b /gcc | |
parent | 08500461fc9e31bfcaae8b3490072614c3e9ea63 (diff) | |
download | gcc-510e072da902bb3651dcfcdcee48d75e12ace6d6.zip gcc-510e072da902bb3651dcfcdcee48d75e12ace6d6.tar.gz gcc-510e072da902bb3651dcfcdcee48d75e12ace6d6.tar.bz2 |
target-supports.exp: Add check for "inf" effective target keyword.
* lib/target-supports.exp: Add check for "inf" effective target
keyword.
* gcc.dg/builtins-44.c: Skip if no infinite support.
* gcc.dg/builtins-45.c: Ditto.
* gcc.dg/torture/builtin-complex-1.c: Ditto.
* gcc.dg/torture/builtin-cproj-1.c: Ditto.
* gcc.dg/torture/builtin-frexp-1.c: Ditto.
* gcc.dg/torture/builtin-ldexp-1.c: Ditto.
* gcc.dg/torture/builtin-logb-1.c: Ditto.
* gcc.dg/torture/builtin-math-2.c: Ditto.
* gcc.dg/torture/builtin-math-5.c: Ditto.
* gcc.dg/torture/builtin-math-7.c: Ditto.
* gcc.dg/torture/builtin-modf-1.c: Ditto.
* gcc.dg/torture/type-generic-1.c: Ditto.
From-SVN: r265816
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-44.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-45.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-complex-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-logb-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-math-2.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-math-5.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-math-7.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-modf-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/type-generic-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 7 |
14 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 665c049..78a1b05 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2018-11-05 Paul Koning <ni1d@arrl.net> + + * lib/target-supports.exp: Add check for "inf" effective target + keyword. + * gcc.dg/builtins-44.c: Skip if no infinite support. + * gcc.dg/builtins-45.c: Ditto. + * gcc.dg/torture/builtin-complex-1.c: Ditto. + * gcc.dg/torture/builtin-cproj-1.c: Ditto. + * gcc.dg/torture/builtin-frexp-1.c: Ditto. + * gcc.dg/torture/builtin-ldexp-1.c: Ditto. + * gcc.dg/torture/builtin-logb-1.c: Ditto. + * gcc.dg/torture/builtin-math-2.c: Ditto. + * gcc.dg/torture/builtin-math-5.c: Ditto. + * gcc.dg/torture/builtin-math-7.c: Ditto. + * gcc.dg/torture/builtin-modf-1.c: Ditto. + * gcc.dg/torture/type-generic-1.c: Ditto. + 2018-11-05 Ilya Leoshkevich <iii@linux.ibm.com> * gcc.target/s390/md/andc-splitter-1.c: Add colon to diff --git a/gcc/testsuite/gcc.dg/builtins-44.c b/gcc/testsuite/gcc.dg/builtins-44.c index 1267623..8a06b59 100644 --- a/gcc/testsuite/gcc.dg/builtins-44.c +++ b/gcc/testsuite/gcc.dg/builtins-44.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target inf } */ /* { dg-options "-O1 -fno-trapping-math -fno-finite-math-only -fdump-tree-optimized" } */ extern void f(int); diff --git a/gcc/testsuite/gcc.dg/builtins-45.c b/gcc/testsuite/gcc.dg/builtins-45.c index 4e354a1..0fa801b 100644 --- a/gcc/testsuite/gcc.dg/builtins-45.c +++ b/gcc/testsuite/gcc.dg/builtins-45.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target inf } */ /* { dg-options "-O1 -fno-trapping-math -fno-finite-math-only -fdump-tree-optimized" } */ extern void f(int); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-complex-1.c b/gcc/testsuite/gcc.dg/torture/builtin-complex-1.c index 0d26c9c..5a4ed3c 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-complex-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-complex-1.c @@ -1,6 +1,7 @@ /* Test __builtin_complex semantics. */ /* { dg-do run } */ /* { dg-options "-std=c11 -pedantic-errors" } */ +/* { dg-require-effective-target inf } */ /* { dg-add-options ieee } */ extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c b/gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c index 9aa6691..d79f34a 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c @@ -7,6 +7,7 @@ /* { dg-do link } */ /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ +/* { dg-require-effective-target inf } */ /* { dg-add-options ieee } */ /* All references to link_error should go away at compile-time. The diff --git a/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c b/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c index a66ce51..2f1708b 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c @@ -9,6 +9,7 @@ /* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */ /* In order to fold algebraic exprs below, targets with "composite" floating point formats need -funsafe-math-optimizations. */ +/* { dg-require-effective-target inf } */ /* { dg-options "-funsafe-math-optimizations" { target powerpc*-*-* } } */ extern void link_error(int); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c b/gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c index 6412274..05fa2b9 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c @@ -7,6 +7,7 @@ /* { dg-do link } */ /* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */ +/* { dg-require-effective-target inf } */ /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ extern void link_error(int); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c b/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c index d759d1c..087d87f 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c @@ -9,6 +9,7 @@ /* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */ /* In order to fold algebraic exprs below, targets with "composite" floating point formats need -funsafe-math-optimizations. */ +/* { dg-require-effective-target inf } */ /* { dg-options "-funsafe-math-optimizations" { target powerpc*-*-* } } */ extern void link_error(int); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-2.c b/gcc/testsuite/gcc.dg/torture/builtin-math-2.c index e8f2c44..73db916 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-math-2.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-math-2.c @@ -6,6 +6,7 @@ Origin: Kaveh R. Ghazi, October 22, 2006. */ /* { dg-do compile } */ +/* { dg-require-effective-target inf } */ /* { dg-options "-fdump-tree-original" } */ extern void foof (float); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-5.c b/gcc/testsuite/gcc.dg/torture/builtin-math-5.c index 025f4d0..9ea906c 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-math-5.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-math-5.c @@ -6,6 +6,7 @@ Origin: Kaveh R. Ghazi, January 28, 2009. */ /* { dg-do compile } */ +/* { dg-require-effective-target inf } */ /* { dg-options "-fdump-tree-original" } */ extern void foof (_Complex float); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-7.c b/gcc/testsuite/gcc.dg/torture/builtin-math-7.c index d4ff1c8..bdd5907 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-math-7.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-math-7.c @@ -7,6 +7,7 @@ /* { dg-do run } */ /* C6X fails due to -freciprocal-math default. */ /* { dg-skip-if "" { tic6x-*-* } } */ +/* { dg-require-effective-target inf } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target large_double } */ diff --git a/gcc/testsuite/gcc.dg/torture/builtin-modf-1.c b/gcc/testsuite/gcc.dg/torture/builtin-modf-1.c index 05e16ac2..78d3032 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-modf-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-modf-1.c @@ -6,6 +6,7 @@ Origin: Kaveh R. Ghazi, February 23, 2007. */ /* { dg-do link } */ +/* { dg-require-effective-target inf } */ /* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */ /* { dg-options "-funsafe-math-optimizations -fsigned-zeros -fno-associative-math" { target powerpc-*-darwin* powerpc*-*-linux* } } */ diff --git a/gcc/testsuite/gcc.dg/torture/type-generic-1.c b/gcc/testsuite/gcc.dg/torture/type-generic-1.c index a5fa8e8..3df6f9b 100644 --- a/gcc/testsuite/gcc.dg/torture/type-generic-1.c +++ b/gcc/testsuite/gcc.dg/torture/type-generic-1.c @@ -2,6 +2,7 @@ without any fast-math flags. */ /* { dg-do run } */ +/* { dg-require-effective-target inf } */ /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */ /* { dg-skip-if "No subnormal support" { csky-*-* } { "-mhard-float" } } */ /* { dg-options "-DUNSAFE" { target tic6x*-*-* visium-*-* nvptx-*-* } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index fd74c04..9780e53 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8933,3 +8933,10 @@ proc check_effective_target_cet { } { } } "-O2" ] } + +# Return 1 if target supports floating point "infinite" +proc check_effective_target_inf { } { + return [check_no_compiler_messages supports_inf assembly { + const double pinf = __builtin_inf (); + }] +} |