Skip to content

Commit

Permalink
target-supports.exp: Add check for "inf" effective target keyword.
Browse files Browse the repository at this point in the history
	* 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
  • Loading branch information
pkoning2 authored and Paul Koning committed Nov 5, 2018
1 parent 0850046 commit 510e072
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 0 deletions.
17 changes: 17 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
2018-11-05 Paul Koning <[email protected]>

* 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 <[email protected]>

* gcc.target/s390/md/andc-splitter-1.c: Add colon to
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/builtins-44.c
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/builtins-45.c
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-complex-1.c
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-logb-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-math-2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-math-5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-math-7.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 } */

Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/builtin-modf-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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* } } */

Expand Down
1 change: 1 addition & 0 deletions gcc/testsuite/gcc.dg/torture/type-generic-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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-*-* } } */
Expand Down
7 changes: 7 additions & 0 deletions gcc/testsuite/lib/target-supports.exp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
}]
}

0 comments on commit 510e072

Please sign in to comment.