<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 - ThinLTO importing function with inline ASM can't lead to duplicate symbols"
   href="https://bugs.llvm.org/show_bug.cgi?id=33812">33812</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ThinLTO importing function with inline ASM can't lead to duplicate symbols
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>joker.eph@gmail.com
          </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=18803" name="attach_18803" title="File with inline asm">attachment 18803</a> <a href="attachment.cgi?id=18803&action=edit" title="File with inline asm">[details]</a></span>
File with inline asm

For example the two attached files illustrate the issue. The inline ASM is
declaring a global symbol and after importing and inlining we end up with the
symbol redeclared. On Mac I see:

$ clang test_caller.cpp  test_asm.ll  -flto=thin
duplicate symbol __dtrace_probe in:
    /var/folders/yy/prvy9rf51xvbr26mdg9x00q1vtv3gs/T/cc-892b93.o/0.thinlto.o
    /var/folders/yy/prvy9rf51xvbr26mdg9x00q1vtv3gs/T/cc-892b93.o/1.thinlto.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)



Conservatively: we could disable the importing for functions that contains
inline ASM.</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>