aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-2.c
blob: df743dda16631693515e4fd5e0841957dcc27a87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */

void
foo ()
{
  int *x, *y;

  #pragma omp target data map(x, y) use_device_ptr(x, y)
    #pragma omp target is_device_ptr(x, y)
      {
	*x = 42;
      }
}

/* { dg-final { scan-tree-dump "is_device_ptr\\(x\\)"  "gimple" } } */
/* { dg-final { scan-tree-dump-not "is_device_ptr\\(y\\)"  "gimple" } } */