10 unsigned int test1u(unsigned int x
)
12 return ~(x
^ (unsigned int)INT_MIN
);
15 unsigned int test2u(unsigned int x
)
17 return ~(x
+ (unsigned int)INT_MIN
);
20 unsigned int test3u(unsigned int x
)
22 return ~(x
- (unsigned int)INT_MIN
);
31 unsigned int test4u(unsigned int x
)
33 unsigned int y
= (unsigned int)INT_MIN
;
37 unsigned int test5u(unsigned int x
)
39 unsigned int y
= (unsigned int)INT_MIN
;
43 unsigned int test6u(unsigned int x
)
45 unsigned int y
= (unsigned int)INT_MIN
;
51 void test(int a
, int b
)
59 void testu(unsigned int a
, unsigned int b
)
78 #if INT_MAX == 2147483647
79 test(0x00000000,0x7fffffff);
80 test(0x80000000,0xffffffff);
81 test(0x12345678,0x6dcba987);
82 test(0x92345678,0xedcba987);
83 test(0x7fffffff,0x00000000);
84 test(0xffffffff,0x80000000);
86 testu(0x00000000,0x7fffffff);
87 testu(0x80000000,0xffffffff);
88 testu(0x12345678,0x6dcba987);
89 testu(0x92345678,0xedcba987);
90 testu(0x7fffffff,0x00000000);
91 testu(0xffffffff,0x80000000);
102 testu(0x0000,0x7fff);
103 testu(0x8000,0xffff);
104 testu(0x1234,0x6dcb);
105 testu(0x9234,0xedcb);
106 testu(0x7fff,0x0000);
107 testu(0xffff,0x8000);