1 /* { dg-do compile } */
2 /* { dg-options "-Ofast -fdump-tree-optimized" } */
4 extern float sinhf (float);
5 extern float coshf (float);
6 extern float atanhf (float);
7 extern float sqrtf (float);
8 extern double sinh (double);
9 extern double cosh (double);
10 extern double atanh (double);
11 extern double sqrt (double);
12 extern long double sinhl (long double);
13 extern long double coshl (long double);
14 extern long double atanhl (long double);
15 extern long double sqrtl (long double);
17 float __attribute__ ((noinline
))
20 float atg
= atanhf(x
);
21 return coshf(atg
) + atg
;
24 double __attribute__ ((noinline
))
27 double atg
= atanh(x
);
28 return cosh(atg
) + atg
;
31 long double __attribute__ ((noinline
))
32 cosatanl_(long double x
)
34 long double atg
= atanhl(x
);
35 return coshl(atg
) + atg
;
38 float __attribute__ ((noinline
))
41 float atg
= atanhf(x
);
42 return sinhf(atg
) + atg
;
45 double __attribute__ ((noinline
))
48 double atg
= atanh(x
);
49 return sinh(atg
) + atg
;
52 long double __attribute__ ((noinline
))
53 sinatanl_(long double x
)
55 long double atg
= atanhl(x
);
56 return sinhl(atg
) + atg
;
59 /* There should be calls to sinh, cosh and atanh */
60 /* { dg-final { scan-tree-dump-times "cosh " "1" "optimized" } } */
61 /* { dg-final { scan-tree-dump-times "sinh " "1" "optimized" } } */
62 /* { dg-final { scan-tree-dump-times "atanh " "2" "optimized" } } */
63 /* { dg-final { scan-tree-dump-times "coshf " "1" "optimized" } } */
64 /* { dg-final { scan-tree-dump-times "sinhf " "1" "optimized" } } */
65 /* { dg-final { scan-tree-dump-times "atanhf " "2" "optimized" } } */
66 /* { dg-final { scan-tree-dump-times "coshl " "1" "optimized" } } */
67 /* { dg-final { scan-tree-dump-times "sinhl " "1" "optimized" } } */
68 /* { dg-final { scan-tree-dump-times "atanhl " "2" "optimized" } } */