2017-10-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/69078
* g++.dg/cpp1y/lambda-generic-69078-1.C: New.
* g++.dg/cpp1y/lambda-generic-69078-2.C: Likewise.
From-SVN: r253736
+2017-10-13 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/69078
+ * g++.dg/cpp1y/lambda-generic-69078-1.C: New.
+ * g++.dg/cpp1y/lambda-generic-69078-2.C: Likewise.
+
2017-10-13 Jakub Jelinek <jakub@redhat.com>
PR target/82274
--- /dev/null
+// PR c++/69078
+// { dg-do run { target c++14 } }
+// { dg-options "-Wall" }
+
+#include <cassert>
+
+struct Class {
+ Class(void (*_param)()) : data(_param) {}
+ void (*data)();
+};
+
+void funUser(void (*test)(int)) {
+ test(60);
+}
+
+void user(Class& c, int i) {
+ (void)i;
+ assert (c.data);
+}
+
+void probe() {}
+
+int main() {
+ static Class instance = { probe };
+ funUser([](auto... p) {
+ user(instance, p...);
+ });
+}
--- /dev/null
+// PR c++/69078
+// { dg-do run { target c++14 } }
+
+#include <cassert>
+
+template<typename F>
+void run( F &&f ) {
+ f(nullptr);
+}
+
+struct V {
+ int i;
+};
+
+int main() {
+ static V const s={2};
+ assert (s.i == 2);
+ run([](auto){
+ assert (s.i == 2);
+ });
+}