<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 --- - Sanitizer link error looking for typeinfo"
   href="http://llvm.org/bugs/show_bug.cgi?id=21359">21359</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Sanitizer link error looking for typeinfo
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>phantall+llvm@gmail.com
          </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>Created <span class=""><a href="attachment.cgi?id=13243" name="attach_13243" title="A class with virtual functions with no definition">attachment 13243</a> <a href="attachment.cgi?id=13243&action=edit" title="A class with virtual functions with no definition">[details]</a></span>
A class with virtual functions with no definition

clang 3.4 / 3.5, gcc 4.7 / 4.9, and sun studio (12.3 & 12.4) compile and link
the example fine; this is only an issue when using sanitizers.  When built with
-fsanitize=undefined using gcc 4.9.0, it also compiles/links fine.

When the 'virtual' keyword is removed from the example code it fails to link
with or without the sanitizer.

The error received:

/tmp/main-c376a0.o:(.data+0x48): undefined reference to 'typeinfo for Blah'
clang: error: linker command failed with exit code 1 (use -v to see invocation)</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>