[C++ PATCH] missed testcase
authorNathan Sidwell <nathan@acm.org>
Wed, 31 Oct 2018 17:33:59 +0000 (17:33 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 31 Oct 2018 17:33:59 +0000 (17:33 +0000)
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02065.html
* g++.dg/lookup/friend21.C: New.

From-SVN: r265697

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/friend21.C [new file with mode: 0644]

index d6b6780..7ba5ea3 100644 (file)
@@ -1,3 +1,7 @@
+2018-10-31  Nathan Sidwell  <nathan@acm.org>
+
+       * g++.dg/lookup/friend21.C: New.
+
 2018-10-31  Martin Liska  <mliska@suse.cz>
 
        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 (file)
index 0000000..ed02d36
--- /dev/null
@@ -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
+}