* pt.c (deduction_tsubst_fntype): Don't free the tinst entry
if a pending_template entry is pointing at it.
From-SVN: r174807
+2011-06-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/49322
+ * pt.c (deduction_tsubst_fntype): Don't free the tinst entry
+ if a pending_template entry is pointing at it.
+
2011-06-07 Jason Merrill <jason@redhat.com>
PR c++/48969
static bool excessive_deduction_depth;
static int deduction_depth;
location_t save_loc = input_location;
+ struct pending_template *old_last_pend = last_pending_template;
tree fntype = TREE_TYPE (fn);
tree tinst;
}
pop_tinst_level ();
- ggc_free (tinst);
+ /* We can't free this if a pending_template entry is pointing at it. */
+ if (last_pending_template == old_last_pend)
+ ggc_free (tinst);
return r;
}