Commit c7360ed2 by Jason Merrill Committed by Jason Merrill

pt.c (instantiate_class_template_1): Set function_depth around instantiation of lambda op().

	* pt.c (instantiate_class_template_1): Set function_depth around
	instantiation of lambda op().

From-SVN: r230201
parent 65b016eb
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> 2015-11-11 Marek Polacek <polacek@redhat.com>
PR c/68107 PR c/68107
......
...@@ -10162,7 +10162,12 @@ instantiate_class_template_1 (tree type) ...@@ -10162,7 +10162,12 @@ instantiate_class_template_1 (tree type)
{ {
if (!DECL_TEMPLATE_INFO (decl) if (!DECL_TEMPLATE_INFO (decl)
|| DECL_TEMPLATE_RESULT (DECL_TI_TEMPLATE (decl)) != 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 /* We need to instantiate the capture list from the template
after we've instantiated the closure members, but before we after we've instantiated the closure members, but before we
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment