1 /* PR tree-optimization/59643 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -fdump-tree-pcom-details" } */
4 
5 void
foo(double * a,double * b,double * c,double d,double e,int n)6 foo (double *a, double *b, double *c, double d, double e, int n)
7 {
8   int i;
9   for (i = 1; i < n - 1; i++)
10     a[i] = d * (b[i] + c[i] + a[i - 1] + a[i + 1]) + e * a[i];
11 }
12 
13 /* { dg-final { scan-tree-dump-times "Before commoning:" 1 "pcom" } } */
14 /* { dg-final { scan-tree-dump-times "Unrolling 2 times" 1 "pcom" } } */
15