Add testcase of PR c++/90338, already fixed in trunk.
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 30 Jan 2020 10:39:04 +0000 (11:39 +0100)
committerPaolo Carlini <paolo.carlini@oracle.com>
Thu, 30 Jan 2020 10:39:04 +0000 (11:39 +0100)
PR c++/90338
* g++.dg/pr90338.C: New.

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

index 842e4198917db7468ce626e045f98dbaf5ab8e6d..597788a80a325b258bf61be2ad619881075320bd 100644 (file)
@@ -1,3 +1,8 @@
+2020-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/90338
+       * g++.dg/pr90338.C: New.
+
 2020-01-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/91824
diff --git a/gcc/testsuite/g++.dg/pr90338.C b/gcc/testsuite/g++.dg/pr90338.C
new file mode 100644 (file)
index 0000000..6944a40
--- /dev/null
@@ -0,0 +1,14 @@
+struct B {
+  B(); // This type is non-literal
+  void func();
+};
+
+template <class Class, void (Class::*Ptr)()>
+void match();
+
+template <class Any, Any Value>
+void match();
+
+void func() {
+  match<B, &B::func>();
+}