2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / tls / alias-1.c
blob3372da3d10cbfb37ecf9957edcc38492ad1a30eb
1 /* { dg-do link } */
2 /* Test that encode_section_info handles the change from externally
3 defined to locally defined (via hidden). Extracted from glibc. */
5 struct __res_state {
6 char x[123];
7 };
9 extern __thread struct __res_state bar
10 __attribute__ ((tls_model ("initial-exec")));
12 int main()
14 bar.x[0] = 0;
15 return 0;
18 __thread struct __res_state foo;
19 extern __thread struct __res_state bar
20 __attribute__ ((alias ("foo")))
21 __attribute__ ((visibility ("hidden")));