1 /* { dg-do run } */ 2 /* { dg-options "-O2" } */ 3 /* { dg-require-effective-target int32plus } */ 4 5 void abort(void); bar(int x,int y)6int bar(int x, int y) 7 { 8 int x1, y1; 9 int x2, y2; 10 unsigned int x3, y3, w; 11 int z = 1; 12 13 x1 = (x < (1 << 30)); 14 y1 = (y < (1 << 30)); 15 if (x1) 16 if (y1) { 17 x2 = ((x > 0)? (x): -(x)); 18 y2 = ((y > 0)? (y): -(y)); 19 20 x3 = x2; 21 y3 = y2; 22 w = x3 * y3; 23 24 if (w >= (1 << 30)) { 25 z = 1; 26 } else { 27 z = -1; 28 } 29 } 30 31 return z; 32 } 33 34 main()35int main() 36 { 37 int x, y, z; 38 x = 536870912; /* 2^29 */ 39 y = 2; 40 z = bar(x, y); 41 if (z != 1) 42 abort (); 43 return 0; 44 } 45