<html>
    <head>
      <base href="http://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 --- - bugpoint does not respect the "Alias must point to a definition" rule"
   href="http://llvm.org/bugs/show_bug.cgi?id=20788">20788</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>bugpoint does not respect the "Alias must point to a definition" rule
          </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>bugpoint
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>hfinkel@anl.gov
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>bugpoint does not correctly handle aliases; specifically, when it removes
definitions from a module, it leaves aliases pointing to the, now external,
reference. This causes additional failures in the verifier here:
  Assert1(!GV->isDeclaration(), "Alias must point to a definition", &GA);

This seems to happen from code (I think):
$ grep -r 'setInitializer(nullptr)' tools/bugpoint
tools/bugpoint/CrashDebugger.cpp:      I->setInitializer(nullptr);
tools/bugpoint/CrashDebugger.cpp:        I->setInitializer(nullptr);
tools/bugpoint/ExtractFunction.cpp:      I->setInitializer(nullptr);  // Delete
the initializer to make it external
tools/bugpoint/ExtractFunction.cpp:      GV->setInitializer(nullptr);

I'm not sure exactly what the correct fix is.</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>