* pt.c (bt_instantiate_type_proc): Don't assume
CLASSTYPE_TEMPLATE_INFO is non-null.
From-SVN: r259130
+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
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);
}
--- /dev/null
+// PR c++/85228
+// { dg-additional-options -std=c++17 }
+
+template<int> struct A
+{
+ enum E { e = []{ return 0; }() };
+};
+
+template class A<0>;