struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-990404-1.c
blobbc2310e22d7b4516021e90b82d00954cef24a8e0
1 /*
2 990404-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #pragma disable_warning 84
10 #pragma disable_warning 85
11 #endif
14 int x[10] = { 0,1,2,3,4,5,6,7,8,9};
16 void
17 testTortureExecute (void)
19 int niterations = 0, i;
21 for (;;) {
22 int i, mi, max;
23 max = 0;
24 for (i = 0; i < 10 ; i++) {
25 if (x[i] > max) {
26 max = x[i];
27 mi = i;
30 if (max == 0)
31 break;
32 x[mi] = 0;
33 niterations++;
34 if (niterations > 10)
35 ASSERT (0);
38 return;