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: unassignedclangb...@nondot.org
          Reporter: xw111lu...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to