summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-22 22:24:10 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-22 22:24:10 +0000
commit310a8f0e00f55d8754c761be09d4ef4c06cc185c (patch)
tree43394e2f9aaa9321cb9f210dc364757d54a663ac /gcc/testsuite
parent5f96f54125f3833dc530f0ccb219584969627cf5 (diff)
downloadgcc-310a8f0e00f55d8754c761be09d4ef4c06cc185c.tar.gz
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
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.dg/template/access25.C20
1 files changed, 20 insertions, 0 deletions
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);
+}