testsuite: require c99 runtime for trigonometric optimisation tests

A number of optimisation that simplify trigonometric expressions are only
performed when the compiler knows the target has a C99 libm available.
Since targets like *-elf may not have such a libm, a C99 runtime requirement
is added to these tests.

2020-08-19  Pat Bernardi  <bernardi@adacore.com>

gcc/testsuite/ChangeLog

	* gcc.dg/sinatan-2.c: Add dg-require-effective-target c99_runtime.
	* gcc.dg/sinhovercosh-1.c: Likewise.
	* gcc.dg/tanhbysinh.c: Likewise.
This commit is contained in:
Pat Bernardi 2020-08-19 10:05:21 +01:00 committed by Richard Sandiford
parent 9eaf11417b
commit 7dbcb569b2
3 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Ofast -fdump-tree-optimized" } */
/* { dg-require-effective-target c99_runtime } */
extern float sinf (float);
extern float cosf (float);

View file

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Ofast -fdump-tree-optimized" } */
/* { dg-require-effective-target c99_runtime } */
extern float sinhf (float);
extern float coshf (float);

View file

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Ofast -fdump-tree-optimized" } */
/* { dg-require-effective-target c99_runtime } */
extern float sinhf (float);
extern float tanhf (float);
@ -37,4 +38,4 @@ tanhbysinhl_ (long double x)
/* {dg-final { scan-tree-dump-not "tanhl " "optimized" }} */
/* { dg-final { scan-tree-dump "cosh " "optimized" } } */
/* { dg-final { scan-tree-dump "coshf " "optimized" } } */
/* { dg-final { scan-tree-dump "coshl " "optimized" } } */
/* { dg-final { scan-tree-dump "coshl " "optimized" } } */