<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 - Debug information for OpenMP regions is broken"
   href="https://bugs.llvm.org/show_bug.cgi?id=33676">33676</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Debug information for OpenMP regions is broken
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Clang Compiler Support
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>hahnjo@hahnjo.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=18743" name="attach_18743" title="Simple tasking program">attachment 18743</a> <a href="attachment.cgi?id=18743&action=edit" title="Simple tasking program">[details]</a></span>
Simple tasking program

For the simple attached tasking program, llvm-ir generated with:

clang -fopenmp task.c -S -emit-llvm -g

generates DILocation entries for the outlined OpenMP regions, that refer to
line 0. As a result, tools like addr2line and gdb fail to resolve the source
line for the OpenMP regions.

For the attached code compiled with Clang 4.0.1, gdb can set a breakpoint in
the task region, but then fails to resolve the source line:

$ clang -fopenmp task.c -g
$ gdb ./a.out
(gdb) b 13
(gdb) r
Breakpoint 1, 0x0000000000400a5d in .omp_task_entry. ()
(gdb) s
Single stepping until exit from function .omp_task_entry.,
which has no line number information.

With current trunk, it can't even stop at line 13. Instead, the breakpoint is
hit right after the task construct.

Report by Joachim Protze.</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>