1 /* { dg-do compile } */ 2 /* { dg-options "-Ofast -fdump-tree-optimized" } */ 3 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); 16 17 double __attribute__ ((noinline)) sinhatanh_(double x)18sinhatanh_ (double x) 19 { 20 return sinh (atanh (x)); 21 } 22 23 double __attribute__ ((noinline)) coshatanh_(double x)24coshatanh_ (double x) 25 { 26 return cosh (atanh (x)); 27 } 28 29 float __attribute__ ((noinline)) sinhatanhf_(float x)30sinhatanhf_(float x) 31 { 32 return sinhf (atanhf (x)); 33 } 34 35 float __attribute__ ((noinline)) coshatanhf_(float x)36coshatanhf_(float x) 37 { 38 return coshf (atanhf (x)); 39 } 40 41 long double __attribute__ ((noinline)) sinhatanhl_(long double x)42sinhatanhl_ (long double x) 43 { 44 return sinhl (atanhl (x)); 45 } 46 47 long double __attribute__ ((noinline)) coshatanhl_(long double x)48coshatanhl_ (long double x) 49 { 50 return coshl (atanhl (x)); 51 } 52 53 /* There must be no calls to sinh, cosh, or atanh */ 54 /* {dg-final { scan-tree-dump-not "sinh " "optimized" } } */ 55 /* {dg-final { scan-tree-dump-not "cosh " "optimized" } } */ 56 /* {dg-final { scan-tree-dump-not "atanh " "optimized" }} */ 57 /* {dg-final { scan-tree-dump-not "sinfh " "optimized" } } */ 58 /* {dg-final { scan-tree-dump-not "cosfh " "optimized" } } */ 59 /* {dg-final { scan-tree-dump-not "atanfh " "optimized" }} */ 60 /* {dg-final { scan-tree-dump-not "sinlh " "optimized" } } */ 61 /* {dg-final { scan-tree-dump-not "coslh " "optimized" } } */ 62 /* {dg-final { scan-tree-dump-not "atanlh " "optimized" }} */ 63