1 // RUN: %libomptarget-compile-generic
2 // RUN: %libomptarget-run-generic 2>&1 \
3 // RUN: | %fcheck-generic
13 float *A
= (float *)malloc(N
* sizeof(float));
15 #pragma omp target enter data map(to : A[FROM : LENGTH])
17 // A, has been mapped starting at index FROM, but inside the use_device_ptr
18 // clause it is captured by base so the library must look it up using the
22 #pragma omp target data use_device_ptr(A)
24 #pragma omp target exit data map(delete : A[FROM : LENGTH])
27 if (A_dev
== NULL
|| A_dev
== A
)
28 fprintf(stderr
, "Failure\n");
30 fprintf(stderr
, "Success\n");