re PR c++/82230 (ICE: in tsubst, at cp/pt.c:13686 when binding lambda to variable...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 11 Oct 2017 09:04:29 +0000 (09:04 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 11 Oct 2017 09:04:29 +0000 (09:04 +0000)
2017-10-11  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82230
* g++.dg/cpp1y/lambda-generic-ice8.C: New.

From-SVN: r253631

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

index fef42859f256956fb8926c72f617b5074b3c9cf3..ce4019198fbaae358247f145f39b8cc53c8baab6 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/82230
+       * g++.dg/cpp1y/lambda-generic-ice8.C: New.
+
 2017-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/81299
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice8.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice8.C
new file mode 100644 (file)
index 0000000..a39ce44
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/82230
+// { dg-do compile { target c++14 } }
+
+template <class>
+  struct c
+  {
+    template <class>
+    void f()
+    {
+      [](auto) { auto x = [] {}; }(0);
+    }
+};
+int main()
+{
+  c<int>{}.f<int>();
+}