PR c++/25854
* pt.c (maybe_process_partial_specialization): Return early on
error_mark_node.
* g++.dg/template/spec28.C: New test.
From-SVN: r109975
+2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/25854
+ * pt.c (maybe_process_partial_specialization): Return early on
+ error_mark_node.
+
2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/16829
void
maybe_process_partial_specialization (tree type)
{
- /* TYPE maybe an ERROR_MARK_NODE. */
- tree context = TYPE_P (type) ? TYPE_CONTEXT (type) : NULL_TREE;
+ tree context;
+
+ if (type == error_mark_node)
+ return;
+
+ context = TYPE_CONTEXT (type);
if (CLASS_TYPE_P (type) && CLASSTYPE_USE_TEMPLATE (type))
{
+2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/25854
+ * g++.dg/template/spec28.C: New test.
+
2006-01-19 Andrew Pinski <pinskia@physics.uc.edu>
* objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c (switchfiles):
--- /dev/null
+// PR c++/25854
+// Bad diagnostic
+// { dg-do compile }
+
+template<typename> struct A {}; // { dg-error "provided" }
+template<> struct A<> {}; // { dg-error "wrong number" }