summaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 9f308e29d79..3894c685884 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -436,6 +436,14 @@ lookup_field_1 (tree type, tree name, bool want_type)
field = fields[i++];
while (i < hi && DECL_NAME (fields[i]) == name);
}
+
+ if (field)
+ {
+ field = strip_using_decl (field);
+ if (is_overloaded_fn (field))
+ field = NULL_TREE;
+ }
+
return field;
}
}