| 1 |
/* { dg-additional-options "-std=gnu17 -fpermissive" } */ |
| 2 |
|
| 3 |
void foo (), bar (), baz (); |
| 4 |
int main () |
| 5 |
{ |
| 6 |
__complex__ double x; |
| 7 |
__complex__ float y; |
| 8 |
__complex__ long double z; |
| 9 |
__real__ x = 1.0; |
| 10 |
__imag__ x = 2.0; |
| 11 |
foo (x); |
| 12 |
__real__ y = 3.0f; |
| 13 |
__imag__ y = 4.0f; |
| 14 |
bar (y); |
| 15 |
__real__ z = 5.0L; |
| 16 |
__imag__ z = 6.0L; |
| 17 |
baz (z); |
| 18 |
exit (0); |
| 19 |
} |
| 20 |
|
| 21 |
void foo (__complex__ double x) |
| 22 |
{ |
| 23 |
if (__real__ x != 1.0 || __imag__ x != 2.0) |
| 24 |
abort (); |
| 25 |
} |
| 26 |
|
| 27 |
void bar (__complex__ float x) |
| 28 |
{ |
| 29 |
if (__real__ x != 3.0f || __imag__ x != 4.0f) |
| 30 |
abort (); |
| 31 |
} |
| 32 |
|
| 33 |
void baz (__complex__ long double x) |
| 34 |
{ |
| 35 |
if (__real__ x != 5.0L || __imag__ x != 6.0L) |
| 36 |
abort (); |
| 37 |
} |
| 38 |
|