Hi, The problem here is the misused of the OVL_USED macro. It should only be applied on OVERLOAD, this patch forces that by checking the OVL_USED macro. As a result, we need to make sure that we have an overload by checking its tree code.
Tested x86_64-unknown-linux-gnu. OK to commit ? 2012-09-09 Fabien Chêne <fab...@gcc.gnu.org> PR c++/54537 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK. * name-lookup.c (do_nonmember_using_decl): Make sure we have an OVERLOAD before calling OVL_USED. 2012-09-09 Fabien Chêne <fab...@gcc.gnu.org> PR c++/54537 * g++.dg/overload/using3.C: New. -- Fabien
54537.patch
Description: Binary data