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

struct S
{
  int a, b;
};

void foo (struct S *s)
{
  #pragma omp target map (alloc: s->a, s->b)
    ;
  #pragma omp target enter data map (alloc: s->a, s->b)
}

/* { dg-final { scan-tree-dump-times "map\\(struct:\\*s \\\[len: 2\\\]\\) map\\(alloc:s->a \\\[len: \[0-9\]+\\\]\\) map\\(alloc:s->b \\\[len: \[0-9\]+\\\]\\)" 2 "gimple" } } */