PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20050124-1.c
blob9d039ef6623437117d57e6836e804d98a1eef657
1 /* PR rtl-optimization/19579 */
3 extern void abort (void);
5 int
6 foo (int i, int j)
8 int k = i + 1;
10 if (j)
12 if (k > 0)
13 k++;
14 else if (k < 0)
15 k--;
18 return k;
21 int
22 main (void)
24 if (foo (-2, 0) != -1)
25 abort ();
26 if (foo (-1, 0) != 0)
27 abort ();
28 if (foo (0, 0) != 1)
29 abort ();
30 if (foo (1, 0) != 2)
31 abort ();
32 if (foo (-2, 1) != -2)
33 abort ();
34 if (foo (-1, 1) != 0)
35 abort ();
36 if (foo (0, 1) != 2)
37 abort ();
38 if (foo (1, 1) != 3)
39 abort ();
40 return 0;