2017-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/78816
* g++.dg/cpp1y/lambda-generic-variadic6.C: New.
From-SVN: r253397
+2017-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/78816
+ * g++.dg/cpp1y/lambda-generic-variadic6.C: New.
+
2017-10-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/82374
--- /dev/null
+// PR c++/78816
+// { dg-do compile { target c++14 } }
+
+void f(void (*f1)(int)) {
+ f1(42);
+}
+
+template <typename Lambda>
+static auto callback(Lambda &&l)
+{
+ static auto* p = &l;
+ p = &l;
+ return [](auto... x){ return (*p)(x...); };
+}
+
+int main() {
+ int x = 5;
+ f(callback([=](int y){}));
+}