From: Pat Bernardi Date: Wed, 19 Aug 2020 09:05:21 +0000 (+0100) Subject: testsuite: require c99 runtime for trigonometric optimisation tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7dbcb569b2793be8748050f91ea8a089bc2623c8;p=gcc.git 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 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. --- diff --git a/gcc/testsuite/gcc.dg/sinatan-2.c b/gcc/testsuite/gcc.dg/sinatan-2.c index 8e7ea3c90fc..64d6d301535 100644 --- a/gcc/testsuite/gcc.dg/sinatan-2.c +++ b/gcc/testsuite/gcc.dg/sinatan-2.c @@ -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); diff --git a/gcc/testsuite/gcc.dg/sinhovercosh-1.c b/gcc/testsuite/gcc.dg/sinhovercosh-1.c index d41093fa6de..564d3c51b3e 100644 --- a/gcc/testsuite/gcc.dg/sinhovercosh-1.c +++ b/gcc/testsuite/gcc.dg/sinhovercosh-1.c @@ -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); diff --git a/gcc/testsuite/gcc.dg/tanhbysinh.c b/gcc/testsuite/gcc.dg/tanhbysinh.c index fde72c2f93b..9dbe133ec74 100644 --- a/gcc/testsuite/gcc.dg/tanhbysinh.c +++ b/gcc/testsuite/gcc.dg/tanhbysinh.c @@ -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" } } */