]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tls/alias-1.c
gcc/ChangeLog:
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tls / alias-1.c
1 /* { dg-do link } */
2 /* { dg-require-alias "" } */
3 /* { dg-require-visibility "" } */
4 /* Test that encode_section_info handles the change from externally
5 defined to locally defined (via hidden). Extracted from glibc. */
6
7 struct __res_state {
8 char x[123];
9 };
10
11 extern __thread struct __res_state bar
12 __attribute__ ((tls_model ("initial-exec")));
13
14 int main()
15 {
16 bar.x[0] = 0;
17 return 0;
18 }
19
20 __thread struct __res_state foo;
21 extern __thread struct __res_state bar
22 __attribute__ ((alias ("foo")))
23 __attribute__ ((visibility ("hidden")));