summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-30 14:31:36 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-30 14:31:36 +0000
commit800478e66a7b89ba40414dd90a072c2987c054d5 (patch)
treed596be866a55e81c7c92dab11b20197e048889f2 /gcc/cp/decl2.c
parentf01bcbfbccaf08c27dcf5063529491f0d921dbe0 (diff)
downloadgcc-800478e66a7b89ba40414dd90a072c2987c054d5.tar.gz
PR debug/66653
* cp-tree.h (CP_DECL_THREAD_LOCAL_P): New. (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field. (SET_DECL_GNU_TLS_P): New. * call.c (make_temporary_var_for_ref_to_temp): Use CP_DECL_THREAD_LOCAL_P. (set_up_extended_ref_temp): Likewise. * decl.c (duplicate_decls, expand_static_init): Likewise. (redeclaration_error_message, grokvardecl): Likewise. (start_decl, register_dtor_fn, grokdeclarator): Likewise. * decl2.c (get_guard, var_needs_tls_wrapper): Likewise. (handle_tls_init): Likewise. * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise. * semantics.c (finish_id_expression): Likewise. (handle_omp_array_sections_1, finish_omp_clauses): Likewise. (finish_omp_threadprivate): Likewise. * tree.c (decl_storage_duration): Likewise. * cp-gimplify.c (omp_var_to_track): Likewise. (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P. * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is already set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225192 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index a7a6efb25f2..5032333c314 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3005,6 +3005,7 @@ get_guard (tree decl)
TREE_STATIC (guard) = TREE_STATIC (decl);
DECL_COMMON (guard) = DECL_COMMON (decl);
DECL_COMDAT (guard) = DECL_COMDAT (decl);
+ CP_DECL_THREAD_LOCAL_P (guard) = CP_DECL_THREAD_LOCAL_P (decl);
set_decl_tls_model (guard, DECL_TLS_MODEL (decl));
if (DECL_ONE_ONLY (decl))
make_decl_one_only (guard, cxx_comdat_group (guard));
@@ -3143,7 +3144,7 @@ static bool
var_needs_tls_wrapper (tree var)
{
return (!error_operand_p (var)
- && DECL_THREAD_LOCAL_P (var)
+ && CP_DECL_THREAD_LOCAL_P (var)
&& !DECL_GNU_TLS_P (var)
&& !DECL_FUNCTION_SCOPE_P (var)
&& !var_defined_without_dynamic_init (var));
@@ -4278,6 +4279,7 @@ handle_tls_init (void)
DECL_ARTIFICIAL (guard) = true;
DECL_IGNORED_P (guard) = true;
TREE_USED (guard) = true;
+ CP_DECL_THREAD_LOCAL_P (guard) = true;
set_decl_tls_model (guard, decl_default_tls_model (guard));
pushdecl_top_level_and_finish (guard, NULL_TREE);