1 // Signed comparisons of the form: (variable<LIT)
3 // This regression test exercises all of the boundary
4 // conditions in literal less than comparisons. There
5 // are numerous opportunities to optimize these comparison
6 // and each one has an astonishing capability of failing
7 // a boundary condition.
9 unsigned char success = 0;
10 unsigned char failures = 0;
11 unsigned char dummy = 0;
12 unsigned char result = 0;
17 signed char char0 = 0;
18 signed char char1 = 0;
29 void c_char_lt_lit1(unsigned char expected_result)
49 if(result != expected_result)
54 void char_compare(void)
93 /* Now test entire range */
95 for(char0=1; char0 != 0x7f; char0++)
99 for(char0=-0x7f; char0 != -1; char0++)
100 c_char_lt_lit1(0x1e);
105 void c_int_lt_lit1(unsigned char expected_result)
134 if(result != expected_result)
140 void int_compare1(void)
181 /* now check contiguous ranges */
183 for(int0 = -0x7fff; int0 != -1; int0++)
186 for(int0 = 1; int0 != 0xff; int0++)
189 for(int0 = 0x201; int0 != 0x7fff; int0++)
195 void c_int_lt_lit2(unsigned char expected_result)
223 if(result != expected_result)
227 void int_compare2(void)
274 /* now check contiguous ranges */
278 for(int0 = -0x7ffe; int0 != -0x7f01; int0++)
281 for(int0 = -0x7e00; int0 != -0x101; int0++)
284 for(int0 = -1; int0 != 0x7fff; int0++)