From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGen/thread-specifier.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 clang/test/CodeGen/thread-specifier.c (limited to 'clang/test/CodeGen/thread-specifier.c') diff --git a/clang/test/CodeGen/thread-specifier.c b/clang/test/CodeGen/thread-specifier.c new file mode 100644 index 0000000..a1f3e16 --- /dev/null +++ b/clang/test/CodeGen/thread-specifier.c @@ -0,0 +1,15 @@ +// 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; +} + -- cgit v1.2.3