[llvm-bugs] [Bug 33812] New: ThinLTO importing function with inline ASM can't lead to duplicate symbols

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jul 16 22:11:29 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33812

            Bug ID: 33812
           Summary: ThinLTO importing function with inline ASM can't lead
                    to duplicate symbols
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: joker.eph at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18803
  --> https://bugs.llvm.org/attachment.cgi?id=18803&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170717/d215655a/attachment.html>


More information about the llvm-bugs mailing list