summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-10 19:19:10 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-10 19:19:10 +0000
commit9dda1f8020170bef10b8108e041393af82eae915 (patch)
tree19408e7a99094abe8a3e2baccde7b48302195b0a /gcc/testsuite/gcc.dg/tls
parentd4f1e64e02b4ff8b7374e379003f4ed33e4f3f47 (diff)
downloadgcc-9dda1f8020170bef10b8108e041393af82eae915.tar.gz
gcc/ChangeLog:
* Makefile.in (libgcc-support, libgcc.mvars): Add emutls.c. * builtin-types.def (BT_WORD): Make unsigned. (BT_FN_VOID_PTR_WORD_WORD_PTR): New. * builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New. (BUILT_IN_EMUTLS_REGISTER_COMMON): New. * c-decl.c (grokdeclarator): Don't error if !have_tls. * c-parser.c (c_parser_omp_threadprivate): Likewise. * dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for emulated tls. * expr.c (emutls_var_address): New. (expand_expr_real_1): Expand emulated tls. (expand_expr_addr_expr_1): Likewise. * libgcc-std.ver: Add __emutls_get_address, __emutls_register_common. * output.h (emutls_finish): Declare. * toplev.c (compile_file): Call it. * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the address before wrapping in CONST. * varasm.c (emutls_htab, emutls_object_type): New. (EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New. (get_emutls_object_name, get_emutls_object_type): New. (get_emutls_init_templ_addr, emutls_decl): New. (emutls_common_1, emutls_finish): New. (assemble_variable): When emulating tls, swap decls; generate constructor for the emutls objects. (do_assemble_alias): When emulating tls, swap decl and target name. (default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT for emulated tls. * varpool.c (decide_is_variable_needed): Look at force_output. Recurse for emulated tls. (cgraph_varpool_remove_unreferenced_decls): Remove checks redundant with decide_is_variable_needed. * emutls.c: New file. * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit tls_object for real tls. gcc/cp/ChangeLog: * decl.c (grokvardecl): Don't error if !have_tls. (grokdeclarator): Likewise. * parser.c (cp_parser_omp_threadprivate): Likewise. gcc/fortran/ChangeLog: * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address and __emutls_register_common. * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls. * trans-common.c (build_common_decl): Don't check have_tls. * trans-decl.c (gfc_finish_var_decl): Likewise. * types.def (BT_WORD, BT_FN_PTR_PTR): New. (BT_FN_VOID_PTR_WORD_WORD_PTR): New. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_tls): Redefine to mean non-emulated tls. * gcc.dg/tls/alias-1.c: Remove tls requirement. * gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c, gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c, gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c, gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c, gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c, gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tls')
-rw-r--r--gcc/testsuite/gcc.dg/tls/alias-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/asm-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/debug-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/diag-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/diag-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/diag-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/diag-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/diag-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/init-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/nonpic-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-10.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-6.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-8.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-9.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/pic-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/struct-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/trivial.c2
18 files changed, 0 insertions, 19 deletions
diff --git a/gcc/testsuite/gcc.dg/tls/alias-1.c b/gcc/testsuite/gcc.dg/tls/alias-1.c
index 28cb47e5041..1098190ebd0 100644
--- a/gcc/testsuite/gcc.dg/tls/alias-1.c
+++ b/gcc/testsuite/gcc.dg/tls/alias-1.c
@@ -1,7 +1,6 @@
/* { dg-do link } */
/* { dg-require-alias "" } */
/* { dg-require-visibility "" } */
-/* { dg-require-effective-target tls } */
/* Test that encode_section_info handles the change from externally
defined to locally defined (via hidden). Extracted from glibc. */
diff --git a/gcc/testsuite/gcc.dg/tls/asm-1.c b/gcc/testsuite/gcc.dg/tls/asm-1.c
index b77e550d7bf..476fe7cbb72 100644
--- a/gcc/testsuite/gcc.dg/tls/asm-1.c
+++ b/gcc/testsuite/gcc.dg/tls/asm-1.c
@@ -1,5 +1,4 @@
/* { dg-options "-Werror" } */
-/* { dg-require-effective-target tls } */
__thread int i;
int foo ()
diff --git a/gcc/testsuite/gcc.dg/tls/debug-1.c b/gcc/testsuite/gcc.dg/tls/debug-1.c
index 67d7be69cc5..719f0645771 100644
--- a/gcc/testsuite/gcc.dg/tls/debug-1.c
+++ b/gcc/testsuite/gcc.dg/tls/debug-1.c
@@ -1,5 +1,4 @@
/* { dg-do assemble } */
/* { dg-options "-g" } */
-/* { dg-require-effective-target tls } */
__thread int i;
diff --git a/gcc/testsuite/gcc.dg/tls/diag-1.c b/gcc/testsuite/gcc.dg/tls/diag-1.c
index 56b570c94a5..ae4f3d4a3c2 100644
--- a/gcc/testsuite/gcc.dg/tls/diag-1.c
+++ b/gcc/testsuite/gcc.dg/tls/diag-1.c
@@ -1,5 +1,4 @@
/* Valid __thread specifiers. */
-/* { dg-require-effective-target tls } */
__thread int g1;
extern __thread int g2;
diff --git a/gcc/testsuite/gcc.dg/tls/diag-2.c b/gcc/testsuite/gcc.dg/tls/diag-2.c
index 8276cb3be49..5e7e17bee5a 100644
--- a/gcc/testsuite/gcc.dg/tls/diag-2.c
+++ b/gcc/testsuite/gcc.dg/tls/diag-2.c
@@ -1,5 +1,4 @@
/* Invalid __thread specifiers. */
-/* { dg-require-effective-target tls } */
__thread extern int g1; /* { dg-error "'__thread' before 'extern'" } */
__thread static int g2; /* { dg-error "'__thread' before 'static'" } */
diff --git a/gcc/testsuite/gcc.dg/tls/diag-3.c b/gcc/testsuite/gcc.dg/tls/diag-3.c
index 45d89b43722..f1ce06b70d8 100644
--- a/gcc/testsuite/gcc.dg/tls/diag-3.c
+++ b/gcc/testsuite/gcc.dg/tls/diag-3.c
@@ -1,5 +1,4 @@
/* Report invalid extern and __thread combinations. */
-/* { dg-require-effective-target tls } */
extern int j; /* { dg-error "previous declaration" } */
__thread int j; /* { dg-error "follows non-thread-local" } */
diff --git a/gcc/testsuite/gcc.dg/tls/diag-4.c b/gcc/testsuite/gcc.dg/tls/diag-4.c
index fed2f3accd3..df3705d04ee 100644
--- a/gcc/testsuite/gcc.dg/tls/diag-4.c
+++ b/gcc/testsuite/gcc.dg/tls/diag-4.c
@@ -1,6 +1,5 @@
/* Invalid __thread specifiers. As diag-4.c but some cases in
different orders. */
-/* { dg-require-effective-target tls } */
__thread typedef int g4; /* { dg-error "'__thread' used with 'typedef'" } */
diff --git a/gcc/testsuite/gcc.dg/tls/diag-5.c b/gcc/testsuite/gcc.dg/tls/diag-5.c
index 219396d768a..623832c3812 100644
--- a/gcc/testsuite/gcc.dg/tls/diag-5.c
+++ b/gcc/testsuite/gcc.dg/tls/diag-5.c
@@ -1,4 +1,3 @@
/* __thread specifiers on empty declarations. */
-/* { dg-require-effective-target tls } */
__thread struct foo; /* { dg-warning "warning: useless '__thread' in empty declaration" } */
diff --git a/gcc/testsuite/gcc.dg/tls/init-1.c b/gcc/testsuite/gcc.dg/tls/init-1.c
index fa4208dce0c..97258643bf2 100644
--- a/gcc/testsuite/gcc.dg/tls/init-1.c
+++ b/gcc/testsuite/gcc.dg/tls/init-1.c
@@ -1,5 +1,4 @@
/* Invalid initializations. */
-/* { dg-require-effective-target tls } */
extern __thread int i;
int *p = &i; /* { dg-error "initializer element is not constant" } */
diff --git a/gcc/testsuite/gcc.dg/tls/nonpic-1.c b/gcc/testsuite/gcc.dg/tls/nonpic-1.c
index 9c592a98556..0896df60b56 100644
--- a/gcc/testsuite/gcc.dg/tls/nonpic-1.c
+++ b/gcc/testsuite/gcc.dg/tls/nonpic-1.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftls-model=initial-exec" } */
-/* { dg-require-effective-target tls } */
extern __thread long e1;
extern __thread int e2;
diff --git a/gcc/testsuite/gcc.dg/tls/opt-10.c b/gcc/testsuite/gcc.dg/tls/opt-10.c
index a710a062ca3..f31c1fff816 100644
--- a/gcc/testsuite/gcc.dg/tls/opt-10.c
+++ b/gcc/testsuite/gcc.dg/tls/opt-10.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fpic" } */
-/* { dg-require-effective-target tls } */
/* The web pass was creating unrecognisable pic_load_dot_plus_four insns
on ARM. */
diff --git a/gcc/testsuite/gcc.dg/tls/opt-5.c b/gcc/testsuite/gcc.dg/tls/opt-5.c
index 0604f3253c1..d8a686ddb46 100644
--- a/gcc/testsuite/gcc.dg/tls/opt-5.c
+++ b/gcc/testsuite/gcc.dg/tls/opt-5.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-require-effective-target tls } */
/* Sched1 moved {load_tp} pattern between strlen call and the copy
of the hard return value to its pseudo. This resulted in a
reload abort, since the hard register was not spillable. */
diff --git a/gcc/testsuite/gcc.dg/tls/opt-6.c b/gcc/testsuite/gcc.dg/tls/opt-6.c
index 8a01c019c10..de04c1cb3fc 100644
--- a/gcc/testsuite/gcc.dg/tls/opt-6.c
+++ b/gcc/testsuite/gcc.dg/tls/opt-6.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-require-effective-target tls } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/tls/opt-8.c b/gcc/testsuite/gcc.dg/tls/opt-8.c
index a7331115352..dec0eabcb4c 100644
--- a/gcc/testsuite/gcc.dg/tls/opt-8.c
+++ b/gcc/testsuite/gcc.dg/tls/opt-8.c
@@ -1,7 +1,6 @@
/* PR 18910 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-require-effective-target tls } */
static __thread void *foo [2];
void
diff --git a/gcc/testsuite/gcc.dg/tls/opt-9.c b/gcc/testsuite/gcc.dg/tls/opt-9.c
index cc62ef57a5d..3829c66fc55 100644
--- a/gcc/testsuite/gcc.dg/tls/opt-9.c
+++ b/gcc/testsuite/gcc.dg/tls/opt-9.c
@@ -1,7 +1,6 @@
/* PR 21412 */
/* { dg-do compile */
/* { dg-options "-O2 -fPIC" } */
-/* { dg-require-effective-target tls } */
struct S { int x[10]; };
extern __thread struct S s;
diff --git a/gcc/testsuite/gcc.dg/tls/pic-1.c b/gcc/testsuite/gcc.dg/tls/pic-1.c
index bcd42bd8572..f5b020b7db6 100644
--- a/gcc/testsuite/gcc.dg/tls/pic-1.c
+++ b/gcc/testsuite/gcc.dg/tls/pic-1.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fpic -ftls-model=global-dynamic" } */
-/* { dg-require-effective-target tls } */
extern __thread long e1;
extern __thread int e2;
diff --git a/gcc/testsuite/gcc.dg/tls/struct-1.c b/gcc/testsuite/gcc.dg/tls/struct-1.c
index 5fd6be43905..11151236d90 100644
--- a/gcc/testsuite/gcc.dg/tls/struct-1.c
+++ b/gcc/testsuite/gcc.dg/tls/struct-1.c
@@ -2,7 +2,6 @@
to allow addends for @dtpoff relocs or not. */
/* { dg-do compile } */
/* { dg-options "-O2 -fpic" } */
-/* { dg-require-effective-target tls } */
struct S {
int s0, s1, s2, s3;
diff --git a/gcc/testsuite/gcc.dg/tls/trivial.c b/gcc/testsuite/gcc.dg/tls/trivial.c
index 96b8e49a665..1fd70631f33 100644
--- a/gcc/testsuite/gcc.dg/tls/trivial.c
+++ b/gcc/testsuite/gcc.dg/tls/trivial.c
@@ -1,3 +1 @@
-/* { dg-require-effective-target tls } */
-
__thread int i;