1 /* 2 pr42142.c from the execute part of the gcc torture tests. 3 */ 4 5 #include <testfwk.h> 6 7 #ifdef __SDCC 8 #pragma std_c99 9 #endif 10 11 int sort(int L)12sort(int L) 13 { 14 int end[2] = { 10, 10, }, i=0, R; 15 while (i<2) 16 { 17 R = end[i]; 18 if (L<R) 19 { 20 end[i+1] = 1; 21 end[i] = 10; 22 ++i; 23 } 24 else 25 break; 26 } 27 return i; 28 } 29 30 void testTortureExecute(void)31testTortureExecute (void) 32 { 33 if (sort (5) != 1) 34 ASSERT (0); 35 return; 36 } 37 38