Bump version to 19.1.0-rc3
[llvm-project.git] / offload / test / offloading / cuda_no_devices.c
blobbbcbf6b9f07e2b1b26f79a16ed38f4e2290f3ea9
1 // The CUDA plugin used to complain on stderr when no CUDA devices were enabled,
2 // and then it let the application run anyway. Check that there's no such
3 // complaint anymore, especially when the user isn't targeting CUDA.
5 // RUN: %libomptarget-compile-generic
6 // RUN: env CUDA_VISIBLE_DEVICES= \
7 // RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic
9 #include <stdio.h>
11 // CHECK-NOT: {{.}}
12 // CHECK: Hello World: 4
13 // CHECK-NOT: {{.}}
14 int main() {
15 int x = 0;
16 #pragma omp target teams num_teams(2) reduction(+ : x)
17 x += 2;
18 printf("Hello World: %d\n", x);
19 return 0;