1 /* Verify straight-line strength reduction in using
2    alternative base expr to record and look for the
3    potential candidate.  */
4 
5 /* { dg-do compile } */
6 /* { dg-options "-O2 -fdump-tree-slsr-details" } */
7 
8 typedef int arr_2[50][50];
9 
foo(arr_2 a2,int v1)10 void foo (arr_2 a2, int v1)
11 {
12   int i, j;
13 
14   i = v1 + 5;
15   j = i;
16   a2 [i-10] [j] = 2;
17   a2 [i] [j++] = i;
18   a2 [i+20] [j++] = i;
19   a2 [i-3] [i-1] += 1;
20   return;
21 }
22 
23 /* { dg-final { scan-tree-dump-times "Replacing reference: " 5 "slsr" } } */
24