From d459595b53c202a428ccc83448b8aa6ae9fcf876 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 31 Oct 2018 17:33:59 +0000 Subject: [PATCH] [C++ PATCH] missed testcase https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02065.html * g++.dg/lookup/friend21.C: New. From-SVN: r265697 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/lookup/friend21.C | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 gcc/testsuite/g++.dg/lookup/friend21.C 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 +} -- 2.30.2