Bump version to 19.1.0-rc3
[llvm-project.git] / offload / test / mapping / target_wrong_use_device_addr.c
blob7a5babd692530bcc431a2ca98e3755f70d9a498d
1 // RUN: %libomptarget-compile-generic -fopenmp-version=51 -g
2 // RUN: env LIBOMPTARGET_INFO=64 %libomptarget-run-fail-generic 2>&1 \
3 // RUN: | %fcheck-generic
5 // FIXME: Fails due to optimized debugging in 'ptxas'
6 // UNSUPPORTED: nvptx64-nvidia-cuda-LTO
8 #include <stdio.h>
10 int main() {
11 float arr[10];
12 float *x = &arr[0];
14 // CHECK: host addr=0x[[#%x,HOST_ADDR:]]
15 fprintf(stderr, "host addr=%p\n", x);
17 #pragma omp target data map(to : x [0:10])
19 // CHECK: omptarget device 0 info: variable x does not have a valid device
20 // counterpart
21 #pragma omp target data use_device_addr(x)
23 // CHECK-NOT: device addr=0x[[#%x,HOST_ADDR:]]
24 fprintf(stderr, "device addr=%p\n", x);
28 return 0;