diff options
Diffstat (limited to 'test/CodeGen/thread-specifier.c')
-rw-r--r-- | test/CodeGen/thread-specifier.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/thread-specifier.c b/test/CodeGen/thread-specifier.c index a1f3e16..a2d3e62 100644 --- a/test/CodeGen/thread-specifier.c +++ b/test/CodeGen/thread-specifier.c @@ -3,7 +3,13 @@ // CHECK: @b = external thread_local global // CHECK: @d.e = internal thread_local global // CHECK: @d.f = internal thread_local global +// CHECK: @f.a = internal thread_local(initialexec) global // CHECK: @a = thread_local global +// CHECK: @g = thread_local global +// CHECK: @h = thread_local(localdynamic) global +// CHECK: @i = thread_local(initialexec) global +// CHECK: @j = thread_local(localexec) global + __thread int a; extern __thread int b; int c() { return *&b; } @@ -13,3 +19,12 @@ int d() { return 0; } +__thread int g __attribute__((tls_model("global-dynamic"))); +__thread int h __attribute__((tls_model("local-dynamic"))); +__thread int i __attribute__((tls_model("initial-exec"))); +__thread int j __attribute__((tls_model("local-exec"))); + +int f() { + __thread static int a __attribute__((tls_model("initial-exec"))); + return a++; +} |