diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2006-05-15 09:19:30 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2006-05-15 09:19:30 +0000 |
commit | 0616700cbc830a751598dce810d82a5116d24a28 (patch) | |
tree | 2749403c7fd8e6bf57753f7ce6a6456d3fd7549c /gcc/cp | |
parent | ad47b891c8d103457fc9e1e53b518a8d9610534b (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/search.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f34ea88..8443138 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 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. 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)) { |