struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-loop-2c.c
blob89f08ab6106e21ba82b423acd9df09ac8c7c28db
1 /*
2 loop-2c.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 static
14 inline void f (int b, int o)
16 unsigned int i;
17 int *p;
18 for (p = &a[b], i = b; --i < ~0; )
19 *--p = i * 3 + o;
22 void g(int b)
24 f (b, (int)a);
27 void
28 testTortureExecute (void)
30 a[0] = a[1] = 0;
31 g (2);
32 if (a[0] != (int)a || a[1] != (int)a + 3)
33 ASSERT (0);
34 return;