[llvm-bugs] [Bug 25791] New: Linker can assign wrong linkage to available_externally functions

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Dec 9 13:57:03 PST 2015


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

            Bug ID: 25791
           Summary: Linker can assign wrong linkage to
                    available_externally functions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Linker
          Assignee: unassignedbugs at nondot.org
          Reporter: peter at pcc.me.uk
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

$ cat ae1.ll
declare void @f()

define weak_odr void ()* @main() {
  ret void ()* @f
}
$ cat ae2.ll
@h = weak_odr global void ()* @f

define available_externally void @f() {
  ret void
}

define weak_odr void ()* @main() {
  ret void ()* @f
}
$ ~/src/llvm-build-rel/bin/llvm-link -o aeae.bc ae1.ll ae2.ll 
$ ~/src/llvm-build-rel/bin/llvm-dis -o - aeae.bc 
; ModuleID = 'aeae.bc'

@h = weak_odr global void ()* @f

define void @f() {
  ret void
}

define weak_odr void ()* @main() {
  ret void ()* @f
}

-- 
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/20151209/b3faf17e/attachment.html>


More information about the llvm-bugs mailing list