<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Link error on null result from getScope"
   href="https://llvm.org/bugs/show_bug.cgi?id=26534">26534</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Link error on null result from getScope
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>llvm-link
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alonzakai@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On line 1238 of IRMover.cpp,

 if (auto *SP = getDISubprogram(dyn_cast<MDNode>(IE->getScope())))

I have seen a testcase where the dyn_cast fails as it receives a null pointer.
I don't understand this code enough to know if the fix is dyn_cast_or_null or
not.

I'm afraid the testcase I have is rather large. It's in the files provided in
this bugreport,

<a href="https://github.com/kripken/emscripten/issues/4078#issuecomment-180755159">https://github.com/kripken/emscripten/issues/4078#issuecomment-180755159</a>

And the steps to reproduce are to run

llvm-link libvsomeip.so -o linked.so

Stripping debug info and then linking avoids the problem, further confirming
it's a debuginfo issue.</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>