libstdc++: Preserve signbit of nan when converting float to double [PR113578]
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / complex-3.c
blobdb119e24639a1c68c4e04e7d9afce86c9666aecb
1 void abort (void);
2 void exit (int);
4 struct complex
6 float r;
7 float i;
8 };
10 struct complex cmplx (float, float);
12 struct complex
13 f (float a, float b)
15 struct complex c;
16 c.r = a;
17 c.i = b;
18 return c;
21 int
22 main (void)
24 struct complex z = f (1.0, 0.0);
26 if (z.r != 1.0 || z.i != 0.0)
27 abort ();
28 exit (0);