This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH] missed testcase
- From: Nathan Sidwell <nathan at acm dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 31 Oct 2018 13:33:16 -0400
- Subject: [C++ PATCH] missed testcase
I missed committing this testcase with the recent unsorted overload change.
nathan
--
Nathan Sidwell
2018-10-31 Nathan Sidwell <nathan@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
+}