re PR c++/62155 (ICE in tsubst_copy, at cp/pt.c:12544)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 23 Sep 2014 08:09:14 +0000 (08:09 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 23 Sep 2014 08:09:14 +0000 (08:09 +0000)
2014-09-23  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/62155
* g++.dg/cpp0x/lambda/lambda-62155.C: New.

From-SVN: r215497

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-62155.C [new file with mode: 0644]

index 08ba76443b12a4b852bca7084ed205bcf8ae5e09..ff5c5064a63b019737f0abea434c02f2e1bcdfb9 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-23  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/62155
+       * g++.dg/cpp0x/lambda/lambda-62155.C: New.
+
 2014-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/62219
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-62155.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-62155.C
new file mode 100644 (file)
index 0000000..76eb2da
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/62155
+// { dg-do compile { target c++11 } } 
+
+template <typename T> struct S { // { dg-error "cannot convert" }
+  T i{[this] {}};
+};
+
+S<int> s;                        // { dg-error "cannot convert" }