Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr49039.c
blob4bc0a8175a0f7f18e07ffaf5d8239e56c111382e
1 /* PR tree-optimization/49039 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1" } */
5 extern void bar (void);
7 void
8 foo (unsigned int x, unsigned int y)
10 unsigned int minv, maxv;
11 if (x >= 3 && x <= 6)
12 return;
13 if (y >= 5 && y <= 8)
14 return;
15 minv = x < y ? x : y;
16 maxv = x > y ? x : y;
17 if (minv == 5)
18 bar ();
19 if (minv == 6)
20 bar ();
21 if (maxv == 5)
22 bar ();
23 if (maxv == 6)
24 bar ();
27 /* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 5 to 0" "vrp1" } } */
28 /* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 6 to 0" "vrp1" } } */
29 /* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 5 to 0" "vrp1" } } */
30 /* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 6 to 0" "vrp1" } } */