re PR c++/68309 (ICE: Segmentation fault)
authorJason Merrill <jason@redhat.com>
Wed, 16 Dec 2015 18:22:23 +0000 (13:22 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 16 Dec 2015 18:22:23 +0000 (13:22 -0500)
PR c++/68309
* pt.c (instantiate_decl): Revert earlier change.

From-SVN: r231714

gcc/cp/ChangeLog
gcc/cp/pt.c

index 751779244f6047021b13927bfdec47e71f3285c7..488b2ad0ad01fb88722473929f13f769b298822b 100644 (file)
@@ -1,5 +1,8 @@
 2015-12-16  Jason Merrill  <jason@redhat.com>
 
+       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.
index 2c2da11488bed14f3b55f1b3e8e89ce924c7d2d9..5cf2497f79a2d5d00c415b471ecbb659eac4435d 100644 (file)
@@ -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<tree, tree> (*local_specializations);
-      else
-       local_specializations = new hash_map<tree, tree>;
+      /* Set up the list of local specializations.  */
+      local_specializations = new hash_map<tree, tree>;
 
       /* Set up context.  */
       if (DECL_OMP_DECLARE_REDUCTION_P (code_pattern)