(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
sinhovercosh-1.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-Ofast -fdump-tree-optimized" } */
       3  /* { dg-require-effective-target c99_runtime } */
       4  
       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);
      17  
      18  double __attribute__ ((noinline))
      19  sinhovercosh_ (double x)
      20  {
      21    return sinh (x) / cosh (x);
      22  }
      23  
      24  float __attribute__ ((noinline))
      25  sinhfovercoshf_(float x)
      26  {
      27    return sinhf (x) / coshf (x);
      28  }
      29  
      30  long double __attribute__ ((noinline))
      31  sinhlovercoshl_ (long double x)
      32  {
      33    return sinhl (x) / coshl (x);
      34  }
      35  
      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" } } */
      46