aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c-c++-common/unary-ptr-1.c
blob: 3623b2695763830803090a2a247034428ec78240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <assert.h>

int main (int argc, char *argv[])
{
  int y = 0;
  int *x = &y;

#pragma omp target map(*x)
  {
    (*x)++;
  }

  assert (y == 1);

  return 0;
}