Merge from mainline
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr26180.c
blob730115b686b89295fc6ceadf64f3c8a947699680
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
4 void abort(void);
5 int bar(int x, int y)
7 int x1, y1;
8 int x2, y2;
9 unsigned int x3, y3, w;
10 int z = 1;
12 x1 = (x < (1 << 30));
13 y1 = (y < (1 << 30));
14 if (x1)
15 if (y1) {
16 x2 = ((x > 0)? (x): -(x));
17 y2 = ((y > 0)? (y): -(y));
19 x3 = x2;
20 y3 = y2;
21 w = x3 * y3;
23 if (w >= (1 << 30)) {
24 z = 1;
25 } else {
26 z = -1;
30 return z;
34 int main()
36 int x, y, z;
37 x = 536870912; /* 2^29 */
38 y = 2;
39 z = bar(x, y);
40 if (z != 1)
41 abort ();
42 return 0;