1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1" } */
3
4
5 void
foo(distance,i,j)6 foo (distance, i, j)
7 int distance[13][13];
8 int i, j;
9 {
10 if (distance[i][j] < 0)
11 distance[i][0] = ((distance[i][j]) < 0 ? -(distance[i][j]) : (distance[i][j]));
12 }
13
14 void
foo2(distance,i,j)15 foo2 (distance, i, j)
16 int distance[13][13];
17 int i, j;
18 {
19 if (distance[i][j] <= 0)
20 distance[i][0] = ((distance[i][j]) < 0 ? -(distance[i][j]) : (distance[i][j]));
21 }
22
23 void
foo3(distance,i,j)24 foo3 (distance, i, j)
25 int distance[13][13];
26 int i, j;
27 {
28 if (distance[i][j] > 0)
29 distance[i][0] = ((distance[i][j]) < 0 ? -(distance[i][j]) : (distance[i][j]));
30 }
31
32 void
foo4(distance,i,j)33 foo4 (distance, i, j)
34 double distance[13][13];
35 int i, j;
36 {
37 if (distance[i][j] >= 0)
38 distance[i][0] = ((distance[i][j]) < 0 ? -(distance[i][j]) : (distance[i][j]));
39 }
40
41 /* There should be no ABS_EXPR. */
42 /* { dg-final { scan-tree-dump-times "ABS_EXPR " 0 "vrp1"} } */
43