| 1 |
/* Test valid usages of the if_present clause. */ |
| 2 |
|
| 3 |
/* { dg-additional-options "-fdump-tree-omplower" } */ |
| 4 |
|
| 5 |
void |
| 6 |
t () |
| 7 |
{ |
| 8 |
int a, b, c[10]; |
| 9 |
|
| 10 |
#pragma acc update self(a) if_present |
| 11 |
#pragma acc update device(b) async if_present |
| 12 |
#pragma acc update host(c[1:3]) wait(4) if_present |
| 13 |
#pragma acc update self(c) device(b) host (a) async(10) if (a == 5) if_present |
| 14 |
|
| 15 |
#pragma acc update self(a) |
| 16 |
#pragma acc update device(b) async |
| 17 |
#pragma acc update host(c[1:3]) wait(4) |
| 18 |
#pragma acc update self(c) device(b) host (a) async(10) if (a == 5) |
| 19 |
} |
| 20 |
|
| 21 |
/* { dg-final { scan-tree-dump-times "omp target oacc_update if_present map.from:a .len: 4.." 1 "omplower" } } */ |
| 22 |
/* { dg-final { scan-tree-dump-times "omp target oacc_update if_present async.-1. map.to:b .len: 4.." 1 "omplower" } } */ |
| 23 |
/* { dg-final { scan-tree-dump-times "omp target oacc_update if_present wait.4. map.from:c.1. .len: 12.." 1 "omplower" } } */ |
| 24 |
/* { dg-final { scan-tree-dump-times "omp target oacc_update if_present if.... async.10. map.from:a .len: 4.. map.to:b .len: 4.. map.from:c .len: 40.." 1 "omplower" } } */ |
| 25 |
/* { dg-final { scan-tree-dump-times "omp target oacc_update map.force_from:a .len: 4.." 1 "omplower" } } */ |
| 26 |
/* { dg-final { scan-tree-dump-times "omp target oacc_update async.-1. map.force_to:b .len: 4.." 1 "omplower" } } */ |
| 27 |
/* { dg-final { scan-tree-dump-times "omp target oacc_update wait.4. map.force_from:c.1. .len: 12.." 1 "omplower" } } */ |
| 28 |
/* { dg-final { scan-tree-dump-times "omp target oacc_update if.... async.10. map.force_from:a .len: 4.. map.force_to:b .len: 4.. map.force_from:c .len: 40.." 1 "omplower" } } */ |