diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/fortran/f95-lang.c | 8 | ||||
-rw-r--r-- | gcc/fortran/openmp.c | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-common.c | 2 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 2 | ||||
-rw-r--r-- | gcc/fortran/types.def | 4 |
6 files changed, 12 insertions, 14 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a8758cd..85c9533 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2006-10-09 Richard Henderson <rth@redhat.com> + + Revert emutls patch. + 2006-10-09 Francois-Xavier Coudert <coudert@clipper.ens.fr> * intrinsic.c (add_sym_0s, add_sym_1s, add_sym_2s, add_sym_3s, diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 02e914f..6dc00da 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -1102,14 +1102,6 @@ gfc_init_builtin_functions (void) BUILT_IN_TRAP, NULL, false); TREE_THIS_VOLATILE (built_in_decls[BUILT_IN_TRAP]) = 1; - gfc_define_builtin ("__emutls_get_address", - builtin_types[BT_FN_PTR_PTR], BUILT_IN_EMUTLS_GET_ADDRESS, - "__emutls_get_address", true); - gfc_define_builtin ("__emutls_register_common", - builtin_types[BT_FN_VOID_PTR_WORD_WORD_PTR], - BUILT_IN_EMUTLS_REGISTER_COMMON, - "__emutls_register_common", false); - build_common_builtin_nodes (); targetm.init_builtins (); } diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 81faf49..09ec255 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -465,6 +465,12 @@ gfc_match_omp_threadprivate (void) if (m != MATCH_YES) return m; + if (!targetm.have_tls) + { + sorry ("threadprivate variables not supported in this target"); + goto cleanup; + } + for (;;) { m = gfc_match_symbol (&sym, 0); diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index e580494..5350eac 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -388,7 +388,7 @@ build_common_decl (gfc_common_head *com, tree union_type, bool is_init) gfc_set_decl_location (decl, &com->where); - if (com->threadprivate) + if (com->threadprivate && targetm.have_tls) DECL_TLS_MODEL (decl) = decl_default_tls_model (decl); /* Place the back end declaration for this common block in diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 4d410b1..7250022 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -522,7 +522,7 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym) TREE_STATIC (decl) = 1; /* Handle threadprivate variables. */ - if (sym->attr.threadprivate + if (sym->attr.threadprivate && targetm.have_tls && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) DECL_TLS_MODEL (decl) = decl_default_tls_model (decl); } diff --git a/gcc/fortran/types.def b/gcc/fortran/types.def index 0abd845..5a3e5d7 100644 --- a/gcc/fortran/types.def +++ b/gcc/fortran/types.def @@ -55,7 +55,6 @@ DEF_PRIMITIVE_TYPE (BT_BOOL, boolean_type_node) DEF_PRIMITIVE_TYPE (BT_INT, integer_type_node) DEF_PRIMITIVE_TYPE (BT_UINT, unsigned_type_node) DEF_PRIMITIVE_TYPE (BT_LONG, long_integer_type_node) -DEF_PRIMITIVE_TYPE (BT_WORD, (*lang_hooks.types.type_for_mode) (word_mode, 1)) DEF_PRIMITIVE_TYPE (BT_I1, builtin_type_for_size (BITS_PER_UNIT*1, 1)) DEF_PRIMITIVE_TYPE (BT_I2, builtin_type_for_size (BITS_PER_UNIT*2, 1)) @@ -82,7 +81,6 @@ DEF_FUNCTION_TYPE_1 (BT_FN_VOID_PTR, BT_VOID, BT_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_PTRPTR, BT_VOID, BT_PTR_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_VPTR, BT_VOID, BT_VOLATILE_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_UINT_UINT, BT_UINT, BT_UINT) -DEF_FUNCTION_TYPE_1 (BT_FN_PTR_PTR, BT_PTR, BT_PTR) DEF_POINTER_TYPE (BT_PTR_FN_VOID_PTR, BT_FN_VOID_PTR) @@ -115,8 +113,6 @@ DEF_FUNCTION_TYPE_3 (BT_FN_VOID_OMPFN_PTR_UINT, BT_VOID, BT_PTR_FN_VOID_PTR, DEF_FUNCTION_TYPE_4 (BT_FN_VOID_OMPFN_PTR_UINT_UINT, BT_VOID, BT_PTR_FN_VOID_PTR, BT_PTR, BT_UINT, BT_UINT) -DEF_FUNCTION_TYPE_4 (BT_FN_VOID_PTR_WORD_WORD_PTR, - BT_VOID, BT_PTR, BT_WORD, BT_WORD, BT_PTR) DEF_FUNCTION_TYPE_5 (BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR, BT_BOOL, BT_LONG, BT_LONG, BT_LONG, |