blob: a1f3e168000e694d5fdea6653e7e92884d057957 [file] [log] [blame]
Eric Christopher7b3982b2010-12-02 02:30:43 +00001// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
Eli Friedman56ebe502009-04-19 21:05:03 +00002
Eric Christopher7b3982b2010-12-02 02:30:43 +00003// CHECK: @b = external thread_local global
4// CHECK: @d.e = internal thread_local global
5// CHECK: @d.f = internal thread_local global
6// CHECK: @a = thread_local global
Eli Friedman56ebe502009-04-19 21:05:03 +00007__thread int a;
8extern __thread int b;
Eric Christopher7b3982b2010-12-02 02:30:43 +00009int c() { return *&b; }
Eli Friedman56ebe502009-04-19 21:05:03 +000010int d() {
11 __thread static int e;
12 __thread static union {float a; int b;} f = {.b = 1};
Eric Christopher7b3982b2010-12-02 02:30:43 +000013 return 0;
Eli Friedman56ebe502009-04-19 21:05:03 +000014}
15