PR c++/27581
* search.c (adjust_result_of_qualified_name_lookup): Skip on
invalid context_class.
* g++.dg/lookup/this1.C: New test.
From-SVN: r113783
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/27581
+ * search.c (adjust_result_of_qualified_name_lookup): Skip on
+ invalid context_class.
+
PR c++/27315
* pt.c (do_decl_instantiation): Return early on invalid decl.
tree qualifying_scope,
tree context_class)
{
- if (context_class && CLASS_TYPE_P (qualifying_scope)
+ if (context_class && context_class != error_mark_node
+ && CLASS_TYPE_P (qualifying_scope)
&& DERIVED_FROM_P (qualifying_scope, context_class)
&& BASELINK_P (decl))
{
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/27581
+ * g++.dg/lookup/this1.C: New test.
+
PR c++/27315
* g++.dg/template/operator6.C: New test.
* g++.dg/template/incomplete3.C: New test.
--- /dev/null
+// PR c++/27581
+// { dg-do compile }
+
+struct A
+{
+ template<int> static void foo();
+ static void bar() { this->A::foo<0>(); } // { dg-error "unavailable" }
+};