<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:xw111luoye@gmail.com" title="Ye Luo <xw111luoye@gmail.com>"> <span class="fn">Ye Luo</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - declare target pointer cannot be accessed in target region"
   href="https://bugs.llvm.org/show_bug.cgi?id=46012">bug 46012</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>CONFIRMED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - declare target pointer cannot be accessed in target region"
   href="https://bugs.llvm.org/show_bug.cgi?id=46012#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - declare target pointer cannot be accessed in target region"
   href="https://bugs.llvm.org/show_bug.cgi?id=46012">bug 46012</a>
              from <span class="vcard"><a class="email" href="mailto:xw111luoye@gmail.com" title="Ye Luo <xw111luoye@gmail.com>"> <span class="fn">Ye Luo</span></a>
</span></b>
        <pre>git clone <a href="https://github.com/ye-luo/miniqmc.git">https://github.com/ye-luo/miniqmc.git</a>
cd miniqmc/build
cmake -DCMAKE_CXX_COMPILER=clang++ -DENABLE_OFFLOAD=1 -DUSE_OBJECT_TARGET=ON ..

make -j15 check_spo

OMP_NUM_THREADS=1 ./bin/check_spo -n 1
Libomptarget fatal error 1: failure of target construct while offloading is
mandatory
Aborted (core dumped)

Libomptarget --> Entering data end region with 2 mappings
Libomptarget --> Entry  0: Base=0x0000000001465320, Begin=0x00007fff690b0710,
Size=8, Type=0x28
Libomptarget --> Entry  1: Base=0x00007fff690b0710, Begin=0x0000000001465320,
Size=15360, Type=0x18
Libomptarget --> Looking up mapping(HstPtrBegin=0x0000000001465320,
Size=15360)...
Libomptarget --> Mapping exists with HstPtrBegin=0x0000000001465320,
TgtPtrBegin=0x00007f793fe04e00, Size=15360, updated RefCount=1
Libomptarget --> There are 15360 bytes allocated at target address
0x00007f793fe04e00 - is last
Libomptarget --> Looking up mapping(HstPtrBegin=0x0000000001465320,
Size=15360)...
Libomptarget --> Deleting tgt data 0x00007f793fe04e00 of size 15360
Libomptarget --> Removing (forced) mapping with HstPtrBegin=0x0000000001465320,
TgtPtrBegin=0x00007f793fe04e00, Size=15360
Libomptarget --> Looking up mapping(HstPtrBegin=0x00007fff690b0710, Size=8)...
Libomptarget --> Mapping does not exist (ignored)
Libomptarget --> Looking up mapping(HstPtrBegin=0x00007fff690b0710, Size=8)...
Libomptarget --> Section to delete (hst addr 0x00007fff690b0710) does not exist
in the allocated memory
Libomptarget --> Deallocating data from device failed.

Entry 0 and 1 have Base and Begin interchanged. It looks suspicious.
The fix also make almost all the 1 mapping to 2 mappings.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>