cleanups/fixes for ASM handling
[libfirm] / ir / be / test / thread.c
1 #ifdef _WIN32
2 #define __thread   __declspec( thread )
3 #endif
4
5 __thread int tls_i[10];
6 __thread int tls_j = 5;
7
8 int test(int i) {
9         tls_j = i;
10         return tls_i[i];
11 }
12
13 int main()
14 {
15     printf("tls_i: %d\n", test(3));
16     printf("tls_j: %d\n", tls_j);
17     return 0;
18 }