instantiation of lambda op().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230201
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-11-11 Jason Merrill <jason@redhat.com>
+
+ * pt.c (instantiate_class_template_1): Set function_depth around
+ instantiation of lambda op().
+
2015-11-11 Marek Polacek <polacek@redhat.com>
PR c/68107
{
if (!DECL_TEMPLATE_INFO (decl)
|| DECL_TEMPLATE_RESULT (DECL_TI_TEMPLATE (decl)) != decl)
- instantiate_decl (decl, false, false);
+ {
+ /* Set function_depth to avoid garbage collection. */
+ ++function_depth;
+ instantiate_decl (decl, false, false);
+ --function_depth;
+ }
/* We need to instantiate the capture list from the template
after we've instantiated the closure members, but before we