1 /* PR tree-optimization/51721 */ 2 /* { dg-do link } */ 3 /* { dg-options "-O2" } */ 4 5 extern void link_error (void); 6 7 #define BITSM1 (sizeof (int) * __CHAR_BIT__ - 1) 8 9 void f1(unsigned int s)10f1 (unsigned int s) 11 { 12 if (s >> 1 == 0) 13 { 14 if (s == 2 || s == -1U) 15 link_error (); 16 } 17 else 18 { 19 if (s == 0 || s == 1) 20 link_error (); 21 } 22 } 23 24 void f2(unsigned int s)25f2 (unsigned int s) 26 { 27 if (s >> 4 != 3) 28 { 29 if (s == 48 || s == 57 || s == 63) 30 link_error (); 31 } 32 else 33 { 34 if (s == 47 || s == 64 || s == 0 || s == -1U) 35 link_error (); 36 } 37 } 38 39 void f3(int s)40f3 (int s) 41 { 42 if (s >> 3 == -2) 43 { 44 if (s == -17 || s == -8 || s == 0 45 || s == -__INT_MAX__ - 1 || s == __INT_MAX__) 46 link_error (); 47 } 48 else 49 { 50 if (s == -16 || s == -12 || s == -9) 51 link_error (); 52 } 53 } 54 55 void f4(unsigned int s)56f4 (unsigned int s) 57 { 58 if (s >> 2 < 4) 59 { 60 if (s == 16 || s == 20 || s == -1U) 61 link_error (); 62 } 63 else 64 { 65 if (s == 0 || s == 2 || s == 14 || s == 15) 66 link_error (); 67 } 68 } 69 70 void f5(unsigned int s)71f5 (unsigned int s) 72 { 73 if (s >> 3 <= 7) 74 { 75 if (s == 64 || s == 68 || s == -1U) 76 link_error (); 77 } 78 else 79 { 80 if (s == 0 || s == 1 || s == 62 || s == 63) 81 link_error (); 82 } 83 } 84 85 void f6(unsigned int s)86f6 (unsigned int s) 87 { 88 if (s >> 1 > 2) 89 { 90 if (s == 0 || s == 3 || s == 5) 91 link_error (); 92 } 93 else 94 { 95 if (s == 6 || s == 8 || s == -1U) 96 link_error (); 97 } 98 } 99 100 void f7(unsigned int s)101f7 (unsigned int s) 102 { 103 if (s >> 5 >= 7) 104 { 105 if (s == 0 || s == 2 || s == 221 || s == 223) 106 link_error (); 107 } 108 else 109 { 110 if (s == 224 || s == 256 || s == 258 || s == -1U) 111 link_error (); 112 } 113 } 114 115 void f8(int s)116f8 (int s) 117 { 118 if (s >> 2 < -3) 119 { 120 if (s == -12 || s == -10 || s == 0 || s == __INT_MAX__) 121 link_error (); 122 } 123 else 124 { 125 if (s == -13 || s == -16 || s == -__INT_MAX__ - 1) 126 link_error (); 127 } 128 } 129 130 void f9(int s)131f9 (int s) 132 { 133 if (s >> 3 <= -2) 134 { 135 if (s == -8 || s == -6 || s == 0 || s == __INT_MAX__) 136 link_error (); 137 } 138 else 139 { 140 if (s == -9 || s == -11 || s == -__INT_MAX__ - 1) 141 link_error (); 142 } 143 } 144 145 void f10(int s)146f10 (int s) 147 { 148 if (s >> 1 > -4) 149 { 150 if (s == -7 || s == -9 || s == -__INT_MAX__ - 1) 151 link_error (); 152 } 153 else 154 { 155 if (s == -6 || s == -4 || s == 0 || s == __INT_MAX__) 156 link_error (); 157 } 158 } 159 160 void f11(int s)161f11 (int s) 162 { 163 if (s >> 3 >= -6) 164 { 165 if (s == -49 || s == -51 || s == -__INT_MAX__ - 1) 166 link_error (); 167 } 168 else 169 { 170 if (s == -48 || s == -46 || s == 0 || s == __INT_MAX__) 171 link_error (); 172 } 173 } 174 175 void f12(int s)176f12 (int s) 177 { 178 if (s >> 2 < 4) 179 { 180 if (s == 16 || s == 20 || s == __INT_MAX__) 181 link_error (); 182 } 183 else 184 { 185 if (s == 0 || s == 2 || s == 14 || s == 15 186 || s == -2 || s == -__INT_MAX__ - 1) 187 link_error (); 188 } 189 } 190 191 void f13(int s)192f13 (int s) 193 { 194 if (s >> 3 <= 7) 195 { 196 if (s == 64 || s == 68 || s == __INT_MAX__) 197 link_error (); 198 } 199 else 200 { 201 if (s == 0 || s == 1 || s == 62 || s == 63 202 || s == -2 || s == -__INT_MAX__ - 1) 203 link_error (); 204 } 205 } 206 207 void f14(int s)208f14 (int s) 209 { 210 if (s >> 1 > 2) 211 { 212 if (s == 0 || s == 3 || s == 5 213 || s == -2 || s == -__INT_MAX__ - 1) 214 link_error (); 215 } 216 else 217 { 218 if (s == 6 || s == 8 || s == __INT_MAX__) 219 link_error (); 220 } 221 } 222 223 void f15(int s)224f15 (int s) 225 { 226 if (s >> 5 >= 7) 227 { 228 if (s == 0 || s == 2 || s == 221 || s == 223 229 || s == -2 || s == -__INT_MAX__ - 1) 230 link_error (); 231 } 232 else 233 { 234 if (s == 224 || s == 256 || s == 258 || s == __INT_MAX__) 235 link_error (); 236 } 237 } 238 239 unsigned int f16(unsigned int s)240f16 (unsigned int s) 241 { 242 unsigned int t = s >> BITSM1; 243 if (t != 0) 244 { 245 if (s == 0 || s == 5 || s == __INT_MAX__) 246 link_error (); 247 } 248 else 249 { 250 if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U) 251 link_error (); 252 } 253 return t; 254 } 255 256 int f17(int s)257f17 (int s) 258 { 259 int t = s >> BITSM1; 260 if (t == 0) 261 { 262 if (s == -1 || s == -5 || s == -__INT_MAX__ - 1) 263 link_error (); 264 } 265 else 266 { 267 if (s == 0 || s == 5 || s == __INT_MAX__) 268 link_error (); 269 } 270 return t; 271 } 272 273 unsigned int f18(unsigned int s)274f18 (unsigned int s) 275 { 276 unsigned int t = s >> BITSM1; 277 if (t >= 1) 278 { 279 if (s == 0 || s == 5 || s == __INT_MAX__) 280 link_error (); 281 } 282 else 283 { 284 if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U) 285 link_error (); 286 } 287 return t; 288 } 289 290 int f19(int s)291f19 (int s) 292 { 293 int t = s >> BITSM1; 294 if (t >= 0) 295 { 296 if (s == -1 || s == -5 || s == -__INT_MAX__ - 1) 297 link_error (); 298 } 299 else 300 { 301 if (s == 0 || s == 5 || s == __INT_MAX__) 302 link_error (); 303 } 304 return t; 305 } 306 307 unsigned int f20(unsigned int s)308f20 (unsigned int s) 309 { 310 unsigned int t = s >> BITSM1; 311 if (t < 1) 312 { 313 if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U) 314 link_error (); 315 } 316 else 317 { 318 if (s == 0 || s == 5 || s == __INT_MAX__) 319 link_error (); 320 } 321 return t; 322 } 323 324 int f21(int s)325f21 (int s) 326 { 327 int t = s >> BITSM1; 328 if (t < 0) 329 { 330 if (s == 0 || s == 5 || s == __INT_MAX__) 331 link_error (); 332 } 333 else 334 { 335 if (s == -1 || s == -5 || s == -__INT_MAX__ - 1) 336 link_error (); 337 } 338 return t; 339 } 340 341 int main()342main () 343 { 344 return 0; 345 } 346