Debian Codegraph @

gcc/testsuite/c-c++-common/gomp/clauses-3.c

raw
1 struct T { int a; int *b; };
2 struct S { int *s; char u; struct T v; long x; };
3
4 void bar (int *);
5 #pragma omp declare target to (bar)
6 void baz (int *);
7 #pragma omp declare target enter (baz)
8
9 int
10 main ()
11 {
12 int a[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
13 struct S s = { a, 5, { 6, a + 5 }, 99L };
14 #pragma omp target map (s.v.a, s.u, s.x)
15 ;
16 #pragma omp target map (s.v.a, s.u, s.x)
17 bar (&s.v.a);
18 #pragma omp target map (s.v.a) map (always, to: s.u) map (s.x)
19 ;
20 #pragma omp target map (s.s[0]) map (s.v.b[:3])
21 ;
22 #pragma omp target map (s.s[0]) map (s.v.b[:3])
23 baz (s.s);
24 return 0;
25 }