From: Paolo Carlini Date: Fri, 8 Mar 2019 20:59:39 +0000 (+0000) Subject: re PR c++/22149 (func pointer non-type template parm invalid access control) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8ce2144c15b47eebf9a1e27f9634a814a3bb481;p=gcc.git 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 --- 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; +}