PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-17.c
blob588cf4c8f23648b42f7cd891cc7bb963cbbc38a2
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-sccp-details" } */
4 /* To determine the number of iterations in this loop we need to fold
5 p_4 + 4B > p_4 + 8B to false. This transformation has caused
6 troubles in the past due to overflow issues. */
8 int foo (int *p)
10 int i = 0, *x;
12 for (x = p; x < p + 2; x++)
13 i++;
15 return i;
18 /* { dg-final { scan-tree-dump "# of iterations 1, bounded by 1" "sccp" } } */