1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ivopts-details" } */
3 
4 int *a;
5 
6 int
foo(unsigned char s,unsigned char l)7 foo (unsigned char s, unsigned char l)
8 {
9   unsigned char i;
10   int sum = 0;
11 
12   for (i = s; i < l; i += 1)
13     {
14       sum += a[i];
15     }
16 
17   return sum;
18 }
19 
20 /* Address of array reference is scev.  */
21 /* { dg-final { scan-tree-dump-times "  Type:\\tREFERENCE ADDRESS\n  Use \[0-9\].\[0-9\]:" 1 "ivopts" } } */
22 
23