| 1 |
void abort (void); |
| 2 |
void exit (int); |
| 3 |
|
| 4 |
double |
| 5 |
g0 (double x) |
| 6 |
{ |
| 7 |
return 1.0; |
| 8 |
} |
| 9 |
|
| 10 |
double |
| 11 |
g1 (double x) |
| 12 |
{ |
| 13 |
return -1.0; |
| 14 |
} |
| 15 |
|
| 16 |
double |
| 17 |
g2 (double x) |
| 18 |
{ |
| 19 |
return 0.0; |
| 20 |
} |
| 21 |
|
| 22 |
__complex__ double |
| 23 |
xcexp (__complex__ double x) |
| 24 |
{ |
| 25 |
double r; |
| 26 |
|
| 27 |
r = g0 (__real__ x); |
| 28 |
__real__ x = r * g1 (__imag__ x); |
| 29 |
__imag__ x = r * g2 (__imag__ x); |
| 30 |
return x; |
| 31 |
} |
| 32 |
|
| 33 |
int |
| 34 |
main (void) |
| 35 |
{ |
| 36 |
__complex__ double x; |
| 37 |
|
| 38 |
x = xcexp (1.0i); |
| 39 |
if (__real__ x != -1.0) |
| 40 |
abort (); |
| 41 |
if (__imag__ x != 0.0) |
| 42 |
abort (); |
| 43 |
exit (0); |
| 44 |
} |