1 /* { dg-do compile } */ 2 /* { dg-options "-O3 -fdump-tree-ldist-details" } */ 3 4 int x[1000]; 5 foo(int n)6void foo (int n) 7 { 8 int i; 9 10 for (i = 0; i < n; ++i) 11 { 12 x[i] = 0; 13 x[2*i + 1] = 1; 14 } 15 } 16 17 /* We should not apply loop distribution and not generate a memset (0). */ 18 19 /* { dg-final { scan-tree-dump "Loop 1 not distributed" "ldist" } } */ 20 /* { dg-final { scan-tree-dump-times "generated memset zero" 0 "ldist" } } */ 21