2018-02-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/77522
* g++.dg/cpp1y/lambda-init16.C: New.
From-SVN: r257521
+2018-02-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/77522
+ * g++.dg/cpp1y/lambda-init16.C: New.
+
2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/sso8.adb: New test.
--- /dev/null
+// PR c++/77522
+// { dg-do compile { target c++14 } }
+
+template < class T = int > void f (T)
+{
+ auto g = [&a = f] () {}; // { dg-error "invalid initialization" }
+}
+
+int main ()
+{
+ f (0);
+ return 0;
+}