(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.c/
examples-4/
array_sections-4.c
       1  /* { dg-do run } */
       2  
       3  #include <stdlib.h>
       4  
       5  void foo ()
       6  {
       7    int A[30], *p;
       8    #pragma omp target data map(A[0:10])
       9      {
      10        p = &A[0];
      11        #pragma omp target map(p[3:7]) map(A[0:10])
      12  	{
      13  	  A[2] = 777;
      14  	  A[8] = 777;
      15  	  p[8] = 999;
      16  	}
      17      }
      18  
      19    if (A[2] != 777 || A[8] != 999)
      20      abort ();
      21  }
      22  
      23  int main ()
      24  {
      25    foo ();
      26    return 0;
      27  }