From 4793cbbaa5915165e2392b349c7b227d4e96d552 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 16 Dec 2015 13:22:23 -0500 Subject: [PATCH] re PR c++/68309 (ICE: Segmentation fault) PR c++/68309 * pt.c (instantiate_decl): Revert earlier change. From-SVN: r231714 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/pt.c | 9 ++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 751779244f6..488b2ad0ad0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2015-12-16 Jason Merrill + PR c++/68309 + * pt.c (instantiate_decl): Revert earlier change. + PR c++/63628 * pt.c (tsubst_pack_expansion): Also make dummy decls if retrieve_local_specialization fails. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 2c2da11488b..5cf2497f79a 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -21742,13 +21742,8 @@ instantiate_decl (tree d, int defer_ok, template from within the body of another. */ saved_local_specializations = local_specializations; - /* Set up the list of local specializations, copying the current - list if there is one. */ - if (local_specializations) - local_specializations - = new hash_map (*local_specializations); - else - local_specializations = new hash_map; + /* Set up the list of local specializations. */ + local_specializations = new hash_map; /* Set up context. */ if (DECL_OMP_DECLARE_REDUCTION_P (code_pattern) -- 2.30.2