gcc/testsuite/gcc.dg/gomp/target-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fopenmp -fdump-tree-gimple" } */ |
| 3 | |
| 4 | struct S |
| 5 | { |
| 6 | int a, b; |
| 7 | }; |
| 8 | |
| 9 | void foo (struct S *s) |
| 10 | { |
| 11 | #pragma omp target map (alloc: s->a, s->b) |
| 12 | ; |
| 13 | #pragma omp target enter data map (alloc: s->a, s->b) |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-tree-dump-times "map\\(struct:\\*s \\\[len: 2\\\]\\) map\\(alloc:s\[\\._0-9\]+->a \\\[len: \[0-9\]+\\\]\\) map\\(alloc:s\[\\._0-9\]+->b \\\[len: \[0-9\]+\\\]\\)" 2 "gimple" } } */ |