1 /* { dg-do compile } */
2 /* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
3 /* { dg-require-effective-target c99_runtime } */
5 double test1 (double x
)
7 return __real
__builtin_cexp(x
* (__extension__
1.0iF
));
10 double test2(double x
)
12 return __imag
__builtin_cexp((__extension__
1.0iF
) * x
);
15 double test3(double x
)
17 _Complex c
= __builtin_cexp(x
* (__extension__
1.0iF
));
18 return __imag c
+ __real c
;
21 double test4(double x
, double y
)
23 _Complex c
= __builtin_cexp(x
);
24 x
= __builtin_exp (x
);
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" } } */