aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2006-05-15 09:19:30 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2006-05-15 09:19:30 +0000
commit0616700cbc830a751598dce810d82a5116d24a28 (patch)
tree2749403c7fd8e6bf57753f7ce6a6456d3fd7549c /gcc/cp/search.c
parentad47b891c8d103457fc9e1e53b518a8d9610534b (diff)
downloadgcc-0616700cbc830a751598dce810d82a5116d24a28.zip
gcc-0616700cbc830a751598dce810d82a5116d24a28.tar.gz
gcc-0616700cbc830a751598dce810d82a5116d24a28.tar.bz2
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
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 66bbb13..6622fb5 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1479,7 +1479,8 @@ adjust_result_of_qualified_name_lookup (tree 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))
{