struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-loop-2d.c
blob36f5b2a505a3dbcec4639bf83b3915eec379d2c9
1 /*
2 loop-2d.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 int a[2];
13 void f (int b)
15 unsigned int i;
16 int *p;
17 for (p = &a[b], i = b; --i < ~0; )
18 *--p = i * 3 + (int)a;
21 void
22 testTortureExecute (void)
24 a[0] = a[1] = 0;
25 f (2);
26 if (a[0] != (int)a || a[1] != (int)a + 3)
27 ASSERT (0);
28 return;