http://llvm.org/bugs/show_bug.cgi?id=21288
Bug ID: 21288
Summary: mis-compile of TLS+alias (extracted from glibc's
errno.c)
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
test case (extracted from glibc's csu/errno.c):
__thread int TL_WITH_ALIAS;
extern __thread int __libc_errno __attribute__ ((alias ("TL_WITH_ALIAS")));
gcc produces tbss.
clang produces bss. (tested with clang r219701 on x86_64 linux)
Chandler says to show this to David Majnemer
% for c in gcc clang; do $c -S p.c -o -; echo =======================; done
.file "p.c"
.globl TL_WITH_ALIAS
.section .tbss,"awT",@nobits
.align 4
.type TL_WITH_ALIAS, @object
.size TL_WITH_ALIAS, 4
TL_WITH_ALIAS:
.zero 4
.globl __libc_errno
.set __libc_errno,TL_WITH_ALIAS
.ident "GCC: (Ubuntu 4.8.2-19ubuntu1) 4.8.2"
.section .note.GNU-stack,"",@progbits
=======================
.text
.file "p.c"
.type TL_WITH_ALIAS,@object # @TL_WITH_ALIAS
.bss
.globl TL_WITH_ALIAS
.align 4
TL_WITH_ALIAS:
.long 0 # 0x0
.size TL_WITH_ALIAS, 4
.globl __libc_errno
__libc_errno = TL_WITH_ALIAS
.ident "clang version 3.6.0 (219701)"
.section ".note.GNU-stack","",@progbits
=======================
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs