Add testcase of PR c++/90448, already fixed in trunk.
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 22 Apr 2020 16:05:18 +0000 (18:05 +0200)
committerPaolo Carlini <paolo.carlini@oracle.com>
Wed, 22 Apr 2020 16:05:18 +0000 (18:05 +0200)
PR c++/90448
* g++.dg/cpp1y/lambda-generic-variadic20.C: New.

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic20.C [new file with mode: 0644]

index e60da71c99cd453fc1c2cb5599563ccb8fba2c22..f6dd7ac677775e2236739ec514096ce4912fda71 100644 (file)
@@ -1,3 +1,8 @@
+2020-04-22  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/90448
+       * g++.dg/cpp1y/lambda-generic-variadic20.C: New.
+
 2020-04-22  Martin Sebor  <msebor@redhat.com>
 
        PR middle-end/94647
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic20.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic20.C
new file mode 100644 (file)
index 0000000..3af971b
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/90448
+// { dg-do compile { target c++14 } }
+
+template<class ... Ts> int fooV(Ts ... ts) {
+  auto L = [](auto ... a) {
+    auto M = [](decltype(a) ... b) -> void {
+    };
+    return M;
+  };
+
+  decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L;
+
+  return 0;
+}
+
+int run2 = fooV("BC", 3, 2.77, 'A', float{}, short{}, unsigned{});