1extern void abort(void);
2
3int test1(char x)
4{
5  return x/100 == 3;
6}
7
8int test1u(unsigned char x)
9{
10  return x/100 == 3;
11}
12
13int test2(char x)
14{
15  return x/100 != 3;
16}
17
18int test2u(unsigned char x)
19{
20  return x/100 != 3;
21}
22
23int test3(char x)
24{
25  return x/100 < 3;
26}
27
28int test3u(unsigned char x)
29{
30  return x/100 < 3;
31}
32
33int test4(char x)
34{
35  return x/100 <= 3;
36}
37
38int test4u(unsigned char x)
39{
40  return x/100 <= 3;
41}
42
43int test5(char x)
44{
45  return x/100 > 3;
46}
47
48int test5u(unsigned char x)
49{
50  return x/100 > 3;
51}
52
53int test6(char x)
54{
55  return x/100 >= 3;
56}
57
58int test6u(unsigned char x)
59{
60  return x/100 >= 3;
61}
62
63
64int main()
65{
66  int c;
67
68  for (c=-128; c<256; c++)
69  {
70    if (test1(c) != 0)
71      abort ();
72    if (test1u(c) != 0)
73      abort ();
74    if (test2(c) != 1)
75      abort ();
76    if (test2u(c) != 1)
77      abort ();
78    if (test3(c) != 1)
79      abort ();
80    if (test3u(c) != 1)
81      abort ();
82    if (test4(c) != 1)
83      abort ();
84    if (test4u(c) != 1)
85      abort ();
86    if (test5(c) != 0)
87      abort ();
88    if (test5u(c) != 0)
89      abort ();
90    if (test6(c) != 0)
91      abort ();
92    if (test6u(c) != 0)
93      abort ();
94  }
95  return 0;
96}
97
98