OSDN Git Service

* gcc.dg/tree-ssa/fre-vce-1.c: Cleanup "fre" tree dump.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / builtins-61.c
1 /* { dg-do compile } */
2 /* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
3 /* { dg-require-effective-target c99_runtime } */
4
5 double test1 (double x)
6 {
7   return __real __builtin_cexp(x * (__extension__ 1.0iF));
8 }
9
10 double test2(double x)
11 {
12   return __imag __builtin_cexp((__extension__ 1.0iF) * x);
13 }
14
15 double test3(double x)
16 {
17   _Complex c = __builtin_cexp(x * (__extension__ 1.0iF));
18   return __imag c + __real c;
19 }
20
21 double test4(double x, double y)
22 {
23   _Complex c = __builtin_cexp(x);
24   x = __builtin_exp (x);
25   return x - __real c;
26 }
27
28 /* { dg-final { scan-tree-dump "cexpi" "optimized" } } */
29 /* { dg-final { scan-tree-dump "sin" "optimized" } } */
30 /* { dg-final { scan-tree-dump "cos" "optimized" } } */
31 /* { dg-final { scan-tree-dump "return 0.0" "optimized" } } */
32 /* { dg-final { cleanup-tree-dump "optimized" } } */