<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 --- - linker command failed while compilation using rtti"
   href="http://llvm.org/bugs/show_bug.cgi?id=16127">16127</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>linker command failed while compilation using rtti
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>C++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alexey.frolov@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, 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=10572" name="attach_10572" title="test source file">attachment 10572</a> <a href="attachment.cgi?id=10572&action=edit" title="test source file">[details]</a></span>
test source file

OS:            Mac OS X 10.8.2.
Architecture:  x86_64.
Xcode:         Xcode 4.6, Build version 4H127.
Clang version:
    Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
    Target: x86_64-apple-darwin12.2.0
    Thread model: posix

The compilation of simple source file using rtti fails in a following way:
  $ clang++ -c -O0 -std=c++0x test.cpp
  $ clang++ -o test.exe -O0 -std=c++0x test.o
  >Undefined symbols for architecture x86_64:
  >  "typeinfo for A", referenced from:
  >      f() in test.o
  >      typeinfo for B in test.o
  >ld: symbol(s) not found for architecture x86_64
  >clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
  $

The test complies with no error when using -fno-rtti option:
  $ clang++ -c -O0 -std=c++0x -fno-rtti test.cpp
  $ clang++ -o test.exe -O0 -std=c++0x -fno-rtti test.o
  $

Please, see the sourse file and generated llvm code in the attached files.</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>