Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / sinatan-2.c
blob07a1e1e0c19d13adcd6d9c1fb62f7e6b170f29bf
1 /* { dg-do compile } */
2 /* { dg-options "-Ofast -fdump-tree-optimized" } */
4 extern float sinf (float);
5 extern float cosf (float);
6 extern float atanf (float);
7 extern double sin (double);
8 extern double cos (double);
9 extern double atan (double);
10 extern long double sinl (long double);
11 extern long double cosl (long double);
12 extern long double atanl (long double);
14 double __attribute__ ((noinline))
15 sinatan_ (double x)
17 return sin (atan (x));
20 double __attribute__ ((noinline))
21 cosatan_ (double x)
23 return cos (atan (x));
26 float __attribute__ ((noinline))
27 sinatanf_(float x)
29 return sinf (atanf (x));
32 float __attribute__ ((noinline))
33 cosatanf_(float x)
35 return cosf (atanf (x));
38 long double __attribute__ ((noinline))
39 sinatanl_ (long double x)
41 return sinl (atanl (x));
44 long double __attribute__ ((noinline))
45 cosatanl_ (long double x)
47 return cosl (atanl (x));
50 /* There must be no calls to sin, cos, or atan */
51 /* {dg-final { scan-tree-dump-not "sin " "optimized" } } */
52 /* {dg-final { scan-tree-dump-not "cos " "optimized" } } */
53 /* {dg-final { scan-tree-dump-not "atan " "optimized" }} */
54 /* {dg-final { scan-tree-dump-not "sinf " "optimized" } } */
55 /* {dg-final { scan-tree-dump-not "cosf " "optimized" } } */
56 /* {dg-final { scan-tree-dump-not "atanf " "optimized" }} */
57 /* {dg-final { scan-tree-dump-not "sinl " "optimized" } } */
58 /* {dg-final { scan-tree-dump-not "cosl " "optimized" } } */
59 /* {dg-final { scan-tree-dump-not "atanl " "optimized" }} */