1/* PR tree-optimization/47148 */ 2 3static inline unsigned 4bar (unsigned x, unsigned y) 5{ 6 if (y >= 32) 7 return x; 8 else 9 return x >> y; 10} 11 12static unsigned a = 1, b = 1; 13 14static inline void 15foo (unsigned char x, unsigned y) 16{ 17 if (!y) 18 return; 19 unsigned c = (0x7000U / (x - 2)) ^ a; 20 unsigned d = bar (a, a); 21 b &= ((a - d) && (a - 1)) + c; 22} 23 24int 25main (void) 26{ 27 foo (1, 1); 28 foo (-1, 1); 29 if (b && ((unsigned char) -1) == 255) 30 __builtin_abort (); 31 return 0; 32} 33