<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 - No debuginfo location for second basic block in the same line"
   href="https://bugs.llvm.org/show_bug.cgi?id=32123">32123</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>No debuginfo location for second basic block in the same line
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.9
          </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>DebugInfo
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>arielb1@mail.tau.ac.il
          </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=18046" name="attach_18046" title="IR with bad codegen">attachment 18046</a> <a href="attachment.cgi?id=18046&action=edit" title="IR with bad codegen">[details]</a></span>
IR with bad codegen

When there are 2 consecutive basic blocks (even if they don't branch to one
another at all) on the same DI code line, no .loc debuginfo is emitted on the
second basic block, so breakpoints into it get missed and step-over jumps over
it

## Meta
$ dpkg -S `which llc-3.9`
llvm-3.9: /usr/bin/llc-3.9
$ dpkg-query -W -f='${Version}\n' llvm-3.9
1:3.9.1-4

## STR & actual result

$ llc-3.9 di.ll -relocation-model=pic
$ gcc di.s
$ gdb ./a.out
...
(gdb) b di.rs:3
Breakpoint 1 at 0x677: file /cache/di.rs, line 3.
(gdb) r
Starting program: /cache/a.out 
[Inferior 1 (process 16580) exited with code 0160]
(gdb) q
; How was my breakpoint skipped?

## Expected Result

Both calls to `bar` are in line 3, and the second call is run, so the
breakpoint should get hit (equivalently, stepping through using `next` should
go through lines 2->3->4).</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>