http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188
--- Comment #13 from fabien at gcc dot gnu.org 2011-11-17 21:53:15 UTC --- (In reply to comment #12) > Let's wait and strip_using_decl after the loop (i.e. at the return statement), > since a USING_DECL has the same name. We also need to check > is_overloaded_decl. Like that ? Index: search.c =================================================================== --- search.c (revision 181386) +++ search.c (working copy) @@ -436,6 +436,14 @@ lookup_field_1 (tree type, tree name, bo 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; } }