<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 - Assertion failure with debuginfos and inlining ('Invalid result number for the given node')"
   href="https://bugs.llvm.org/show_bug.cgi?id=34834">34834</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure with debuginfos and inlining ('Invalid result number for the given node')
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>5.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>DebugInfo
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kinke@gmx.net
          </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=19233" name="attach_19233" title="4 IR files (new/old, with/without inlining).">attachment 19233</a> <a href="attachment.cgi?id=19233&action=edit" title="4 IR files (new/old, with/without inlining).">[details]</a></span>
4 IR files (new/old, with/without inlining).

I'm hitting:

Assertion failed: (!Node || !ResNo || ResNo < Node->getNumValues()) && "Invalid
result number for the given node!", file
C:\LDC\llvm\include\llvm/CodeGen/SelectionDAGNodes.h, line 1038

when compiling a tiny D file with LDC using LLVM 5.0 (tested for Linux and
Windows-MSVC targets). It requires debuginfos output AND enabled inlining (no
other optimizations required). That code used to work; recent LDC has only
minimally changed the IR (in-place construction in one function), and that
seems to trigger it.

The tiny relevant IR diff is here:
<a href="https://github.com/ldc-developers/ldc/pull/2252#issuecomment-333412625">https://github.com/ldc-developers/ldc/pull/2252#issuecomment-333412625</a>

Also happens with LLVM 4.0.1 for Linux targets.</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>