| 1 |
/* Test 'if' and 'self' clause appearing together. */ |
| 2 |
|
| 3 |
#include <openacc.h> |
| 4 |
|
| 5 |
static int test(float i, long double s) |
| 6 |
{ |
| 7 |
int ret; |
| 8 |
#pragma acc serial copyout(ret) if(i) self(s) |
| 9 |
/* { dg-bogus {using 'vector_length \(32\)', ignoring 1} {} { xfail openacc_nvidia_accel_selected } .-1 } */ |
| 10 |
{ |
| 11 |
ret = acc_on_device(acc_device_host); |
| 12 |
} |
| 13 |
return ret; |
| 14 |
} |
| 15 |
|
| 16 |
int main() |
| 17 |
{ |
| 18 |
if (!test(0, 0)) |
| 19 |
__builtin_abort(); |
| 20 |
|
| 21 |
if (!test(0, 1)) |
| 22 |
__builtin_abort(); |
| 23 |
|
| 24 |
#if ACC_MEM_SHARED |
| 25 |
if (!test(1, 0)) |
| 26 |
__builtin_abort(); |
| 27 |
#else |
| 28 |
if (test(1, 0)) |
| 29 |
__builtin_abort(); |
| 30 |
#endif |
| 31 |
|
| 32 |
if (!test(1, 1)) |
| 33 |
__builtin_abort(); |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |