<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [libomptarget] omp_target_associate_ptr"
   href="https://bugs.llvm.org/show_bug.cgi?id=49608">49608</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[libomptarget] omp_target_associate_ptr
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Runtime Library
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>protze@itc.rwth-aachen.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24651" name="attach_24651" title="reproducer">attachment 24651</a> <a href="attachment.cgi?id=24651&action=edit" title="reproducer">[details]</a></span>
reproducer

According to OpenMP Examples discussion, attached code should work, but results
in runtime error:

Libomptarget message: explicit extension not allowed: host address specified is
0x00007ffdec715438 (400 bytes), but device allocation maps to host at
0x00007ffdec715438 (200 bytes)
Libomptarget error: Call to getOrAllocTgtPtr returned null pointer (device
failure or illegal mapping).
Libomptarget error: Call to targetDataBegin failed, abort target.
Libomptarget error: Failed to process data before launching the kernel.
Libomptarget error: Run with LIBOMPTARGET_DEBUG=4 to dump host-target pointer
mappings.
Libomptarget error: Source location information not present. Compile with -g or
-gline-tables-only.
Libomptarget fatal error 1: failure of target construct while offloading is
mandatory</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>