re PR c++/22149 (func pointer non-type template parm invalid access control)
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 8 Mar 2019 20:59:39 +0000 (20:59 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 8 Mar 2019 20:59:39 +0000 (20:59 +0000)
2019-03-08  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/22149
* g++.dg/template/access29.C: New.

From-SVN: r269507

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/access29.C [new file with mode: 0644]

index baa3126e6ad82c069eea9834e6be65087d195bd7..f38eb2a5aa783c873cb3b23dc3b853fa1ff53ed2 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/22149
+       * g++.dg/template/access29.C: New.
+
 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
 
        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 (file)
index 0000000..01f1187
--- /dev/null
@@ -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;
+}