aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-01-06 14:59:25 -0800
committerRichard Henderson <rth@gcc.gnu.org>2003-01-06 14:59:25 -0800
commit52fd80fb25a7c0791880543bd9a26c24ae454edf (patch)
tree6ae43adb7de0ddcd2b1a1f5d7773a8c88c6f9029 /gcc/testsuite/gcc.dg/tls
parenta16b43c5c5fbdfce6c8b890af7c287e4f56e1106 (diff)
downloadgcc-52fd80fb25a7c0791880543bd9a26c24ae454edf.zip
gcc-52fd80fb25a7c0791880543bd9a26c24ae454edf.tar.gz
gcc-52fd80fb25a7c0791880543bd9a26c24ae454edf.tar.bz2
alpha.c (alpha_encode_section_info): Adjust symbol_str properly when changing "local-ness".
* config/alpha/alpha.c (alpha_encode_section_info): Adjust symbol_str properly when changing "local-ness". * config/alpha/alpha.md (movdi_er_high_g): Allow all symbols. * gcc.dg/tls/alias-1.c: New. From-SVN: r60961
Diffstat (limited to 'gcc/testsuite/gcc.dg/tls')
-rw-r--r--gcc/testsuite/gcc.dg/tls/alias-1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tls/alias-1.c b/gcc/testsuite/gcc.dg/tls/alias-1.c
new file mode 100644
index 0000000..3372da3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tls/alias-1.c
@@ -0,0 +1,21 @@
+/* { dg-do link } */
+/* Test that encode_section_info handles the change from externally
+ defined to locally defined (via hidden). Extracted from glibc. */
+
+struct __res_state {
+ char x[123];
+};
+
+extern __thread struct __res_state bar
+ __attribute__ ((tls_model ("initial-exec")));
+
+int main()
+{
+ bar.x[0] = 0;
+ return 0;
+}
+
+__thread struct __res_state foo;
+extern __thread struct __res_state bar
+ __attribute__ ((alias ("foo")))
+ __attribute__ ((visibility ("hidden")));