aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@gcc.gnu.org>2004-07-12 16:16:38 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-07-12 16:16:38 +0000
commitccb14335ce321105a0d0a131f8236334d2fa72e8 (patch)
tree296869ab233c8184095dd09c1a412fb1d110bf2c
parentcad7e87b1191e2b96f22ca5b12cddc528e364340 (diff)
downloadgcc-ccb14335ce321105a0d0a131f8236334d2fa72e8.zip
gcc-ccb14335ce321105a0d0a131f8236334d2fa72e8.tar.gz
gcc-ccb14335ce321105a0d0a131f8236334d2fa72e8.tar.bz2
missed in previous commit
From-SVN: r84563
-rw-r--r--gcc/cp/name-lookup.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index fb043af..1b0a13f 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -4356,12 +4356,13 @@ arg_assoc_class (struct arg_lookup *k, tree type)
context = decl_namespace (TYPE_MAIN_DECL (type));
if (arg_assoc_namespace (k, context))
return true;
-
- /* Process baseclasses. */
- for (i = 0; i < BINFO_N_BASE_BINFOS (TYPE_BINFO (type)); i++)
- if (arg_assoc_class
- (k, BINFO_TYPE (BINFO_BASE_BINFO (TYPE_BINFO (type), i))))
- return true;
+
+ if (TYPE_BINFO (type))
+ /* Process baseclasses. */
+ for (i = 0; i < BINFO_N_BASE_BINFOS (TYPE_BINFO (type)); i++)
+ if (arg_assoc_class
+ (k, BINFO_TYPE (BINFO_BASE_BINFO (TYPE_BINFO (type), i))))
+ return true;
/* Process friends. */
for (list = DECL_FRIENDLIST (TYPE_MAIN_DECL (type)); list;