1  /* { dg-additional-options "--param openacc-kernels=decompose" } */
       2  
       3  /* { dg-additional-options "-g" } */
       4  /* { dg-additional-options "-O1" } so that we may get some 'GIMPLE_DEBUG's.  */
       5  
       6  /* { dg-additional-options "-fopt-info-all-omp" } */
       7  
       8  /* { dg-additional-options "--param=openacc-privatization=noisy" }
       9     Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
      10     { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } */
      11  
      12  int arr_0;
      13  
      14  void
      15  foo (void)
      16  {
      17    /* { dg-bogus {sorry, unimplemented: 'gimple_debug' not yet supported} TODO { xfail *-*-* } .+1 } */
      18  #pragma acc kernels /* { dg-line l_compute1 } */
      19    /* { dg-note {OpenACC 'kernels' decomposition: variable 'arr_0' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute1 }
      20       { dg-note {variable 'arr_0' made addressable} {} { target *-*-* } l_compute1 } */
      21    /* { dg-bogus {note: OpenACC 'kernels' decomposition: variable 'k' declared in block requested to be made addressable} {w/ debug} { xfail *-*-* } l_compute1 } */
      22    /* { dg-bogus {note: variable 'k' made addressable} {w/ debug} { xfail *-*-* } l_compute1 } */
      23    /* { dg-note {variable 'arr_0\.0' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { xfail *-*-* } l_compute1 } */
      24    {
      25      /* { dg-bogus {note: beginning 'gang-single' part in OpenACC 'kernels' region} {w/ debug} { xfail c++ } .-1 }
      26         { dg-bogus {note: beginning 'gang-single' part in OpenACC 'kernels' region} {w/ debug} { xfail c } .+1 } */
      27      int k;
      28  
      29      /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } .+1 } */
      30  #pragma acc loop /* { dg-line l_loop_k1 } */
      31      /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { xfail *-*-* } l_loop_k1 } */
      32      /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { xfail *-*-* } l_loop_k1 } */
      33      /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { xfail *-*-* } l_loop_k1 } */
      34      for (k = 0; k < 2; k++)
      35        arr_0 += k;
      36    }
      37  }