* pt.c (determine_specialization): Check for invalid decls.
* g++.dg/template/friend43.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114887
138bc75d-0d04-0410-961f-
82ee72b054a4
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;