diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-06-16 01:38:29 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-06-15 23:38:29 +0000 |
commit | 56363ffd48e81fd2bfbed9cf047809b45fc7c20f (patch) | |
tree | 997fbc019bd9db4f0a5a593250dbf13e6ebe406e /gcc/fortran | |
parent | a416c4c766df05b1e85dcee2fe7857e9a6e87b88 (diff) | |
download | gcc-56363ffd48e81fd2bfbed9cf047809b45fc7c20f.zip gcc-56363ffd48e81fd2bfbed9cf047809b45fc7c20f.tar.gz gcc-56363ffd48e81fd2bfbed9cf047809b45fc7c20f.tar.bz2 |
c-common.c (handle_tls_model_attribute): Use set_decl_tls_model.
* c-family/c-common.c (handle_tls_model_attribute): Use set_decl_tls_model.
* cgraph.h (struct varpool_node): Add tls_model.
* tree.c (decl_tls_model, set_decl_tls_model): New functions.
* tree.h (DECL_TLS_MODEL): Update.
(DECL_THREAD_LOCAL_P): Check that variable is static.
(decl_tls_model): Declare.
(set_decl_tls_model): Declare.
* tree-emutls.c (get_emutls_init_templ_addr): First build decl and then
set symbol prorperties.
(get_emutls_init_templ_addr): Cleanup.
(new_emutls_decl): Update.
* lto-cgraph.c (lto_output_varpool_node): Stream TLS model
(lto_input_varpool_node): Likewise.
* lto-streamer-out.c (hash_tree): Likewise.
* tree-streamer-in.c (unpack_ts_decl_with_vis_value_fields): Do
not stream DECL_TLS_MODEL.
* tree-profile.c (init_ic_make_global_vars): Use
set_decl_tls_model.
* tree-core.h (tree_decl_with_vis): Remove tls_model;
update comments.
* c-parser.c (c_parser_omp_threadprivate): Likewise.
* c-decl.c (merge_decls): Likewise.
* decl.c (duplicate_decls): Use set_decl_tls_model.
(grokdeclarator): Likewise.
* semantics.c (finish_id_expression): Check TLS only for
static variables.
(finish_omp_threadprivate): Use decl_default_tls_model.
* decl2.c (get_guard): Likewise.
* call.c (make_temporary_var_for_ref_to_temp): Likewise.
* gcc-interface/utils.c (process_attributes): Use
set_decl_tls_model.
* trans-common.c (build_common_decl): Use
set_decl_tls_model.
* trans-decl.c (gfc_finish_var_decl): Likewise.
(get_proc_pointer_decl): Likewise.
* lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
From-SVN: r211689
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-common.c | 2 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 308a7bc..e795de6 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2014-06-15 Jan Hubicka <hubicka@ucw.cz> + + * trans-common.c (build_common_decl): Use + set_decl_tls_model. + * trans-decl.c (gfc_finish_var_decl): Likewise. + (get_proc_pointer_decl): Likewise. + 2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/28484 diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index 36aa8f3..5a52984 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -454,7 +454,7 @@ build_common_decl (gfc_common_head *com, tree union_type, bool is_init) gfc_set_decl_location (decl, &com->where); if (com->threadprivate) - DECL_TLS_MODEL (decl) = decl_default_tls_model (decl); + set_decl_tls_model (decl, decl_default_tls_model (decl)); /* Place the back end declaration for this common block in GLOBAL_BINDING_LEVEL. */ diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 1940622..bd82a90 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -631,7 +631,7 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym) /* Handle threadprivate variables. */ if (sym->attr.threadprivate && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) - DECL_TLS_MODEL (decl) = decl_default_tls_model (decl); + set_decl_tls_model (decl, decl_default_tls_model (decl)); gfc_finish_decl_attrs (decl, &sym->attr); } @@ -1645,7 +1645,7 @@ get_proc_pointer_decl (gfc_symbol *sym) /* Handle threadprivate procedure pointers. */ if (sym->attr.threadprivate && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) - DECL_TLS_MODEL (decl) = decl_default_tls_model (decl); + set_decl_tls_model (decl, decl_default_tls_model (decl)); attributes = add_attributes_to_decl (sym->attr, NULL_TREE); decl_attributes (&decl, attributes, 0); |