struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr42142.c
bloba4ea16d142cfb0c812111cce062c0d8db86881cb
1 /*
2 pr42142.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
12 sort(int L)
14 int end[2] = { 10, 10, }, i=0, R;
15 while (i<2)
17 R = end[i];
18 if (L<R)
20 end[i+1] = 1;
21 end[i] = 10;
22 ++i;
24 else
25 break;
27 return i;
30 void
31 testTortureExecute (void)
33 if (sort (5) != 1)
34 ASSERT (0);
35 return;