brintos

brintos / llvm-project-archived public Read only

0
0
Text · 450 B · 74ebb3e Raw
28 lines · c
1// RUN: %libomptarget-compile-run-and-check-generic2 3#include <omp.h>4#include <stdio.h>5 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 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: PASS28