Skip to content

start of array is mapped regardless of explicit map clause #54899

Closed
@jdenny-ornl

Description

@jdenny-ornl

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions