PR c++/28111
* pt.c (determine_specialization): Check for invalid decls.
* g++.dg/template/friend43.C: New test.
From-SVN: r114887
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/28111
+ * pt.c (determine_specialization): Check for invalid decls.
+
PR c++/28110
* pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
parameters.
*targs_out = NULL_TREE;
- if (template_id == error_mark_node)
+ if (template_id == error_mark_node || decl == error_mark_node)
return error_mark_node;
fns = TREE_OPERAND (template_id, 0);
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/28111
+ * g++.dg/template/friend43.C: New test.
+
PR c++/28110
* g++.dg/template/crash53.C: New test.
--- /dev/null
+// PR c++/28111
+// { dg-do compile }
+
+template<typename> void foo();
+
+template<typename T> struct A
+{
+ friend void foo<>(typename T::X); // { dg-error "not a class" }
+};
+
+A<int> a;