PR c++/27427
* pt.c (convert_nontype_argument): Return early on invalid arguments.
* g++.dg/template/incomplete2.C: New test.
From-SVN: r113584
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/27427
+ * pt.c (convert_nontype_argument): Return early on invalid arguments.
+
PR c++/27422
* typeck.c (convert_arguments): Return early on args with
invalid types.
instantiated -- but here we need the resolved form so that we can
convert the argument. */
expr = fold_non_dependent_expr (expr);
+ if (error_operand_p (expr))
+ return error_mark_node;
expr_type = TREE_TYPE (expr);
/* HACK: Due to double coercion, we can get a
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/27427
+ * g++.dg/template/incomplete2.C: New test.
+
PR c++/27422
* g++.dg/conversion/void1.C: New test.
--- /dev/null
+// PR c++/27427
+// { dg-do compile }
+
+struct A;
+
+template<A&> void foo();
+
+A a; // { dg-error "incomplete type" }
+
+void bar()
+{
+ foo<a>(); // { dg-error "no matching function" }
+}