Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.c-torture/execute/20040409-2.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
20 unsigned int test2u(unsigned int x) | 20 unsigned int test2u(unsigned int x) |
21 { | 21 { |
22 return (x ^ 0x1234) ^ (unsigned int)INT_MIN; | 22 return (x ^ 0x1234) ^ (unsigned int)INT_MIN; |
23 } | 23 } |
24 | 24 |
25 int test3(int x) | |
26 { | |
27 return (x + INT_MIN) ^ 0x1234; | |
28 } | |
29 | |
30 unsigned int test3u(unsigned int x) | 25 unsigned int test3u(unsigned int x) |
31 { | 26 { |
32 return (x + (unsigned int)INT_MIN) ^ 0x1234; | 27 return (x + (unsigned int)INT_MIN) ^ 0x1234; |
33 } | |
34 | |
35 int test4(int x) | |
36 { | |
37 return (x ^ 0x1234) + INT_MIN; | |
38 } | 28 } |
39 | 29 |
40 unsigned int test4u(unsigned int x) | 30 unsigned int test4u(unsigned int x) |
41 { | 31 { |
42 return (x ^ 0x1234) + (unsigned int)INT_MIN; | 32 return (x ^ 0x1234) + (unsigned int)INT_MIN; |
43 } | 33 } |
44 | 34 |
45 int test5(int x) | |
46 { | |
47 return (x - INT_MIN) ^ 0x1234; | |
48 } | |
49 | |
50 unsigned int test5u(unsigned int x) | 35 unsigned int test5u(unsigned int x) |
51 { | 36 { |
52 return (x - (unsigned int)INT_MIN) ^ 0x1234; | 37 return (x - (unsigned int)INT_MIN) ^ 0x1234; |
53 } | |
54 | |
55 int test6(int x) | |
56 { | |
57 return (x ^ 0x1234) - INT_MIN; | |
58 } | 38 } |
59 | 39 |
60 unsigned int test6u(unsigned int x) | 40 unsigned int test6u(unsigned int x) |
61 { | 41 { |
62 return (x ^ 0x1234) - (unsigned int)INT_MIN; | 42 return (x ^ 0x1234) - (unsigned int)INT_MIN; |
88 unsigned int y = 0x1234; | 68 unsigned int y = 0x1234; |
89 unsigned int z = (unsigned int)INT_MIN; | 69 unsigned int z = (unsigned int)INT_MIN; |
90 return (x ^ y) ^ z; | 70 return (x ^ y) ^ z; |
91 } | 71 } |
92 | 72 |
93 int test9(int x) | |
94 { | |
95 int y = INT_MIN; | |
96 int z = 0x1234; | |
97 return (x + y) ^ z; | |
98 } | |
99 | |
100 unsigned int test9u(unsigned int x) | 73 unsigned int test9u(unsigned int x) |
101 { | 74 { |
102 unsigned int y = (unsigned int)INT_MIN; | 75 unsigned int y = (unsigned int)INT_MIN; |
103 unsigned int z = 0x1234; | 76 unsigned int z = 0x1234; |
104 return (x + y) ^ z; | 77 return (x + y) ^ z; |
105 } | |
106 | |
107 int test10(int x) | |
108 { | |
109 int y = 0x1234; | |
110 int z = INT_MIN; | |
111 return (x ^ y) + z; | |
112 } | 78 } |
113 | 79 |
114 unsigned int test10u(unsigned int x) | 80 unsigned int test10u(unsigned int x) |
115 { | 81 { |
116 unsigned int y = 0x1234; | 82 unsigned int y = 0x1234; |
117 unsigned int z = (unsigned int)INT_MIN; | 83 unsigned int z = (unsigned int)INT_MIN; |
118 return (x ^ y) + z; | 84 return (x ^ y) + z; |
119 } | 85 } |
120 | 86 |
121 int test11(int x) | |
122 { | |
123 int y = INT_MIN; | |
124 int z = 0x1234; | |
125 return (x - y) ^ z; | |
126 } | |
127 | |
128 unsigned int test11u(unsigned int x) | 87 unsigned int test11u(unsigned int x) |
129 { | 88 { |
130 unsigned int y = (unsigned int)INT_MIN; | 89 unsigned int y = (unsigned int)INT_MIN; |
131 unsigned int z = 0x1234; | 90 unsigned int z = 0x1234; |
132 return (x - y) ^ z; | 91 return (x - y) ^ z; |
133 } | |
134 | |
135 int test12(int x) | |
136 { | |
137 int y = 0x1234; | |
138 int z = INT_MIN; | |
139 return (x ^ y) - z; | |
140 } | 92 } |
141 | 93 |
142 unsigned int test12u(unsigned int x) | 94 unsigned int test12u(unsigned int x) |
143 { | 95 { |
144 unsigned int y = 0x1234; | 96 unsigned int y = 0x1234; |
151 { | 103 { |
152 if (test1(a) != b) | 104 if (test1(a) != b) |
153 abort(); | 105 abort(); |
154 if (test2(a) != b) | 106 if (test2(a) != b) |
155 abort(); | 107 abort(); |
156 if (test3(a) != b) | |
157 abort(); | |
158 if (test4(a) != b) | |
159 abort(); | |
160 if (test5(a) != b) | |
161 abort(); | |
162 if (test6(a) != b) | |
163 abort(); | |
164 if (test7(a) != b) | 108 if (test7(a) != b) |
165 abort(); | 109 abort(); |
166 if (test8(a) != b) | 110 if (test8(a) != b) |
167 abort(); | |
168 if (test9(a) != b) | |
169 abort(); | |
170 if (test10(a) != b) | |
171 abort(); | |
172 if (test11(a) != b) | |
173 abort(); | |
174 if (test12(a) != b) | |
175 abort(); | 111 abort(); |
176 } | 112 } |
177 | 113 |
178 void testu(unsigned int a, unsigned int b) | 114 void testu(unsigned int a, unsigned int b) |
179 { | 115 { |