From 310a8f0e00f55d8754c761be09d4ef4c06cc185c Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 22 Feb 2013 22:24:10 +0000 Subject: PR c++/56359 * call.c (can_convert_arg): Discard access checks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196229 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/g++.dg/template/access25.C | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/access25.C (limited to 'gcc/testsuite') diff --git a/gcc/testsuite/g++.dg/template/access25.C b/gcc/testsuite/g++.dg/template/access25.C new file mode 100644 index 00000000000..e882a7099d9 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/access25.C @@ -0,0 +1,20 @@ +// PR c++/56359 + +typedef int (*InvocationCallback) (const int &); + +template < typename target_t > +void SetPrototypeMethod (target_t, const char *, InvocationCallback); + +class A +{ + void Initialize (); +protected: + static int Stop (const int &); + void Stop (); // comment out to make the bug disappear. +}; + +void +A::Initialize () +{ + SetPrototypeMethod (0, "stop", A::Stop); +} -- cgit v1.2.1