1  /* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
       2  /* { dg-options "-O1 -fprefetch-loop-arrays -march=amdfam10 -fdump-tree-aprefetch-blocks" } */
       3  
       4  int a[10000];
       5  
       6  int foo(unsigned n)
       7  {
       8    unsigned i, s = 0;
       9  
      10    for (i = 0; i < n; i++)
      11      s += a[i];
      12  
      13    return s;
      14  }
      15  
      16  /* We used to make the probability that the body of the loop (unrolled
      17     to enable prefetching) is entered 0, which is not correct.  */
      18  
      19  /* { dg-final { scan-tree-dump-not "Invalid sum" "aprefetch"} } */
      20  /* { dg-final { scan-tree-dump-not "SUCC: 7 .100.0%" "aprefetch"} } */