[LLVMbugs] [Bug 16241] New: LTO link with thread-local variables fails

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 6 03:11:19 PDT 2013


            Bug ID: 16241
           Summary: LTO link with thread-local variables fails
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I could not find an appropriate bug category for this.

$ cat 1.cc
extern "C" {
__thread int x;

int f();

int main(void) {
  return f();

$ cat 2.cc
extern __thread int x;

int f() {
  return x;

$ ./bin/clang++ -c 1.cc
$ ./bin/clang++ -O4  1.o 2.cc
/usr/bin/ld: error: /tmp/2-Lj0Wg6.o: symbol 'x' used as both __thread and
/usr/bin/ld: 1.o: previous definition here

$ /usr/bin/ld --version
GNU gold (GNU Binutils for Ubuntu 2.22) 1.11

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/20130606/0ba40ad3/attachment.html>

More information about the llvm-bugs mailing list