[llvm-bugs] [Bug 46170] New: OpenMP offload incorrect map of class member array

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 2 00:19:41 PDT 2020


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

            Bug ID: 46170
           Summary: OpenMP offload incorrect map of class member array
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: xw111luoye at gmail.com
                CC: llvm-bugs at lists.llvm.org

https://github.com/ye-luo/openmp-target/blob/master/hands-on/tests/map/map_class_member.cpp

$ clang++ -fopenmp -fopenmp-targets=nvptx64 -fopenmp-version=50
map_class_member.cpp
$ LIBOMPTARGET_DEBUG=1 ./a.out
...
Libomptarget --> Entry  0: Base=0x00007ffc49d17ad8, Begin=0x00007ffc49d17ad8,
Size=4, Type=0x20
Libomptarget --> Entry  1: Base=0x00007ffc49d17ad8, Begin=0x00007ffc49d17ad8,
Size=24, Type=0x1000000000000
Libomptarget --> Looking up mapping(HstPtrBegin=0x00007ffc49d17ad8, Size=4)...
Libomptarget --> Creating new map entry: HstBase=0x00007ffc49d17ad8,
HstBegin=0x00007ffc49d17ad8, HstEnd=0x00007ffc49d17adc,
TgtBegin=0x00007f25f3a00000
Libomptarget --> There are 4 bytes allocated at target address
0x00007f25f3a00000 - is new
Libomptarget --> Looking up mapping(HstPtrBegin=0x00007ffc49d17ad8, Size=24)...
Libomptarget --> WARNING: Pointer is already mapped but section extends beyond
mapped region
Libomptarget --> Explicit extension of mapping is not allowed.
Libomptarget --> Call to getOrAllocTgtPtr returned null pointer (device failure
or illegal mapping).
Libomptarget fatal error 1: failure of target construct while offloading is
mandatory
...

Not fully sure if the code is 5.0 compliant. But it works with XL but not Clang

-- 
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/20200602/e832e491/attachment-0001.html>


More information about the llvm-bugs mailing list