testsuite: require c99 runtime for trigonometric optimisation tests
authorPat Bernardi <bernardi@adacore.com>
Wed, 19 Aug 2020 09:05:21 +0000 (10:05 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 19 Aug 2020 09:05:21 +0000 (10:05 +0100)
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.

gcc/testsuite/gcc.dg/sinatan-2.c
gcc/testsuite/gcc.dg/sinhovercosh-1.c
gcc/testsuite/gcc.dg/tanhbysinh.c

index 8e7ea3c90fc1f40947e1cc3b9ad323a6f7b4680b..64d6d301535462943eba071bbad6214b5c5f9e69 100644 (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);
index d41093fa6de635fb04554a961d88e4fde7120a0c..564d3c51b3e551e61e571d0e0d62f350f49543f6 100644 (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);
index fde72c2f93b49794cb92a080049bd933a4f653b4..9dbe133ec7495f3844954a97fc4eeff9a7c16e84 100644 (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" } } */
\ No newline at end of file
+/* { dg-final { scan-tree-dump "coshl " "optimized" } } */