diff options
Diffstat (limited to 'libgomp/testsuite/lib/libgomp.exp')
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 094e5ed1b0c..071e22fbf30 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -239,3 +239,17 @@ proc libgomp_option_proc { option } { return 0 } } + +# Return 1 if offload device is available. +proc check_effective_target_offload_device { } { + return [check_runtime_nocache offload_device_available_ { + #include <omp.h> + int main () + { + int a; + #pragma omp target map(from: a) + a = omp_is_initial_device (); + return a; + } + } ] +} |