[llvm-bugs] [Bug 27044] New: Corner case with linkonce and comdat still broken
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 23 17:19:34 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27044
Bug ID: 27044
Summary: Corner case with linkonce and comdat still broken
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Linker
Assignee: unassignedbugs at nondot.org
Reporter: rafael.espindola at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Running llvm-link with
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define i32 @f1() {
ret i32 0
}
and
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
$foo = comdat any
define linkonce_odr i32 @f1() comdat($foo) {
ret i32 1
}
define void @f2() comdat($foo) {
ret void
}
produces
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
$foo = comdat any
define void @f2() comdat($foo) {
ret void
}
define linkonce_odr i32 @f1() comdat($foo) {
ret i32 1
}
Which has the incorrect @f1.
The ELF lld gets this right:
ld.lld -m elf_x86_64 -shared a.bc b.bc -o t.so -save-temps
produces
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
$foo = comdat any
define i32 @f1() {
ret i32 0
}
define void @f2() comdat($foo) {
ret void
}
--
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/20160324/305146cf/attachment.html>
More information about the llvm-bugs
mailing list