2007-02-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-61.c
blob9f0c99065da3e0f5e7986c2dc6bf72c6d4a3440b
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));
9 double test2(double x)
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);
24 return x - __real c;
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" } } */