Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/complex-3.c

raw
1 void abort (void);
2 void exit (int);
3
4 struct complex
5 {
6 float r;
7 float i;
8 };
9
10 struct complex cmplx (float, float);
11
12 struct complex
13 f (float a, float b)
14 {
15 struct complex c;
16 c.r = a;
17 c.i = b;
18 return c;
19 }
20
21 int
22 main (void)
23 {
24 struct complex z = f (1.0, 0.0);
25
26 if (z.r != 1.0 || z.i != 0.0)
27 abort ();
28 exit (0);
29 }