Merge to HEAD at tree-cleanup-merge-20041024 .
[official-gcc.git] / gcc / testsuite / gcc.dg / tls / alias-1.c
blobfa8dd29d94bd6d2933a893b24a89b9cf5dd190a1
1 /* { dg-do link } */
2 /* { dg-warning "visibility" "unsupported" { target sparc*-sun-solaris2.* } 22 } */
3 /* Test that encode_section_info handles the change from externally
4 defined to locally defined (via hidden). Extracted from glibc. */
6 struct __res_state {
7 char x[123];
8 };
10 extern __thread struct __res_state bar
11 __attribute__ ((tls_model ("initial-exec")));
13 int main()
15 bar.x[0] = 0;
16 return 0;
19 __thread struct __res_state foo;
20 extern __thread struct __res_state bar
21 __attribute__ ((alias ("foo")))
22 __attribute__ ((visibility ("hidden")));