Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-26.c
blob13de68cd48bec824e99aff54a052d37a842791bf
1 /* PR 30730, PR 26900, number of iterations analysis should be able to
2 determine number of iterations of the following loops unconditionally. */
4 /* { dg-do compile } */
5 /* { dg-options "-O2 -fstrict-overflow -fdump-tree-optimized-blocks" } */
7 unsigned foo(unsigned int n)
9 unsigned x = 0;;
11 while (n > 10)
13 n -= 2;
14 x++;
17 return x;
20 int foo0(int i0, int i1)
22 int i, j = 0;
23 for (i=i0; i<=i1+1; ++i)
24 ++j;
25 return j;
28 /* { dg-final { scan-tree-dump-times "if" 2 "optimized" } } */