https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98530
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Sidwell <nat...@gcc.gnu.org>: https://gcc.gnu.org/g:3c1cf7350bff6ba03faaa61b44d74bf8a06c6543 commit r11-6834-g3c1cf7350bff6ba03faaa61b44d74bf8a06c6543 Author: Nathan Sidwell <nat...@acm.org> Date: Thu Jan 21 04:48:39 2021 -0800 c++: Stat-hack for members [PR 98530] This was a header file that deployed the stat-hack inside a class (both a member-class and a [non-static data] member had the same name). Due to the way that's represented in name lookup we missed the class. Sadly just changing the representation globally has detrimental effects elsewhere, and this is a rare case, so just creating a new overload on the fly shouldn't be a problem. PR c++/98530 gcc/cp/ * name-lookup.c (lookup_class_binding): Rearrange a stat-hack. gcc/testsuite/ * g++.dg/modules/stat-mem-1.h: New. * g++.dg/modules/stat-mem-1_a.H: New. * g++.dg/modules/stat-mem-1_b.C: New.