1 /* { dg-do compile } */
2 /* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
4 double test1 (double x)
6 return __real __builtin_cexp(x * (__extension__ 1.0iF));
11 return __imag __builtin_cexp((__extension__ 1.0iF) * x);
14 double test3(double x)
16 _Complex c = __builtin_cexp(x * (__extension__ 1.0iF));
17 return __imag c + __real c;
20 double test4(double x, double y)
22 _Complex c = __builtin_cexp(x);
23 x = __builtin_exp (x);
27 /* { dg-final { scan-tree-dump "cexpi" "optimized" } } */
28 /* { dg-final { scan-tree-dump "sin" "optimized" } } */
29 /* { dg-final { scan-tree-dump "cos" "optimized" } } */
30 /* { dg-final { scan-tree-dump "return 0.0" "optimized" } } */
31 /* { dg-final { cleanup-tree-dump "optimized" } } */