/cp
2018-03-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85028
* pt.c (tsubst_default_argument): Early return if the type of the
parameter is erroneous.
/testsuite
2018-03-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85028
* g++.dg/other/default13.C: New.
From-SVN: r258932
+2018-03-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/85028
+ * pt.c (tsubst_default_argument): Early return if the type of the
+ parameter is erroneous.
+
2018-03-28 Alexandre Oliva <aoliva@redhat.com>
PR c++/84973
tree parmtype = TREE_TYPE (parm);
if (DECL_BY_REFERENCE (parm))
parmtype = TREE_TYPE (parmtype);
+ if (parmtype == error_mark_node)
+ return error_mark_node;
+
gcc_assert (same_type_ignoring_top_level_qualifiers_p (type, parmtype));
tree *slot;
+2018-03-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/85028
+ * g++.dg/other/default13.C: New.
+
2018-03-28 Jakub Jelinek <jakub@redhat.com>
PR target/85095
--- /dev/null
+// PR c++/85028
+
+struct A;
+
+template < typename > struct B
+{
+ B (int, A = A()) : f (0) {} // { dg-error "incomplete type" }
+ int f;
+};
+
+B < int > b (0);