Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-loop-1.c
blob32fe3e6f605c89b445d4abf37c07611aefe6e794
1 /*
2 loop-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
12 testTortureExecute (void)
14 int i, j, k[3];
16 j = 0;
17 for (i=0; i < 3; i++)
19 k[i] = j++;
22 for (i=2; i >= 0; i--)
24 if (k[i] != i)
25 ASSERT (0);
28 return;