| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-fdump-tree-gimple" } */ |
| 3 |
|
| 4 |
typedef struct |
| 5 |
{ |
| 6 |
int *arr; |
| 7 |
} L; |
| 8 |
|
| 9 |
int main() |
| 10 |
{ |
| 11 |
L *tmp; |
| 12 |
|
| 13 |
/* There shouldn't be an order dependency here... */ |
| 14 |
|
| 15 |
#pragma omp target map(to: tmp->arr) map(tofrom: tmp->arr[0:10]) |
| 16 |
{ } |
| 17 |
|
| 18 |
#pragma omp target map(tofrom: tmp->arr[0:10]) map(to: tmp->arr) |
| 19 |
{ } |
| 20 |
/* { dg-final { scan-tree-dump-times {map\(struct:\*tmp \[len: 1\]\) map\(alloc:tmp[._0-9]*->arr \[len: [0-9]+\]\) map\(tofrom:\*_[0-9]+ \[len: [0-9]+\]\) map\(attach:tmp[._0-9]*->arr \[bias: 0\]\)} 2 "gimple" { target { ! { nvptx*-*-* amdgcn*-*-* } } } } } */ |
| 21 |
|
| 22 |
return 0; |
| 23 |
} |