* expmed.c (flip_storage_order): Deal with complex modes specially.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / complex-1.c
blob59101796475c87b7b537331243e301e8cf9eb442
1 double
2 g0 (double x)
4 return 1.0;
7 double
8 g1 (double x)
10 return -1.0;
13 double
14 g2 (double x)
16 return 0.0;
19 __complex__ double
20 xcexp (__complex__ double x)
22 double r;
24 r = g0 (__real__ x);
25 __real__ x = r * g1 (__imag__ x);
26 __imag__ x = r * g2 (__imag__ x);
27 return x;
30 main ()
32 __complex__ double x;
34 x = xcexp (1.0i);
35 if (__real__ x != -1.0)
36 abort ();
37 if (__imag__ x != 0.0)
38 abort ();
39 exit (0);