1 // RUN: %libomptarget-compile-run-and-check-generic 2 3 #include <omp.h> 4 #include <stdio.h> 5 test_omp_get_num_devices_with_empty_target()6static int test_omp_get_num_devices_with_empty_target() { 7 /* checks that omp_get_num_devices() > 0 */ 8 return omp_get_num_devices() > 0; 9 } 10 main()11int main() { 12 int failed = 0; 13 14 if (!test_omp_get_num_devices_with_empty_target()) { 15 ++failed; 16 } 17 18 if (failed) { 19 printf("FAIL\n"); 20 } else { 21 printf("PASS\n"); 22 } 23 24 return failed; 25 } 26 27 // CHECK: PASS 28