| 1 |
/* Check OMP_TARGET_OFFLOAD on systems with no available non-host devices, |
| 2 |
which is enforced by using -foffload=disable. */ |
| 3 |
|
| 4 |
/* { dg-do run } */ |
| 5 |
/* { dg-additional-options "-foffload=disable" } */ |
| 6 |
/* { dg-set-target-env-var OMP_TARGET_OFFLOAD "mandatory" } */ |
| 7 |
/* { dg-set-target-env-var OMP_DISPLAY_ENV "true" } */ |
| 8 |
|
| 9 |
/* See comment in target-50.c/target-50.c for why default-device-var can be '0'. */ |
| 10 |
|
| 11 |
/* { dg-output ".*OMP_DEFAULT_DEVICE = '-4'.*OMP_TARGET_OFFLOAD = 'MANDATORY'.*" { target { ! offload_device } } } */ |
| 12 |
/* { dg-output ".*OMP_DEFAULT_DEVICE = '0'.*OMP_TARGET_OFFLOAD = 'MANDATORY'.*" { target offload_device } } */ |
| 13 |
|
| 14 |
int |
| 15 |
main () |
| 16 |
{ |
| 17 |
return 0; |
| 18 |
} |