From a8ce2144c15b47eebf9a1e27f9634a814a3bb481 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 8 Mar 2019 20:59:39 +0000 Subject: [PATCH] re PR c++/22149 (func pointer non-type template parm invalid access control) 2019-03-08 Paolo Carlini PR c++/22149 * g++.dg/template/access29.C: New. From-SVN: r269507 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/access29.C | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/access29.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index baa3126e6ad..f38eb2a5aa7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-08 Paolo Carlini + + PR c++/22149 + * g++.dg/template/access29.C: New. + 2019-03-08 Jakub Jelinek PR c++/82075 diff --git a/gcc/testsuite/g++.dg/template/access29.C b/gcc/testsuite/g++.dg/template/access29.C new file mode 100644 index 00000000000..01f1187cde1 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/access29.C @@ -0,0 +1,22 @@ +// PR c++/22149 + +template < void (*FOOBAR) () > +class foo { +public: + foo () { (*FOOBAR) (); } +}; + +class bar { +public: + bar () { foo < bar::foobar > tmp; } +private: + static void foobar () + { + } +}; + +int +main () +{ + bar b; +} -- 2.30.2