@@ -27224,7 +27224,7 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags,
tree outer_args = NULL_TREE;
if (DECL_CLASS_SCOPE_P (tmpl)
- && CLASSTYPE_TEMPLATE_INFO (DECL_CONTEXT (tmpl)))
+ && CLASSTYPE_TEMPLATE_INSTANTIATION (DECL_CONTEXT (tmpl)))
{
outer_args = CLASSTYPE_TI_ARGS (DECL_CONTEXT (tmpl));
type = TREE_TYPE (most_general_template (tmpl));
new file mode 100644
@@ -0,0 +1,11 @@
+// PR c++/88869
+// { dg-do compile { target c++17 } }
+
+template <typename> struct B;
+template <> struct B<int> {
+ template <typename T> struct C {
+ T e;
+ C (T f) : e(f) {}
+ };
+ void foo () { C c (42); }
+};
@@ -1,5 +1,9 @@
2019-02-21 Jason Merrill <jason@redhat.com>
+ PR c++/88869 - C++17 ICE with CTAD and explicit specialization.
+ * pt.c (do_class_deduction): Don't include explicit specialization
+ args in outer_args.
+
PR c++/89422 - ICE with -g and lambda in default arg in template.
* pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner.