1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ivopts-details" } */
3 
4 int *a;
5 
6 int
foo(signed char s)7 foo (signed char s)
8 {
9   signed char i;
10   int sum = 0;
11 
12   for (i = s; i > 0; i--)
13     {
14       sum += a[i];
15     }
16 
17   return sum;
18 }
19 
20 /* Check loop niter bound information.  */
21 /* { dg-final { scan-tree-dump "bounded by 126" "ivopts" } } */
22 /* { dg-final { scan-tree-dump-not "bounded by 127" "ivopts" } } */
23 /* { dg-final { scan-tree-dump-not "zero if " "ivopts" } } */
24