libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / sinhovercosh-1.c
blob564d3c51b3e551e61e571d0e0d62f350f49543f6
1 /* { dg-do compile } */
2 /* { dg-options "-Ofast -fdump-tree-optimized" } */
3 /* { dg-require-effective-target c99_runtime } */
5 extern float sinhf (float);
6 extern float coshf (float);
7 extern float tanhf (float);
8 extern float sqrtf (float);
9 extern double sinh (double);
10 extern double cosh (double);
11 extern double sqrt (double);
12 extern double tanh (double);
13 extern long double sinhl (long double);
14 extern long double coshl (long double);
15 extern long double tanhl (long double);
16 extern long double sqrtl (long double);
18 double __attribute__ ((noinline))
19 sinhovercosh_ (double x)
21 return sinh (x) / cosh (x);
24 float __attribute__ ((noinline))
25 sinhfovercoshf_(float x)
27 return sinhf (x) / coshf (x);
30 long double __attribute__ ((noinline))
31 sinhlovercoshl_ (long double x)
33 return sinhl (x) / coshl (x);
36 /* There must be no calls to sinh, cosh, or atanh */
37 /* { dg-final { scan-tree-dump-not "sinh " "optimized" } } */
38 /* { dg-final { scan-tree-dump-not "cosh " "optimized" } } */
39 /* { dg-final { scan-tree-dump-not "sinfh " "optimized" } } */
40 /* { dg-final { scan-tree-dump-not "cosfh " "optimized" } } */
41 /* { dg-final { scan-tree-dump-not "sinlh " "optimized" } } */
42 /* { dg-final { scan-tree-dump-not "coslh " "optimized" } } */
43 /* { dg-final { scan-tree-dump-times "tanh " "1" "optimized" } } */
44 /* { dg-final { scan-tree-dump-times "tanhl " "1" "optimized" } } */
45 /* { dg-final { scan-tree-dump-times "tanhf " "1" "optimized" } } */