Commit 4cbe585c by Jason Merrill Committed by Jason Merrill

PR c++/85228 - ICE with lambda in enumerator.

	* pt.c (bt_instantiate_type_proc): Don't assume
	CLASSTYPE_TEMPLATE_INFO is non-null.

From-SVN: r259130
parent 9aee04a4
2018-04-05 Jason Merrill <jason@redhat.com>
PR c++/85228 - ICE with lambda in enumerator in template.
* pt.c (bt_instantiate_type_proc): Don't assume
CLASSTYPE_TEMPLATE_INFO is non-null.
2018-04-05 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement P0969
......
......@@ -22841,6 +22841,7 @@ bt_instantiate_type_proc (binding_entry entry, void *data)
tree storage = *(tree *) data;
if (MAYBE_CLASS_TYPE_P (entry->type)
&& CLASSTYPE_TEMPLATE_INFO (entry->type)
&& !uses_template_parms (CLASSTYPE_TI_ARGS (entry->type)))
do_type_instantiation (TYPE_MAIN_DECL (entry->type), storage, 0);
}
......
// PR c++/85228
// { dg-additional-options -std=c++17 }
template<int> struct A
{
enum E { e = []{ return 0; }() };
};
template class A<0>;
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