struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000726-1.c
blob7ddbd628be517db40e8e7c069e0cae2c8dc97266
1 /*
2 20000726-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 void adjust_xy (short *, short *);
13 struct adjust_template
15 short kx_x;
16 short kx_y;
17 short kx;
18 short kz;
21 static struct adjust_template adjust = {0, 0, 1, 1};
23 void
24 testTortureExecute (void)
26 short x = 1, y = 1;
28 adjust_xy (&x, &y);
30 if (x != 1)
31 ASSERT (0);
33 return;
36 void
37 adjust_xy (short *x, short *y)
39 *x = adjust.kx_x * *x + adjust.kx_y * *y + adjust.kx;