aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/target-has-device-addr-2.c
blob: 7378416964cb4a4427fa4c5439208d0ea2c44076 (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_addr(x, y)
    #pragma omp target has_device_addr(x, y)
      {
	x = 42;
      }
}

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