Corrected date in changelog
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-62.c
blobe0420cea6880a791c9b8bb7e1f3bf2335026ce83
1 /* { dg-do compile } */
2 /* { dg-options "-O -ffinite-math-only -fdump-tree-optimized" } */
3 /* { dg-require-effective-target c99_runtime } */
5 double test1 (double x)
7 double s, c;
8 s = __builtin_sin (x);
9 c = __builtin_cos (x);
10 return s + c;
13 double test2 (double x)
15 double s, c;
16 x = x * 2;
17 s = __builtin_sin (x);
18 c = __builtin_cos (x);
19 return s + c;
22 double test3 (double x, int b)
24 double s, c;
25 if (b)
26 x = x * 2;
27 s = __builtin_sin (x);
28 c = __builtin_cos (x);
29 return s + c;
32 double test4 (double x)
34 double s;
35 x = x * 2;
36 s = __builtin_sin (x);
37 return s;
40 /* { dg-final { scan-tree-dump-times "cexpi" 3 "optimized" } } */