Closed
Description
I'm seeing unexpected behavior starting at @ye-luo's recent c1a6fe1 (D123093): the start of an array is mapped regardless of its explicit map clause. I can still reproduce at today's 82e5976. I've tested while offloading to nvptx64.
For example, the following prints 1, but it used to print 0 before c1a6fe1:
#include <omp.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int arr[1000];
#pragma omp target data map(tofrom:arr[998:1])
{
printf("%d\n", omp_target_is_present(arr, omp_get_default_device()));
}
return 0;
}