diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-01-12 09:21:53 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-01-12 09:21:53 +0100 |
commit | 723033a6b2ce651e9fded5af3a820ad605cbfed0 (patch) | |
tree | 8cc7d55e8ab77206f6039b302671e3002677fab7 /gcc/cp | |
parent | 3df6ff355fc898d685bb9e0688634a65c1dc29fd (diff) | |
download | gcc-723033a6b2ce651e9fded5af3a820ad605cbfed0.tar.gz |
re PR c++/66808 (tree check fail in symbol_table::decl_assembler_name_hash)
PR c++/66808
PR c++/69000
* pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
* g++.dg/tls/pr66808.C: New test.
* g++.dg/tls/pr69000.C: New test.
From-SVN: r232259
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ba7cf58552c..c8b81605f43 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2016-01-12 Jakub Jelinek <jakub@redhat.com> + + PR c++/66808 + PR c++/69000 + * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO. + 2016-01-11 Jason Merrill <jason@redhat.com> PR c++/69131 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ad5099f94bc..edec774a0c9 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -12292,8 +12292,13 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) SET_DECL_IMPLICIT_INSTANTIATION (r); register_specialization (r, gen_tmpl, argvec, false, hash); } - else if (!cp_unevaluated_operand) - register_local_specialization (r, t); + else + { + if (DECL_LANG_SPECIFIC (r)) + DECL_TEMPLATE_INFO (r) = NULL_TREE; + if (!cp_unevaluated_operand) + register_local_specialization (r, t); + } DECL_CHAIN (r) = NULL_TREE; |