From a3d8777127800e056bf525c39ab4f7bd72b7818b Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Mon, 14 Jul 2003 05:12:56 +0000 Subject: re PR c++/11503 (segfault when instantiating template with ADDR_EXPR) PR c++/11503 * g++.dg/template/anon1.C: New test. PR c++/11503 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro. (SET_DECL_SELF_REFERENCE_P): Likewise. * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P. * pt.c (tsubst_decl): Copy it. * search.c (lookup_base): Use DECL_SELF_REFERENCE_P. From-SVN: r69317 --- gcc/cp/search.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc/cp/search.c') diff --git a/gcc/cp/search.c b/gcc/cp/search.c index c2c158a..1161084 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -305,9 +305,7 @@ lookup_base (tree t, tree base, base_access access, base_kind *kind_ptr) /* Rather than inventing a public member, we use the implicit public typedef created in the scope of every class. */ decl = TYPE_FIELDS (base); - while (TREE_CODE (decl) != TYPE_DECL - || !DECL_ARTIFICIAL (decl) - || DECL_NAME (decl) != constructor_name (base)) + while (!DECL_SELF_REFERENCE_P (decl)) decl = TREE_CHAIN (decl); while (ANON_AGGR_TYPE_P (t)) t = TYPE_CONTEXT (t); -- cgit v1.1