I missed committing this testcase with the recent unsorted overload change.
nathan -- Nathan Sidwell
2018-10-31 Nathan Sidwell <nat...@acm.org> * g++.dg/lookup/friend21.C: New. Index: testsuite/g++.dg/lookup/friend21.C =================================================================== --- testsuite/g++.dg/lookup/friend21.C (revision 0) +++ testsuite/g++.dg/lookup/friend21.C (working copy) @@ -0,0 +1,14 @@ +// Unhiding a friend erroneously mutated a binding + +class X +{ + friend void frob (int, int); +}; + +void frob (int); +void frob (int, int); + +void foo () +{ + frob (1); // Only saw unhidden friend +}