10 unsigned int test1u(unsigned int x
)
12 return ~(x
^ (unsigned int)INT_MIN
);
17 return ~(x
+ INT_MIN
);
20 unsigned int test2u(unsigned int x
)
22 return ~(x
+ (unsigned int)INT_MIN
);
27 return ~(x
- INT_MIN
);
30 unsigned int test3u(unsigned int x
)
32 return ~(x
- (unsigned int)INT_MIN
);
41 unsigned int test4u(unsigned int x
)
43 unsigned int y
= (unsigned int)INT_MIN
;
53 unsigned int test5u(unsigned int x
)
55 unsigned int y
= (unsigned int)INT_MIN
;
65 unsigned int test6u(unsigned int x
)
67 unsigned int y
= (unsigned int)INT_MIN
;
73 void test(int a
, int b
)
89 void testu(unsigned int a
, unsigned int b
)
108 #if INT_MAX == 2147483647
109 test(0x00000000,0x7fffffff);
110 test(0x80000000,0xffffffff);
111 test(0x12345678,0x6dcba987);
112 test(0x92345678,0xedcba987);
113 test(0x7fffffff,0x00000000);
114 test(0xffffffff,0x80000000);
116 testu(0x00000000,0x7fffffff);
117 testu(0x80000000,0xffffffff);
118 testu(0x12345678,0x6dcba987);
119 testu(0x92345678,0xedcba987);
120 testu(0x7fffffff,0x00000000);
121 testu(0xffffffff,0x80000000);
132 testu(0x0000,0x7fff);
133 testu(0x8000,0xffff);
134 testu(0x1234,0x6dcb);
135 testu(0x9234,0xedcb);
136 testu(0x7fff,0x0000);
137 testu(0xffff,0x8000);