| 1 | // RUN: %libomptarget-compile-run-and-check-generic |
|---|---|
| 2 | |
| 3 | #include <omp.h> |
| 4 | #include <stdio.h> |
| 5 | |
| 6 | static 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 | |
| 11 | int 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(format: "FAIL\n"); |
| 20 | } else { |
| 21 | printf(format: "PASS\n"); |
| 22 | } |
| 23 | |
| 24 | return failed; |
| 25 | } |
| 26 | |
| 27 | // CHECK: PASS |
| 28 |
