[llvm-bugs] [Bug 45212] New: Regression: Accessing object in target region: "expected expression containing only member accesses and/or array sections based on named variables"

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 15 11:38:22 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45212

            Bug ID: 45212
           Summary: Regression: Accessing object in target region:
                    "expected expression containing only member accesses
                    and/or array sections based on named variables"
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: csdaley at lbl.gov
                CC: llvm-bugs at lists.llvm.org

Created attachment 23233
  --> https://bugs.llvm.org/attachment.cgi?id=23233&action=edit
Reproducer for compiler error

The attached test program no longer compiles with the LLVM/Clang compiler when
using the -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda compiler options. The
compiler error message is "error: expected expression containing only member
accesses and/or array sections based on named variables".

The test program maps a custom array object to the device. The data inside the
array object is accessed via an overloaded () operator. The key code from the
test program is shown below.

#pragma omp target enter data map(to:pos)
#pragma omp target enter data map(to:pos.dptr[0:pos.size])
#pragma omp target teams distribute parallel for
  for(int i=0; i<100; i++) {
    pos(i).x = i;
    pos(i).y = i+1;
  }

This seems to be a very recent regression. The test program compiles and runs
correctly when using a commit from Feb 19 and fails when using a commit from
Mar 13.

Feb 19 - commit 63cef621f954eb87c494021725f4eeac89132d16: SUCCESS
Mar 13 - commit 20e36f31dfc1bb079dc6e6db5f692a4e90aa0c9d: FAIL

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200315/e26bfba1/attachment.html>


More information about the llvm-bugs mailing list