1  /* { dg-additional-options "-O2" } */
       2  /* { dg-additional-options "-fdump-tree-dom3" } */
       3  
       4  #include <stdlib.h>
       5  
       6  #define N (1024 * 512)
       7  #define COUNTERTYPE unsigned int
       8  
       9  COUNTERTYPE
      10  foo (unsigned int *c)
      11  {
      12    COUNTERTYPE ii;
      13  
      14  #pragma acc kernels copyout (c[0:N])
      15    {
      16      for (ii = 0; ii < N; ii++)
      17        c[ii] = 1;
      18    }
      19  
      20    return ii;
      21  }
      22  
      23  /* We're expecting:
      24  
      25     .omp_data_i_10 = &.omp_data_arr.3;
      26     _11 = .omp_data_i_10->ii;
      27     *_11 = 0;
      28     _15 = .omp_data_i_10->c;
      29     c.1_16 = *_15;
      30  
      31     Check that there's only one load from anonymous ssa-name (which we assume to
      32     be the one to read c), and that there's no such load for ii.  */
      33  
      34  /* { dg-final { scan-tree-dump-times "(?n)\\*_\[0-9\]\[0-9\]*;$" 1 "dom3" } } */