diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d6b6780be13..7ba5ea3c39d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-10-31 Nathan Sidwell + + * g++.dg/lookup/friend21.C: New. + 2018-10-31 Martin Liska PR driver/83193 diff --git a/gcc/testsuite/g++.dg/lookup/friend21.C b/gcc/testsuite/g++.dg/lookup/friend21.C new file mode 100644 index 00000000000..ed02d36d03d --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/friend21.C @@ -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 +}