(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.c-c++-common/
target-42.c
       1  /* PR libgomp/100573 */
       2  
       3  int
       4  foo (int a)
       5  {
       6    #pragma omp target firstprivate(a)
       7    if (a == 0)
       8      {
       9        a++;
      10        #pragma omp target map(tofrom:a)		/* { dg-warning "'target' construct inside of 'target' region" } */
      11        a = foo (a);
      12        #pragma omp target data map(tofrom:a)	/* { dg-warning "'target data' construct inside of 'target' region" } */
      13        a++;
      14        #pragma omp target enter data map(to:a)	/* { dg-warning "'target enter data' construct inside of 'target' region" } */
      15        #pragma omp target exit data map(from:a)	/* { dg-warning "'target exit data' construct inside of 'target' region" } */
      16      }
      17    return a + 1;
      18  }
      19  
      20  int
      21  main ()
      22  {
      23    if (foo (1) != 2)
      24      __builtin_abort ();
      25    return 0;
      26  }