This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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
+}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]