Commit 0616700c by Volker Reichelt Committed by Volker Reichelt

re PR c++/27581 (ICE using this-pointer in static member function)

	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: r113781
parent ad47b891
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 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 PR c++/27315
* pt.c (do_decl_instantiation): Return early on invalid decl. * pt.c (do_decl_instantiation): Return early on invalid decl.
......
...@@ -1479,7 +1479,8 @@ adjust_result_of_qualified_name_lookup (tree decl, ...@@ -1479,7 +1479,8 @@ adjust_result_of_qualified_name_lookup (tree decl,
tree qualifying_scope, tree qualifying_scope,
tree context_class) 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) && DERIVED_FROM_P (qualifying_scope, context_class)
&& BASELINK_P (decl)) && BASELINK_P (decl))
{ {
......
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27581
* g++.dg/lookup/this1.C: New test.
PR c++/27315 PR c++/27315
* g++.dg/template/operator6.C: New test. * g++.dg/template/operator6.C: New test.
* g++.dg/template/incomplete3.C: New test. * g++.dg/template/incomplete3.C: New test.
// PR c++/27581
// { dg-do compile }
struct A
{
template<int> static void foo();
static void bar() { this->A::foo<0>(); } // { dg-error "unavailable" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment