This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52268] tls support should be added for darwin11
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Feb 2012 17:18:19 +0000
- Subject: [Bug target/52268] tls support should be added for darwin11
- Auto-submitted: auto-generated
- References: <bug-52268-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52268
--- Comment #3 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-02-29 17:18:19 UTC ---
Also in clang 3.0, I see test/CodeGen/darwin-thread-specifier.c which
contains...
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s |
FileCheck %s
// CHECK: @b = thread_local global i32 5, align 4
__thread int b = 5;
whereas their test/CodeGen/thread-specifier.c has...
// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
// CHECK: @b = external thread_local global
// CHECK: @d.e = internal thread_local global
// CHECK: @d.f = internal thread_local global
// CHECK: @a = thread_local global
__thread int a;
extern __thread int b;
int c() { return *&b; }
int d() {
__thread static int e;
__thread static union {float a; int b;} f = {.b = 1};
return 0;
}