re PR c++/70343 (internal compiler error: in tsubst_copy, wrong code with lambda...
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 3 Oct 2017 21:15:56 +0000 (21:15 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 3 Oct 2017 21:15:56 +0000 (21:15 +0000)
2017-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

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

From-SVN: r253388

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

index c5aec6ef5649109640bff3e2656ad8b845daaaad..49cd60eb059c28a50c2202c22d0a4d09d7876238 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-03  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/70343
+       * g++.dg/cpp0x/lambda/lambda-70343.C: New.
+
 2017-10-03  Jeff Law  <law@redhat.com>
 
        PR target/82358
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70343.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70343.C
new file mode 100644 (file)
index 0000000..209e207
--- /dev/null
@@ -0,0 +1,24 @@
+// PR c++/70343
+// { dg-do run { target c++11 } }
+
+struct Empty{};
+
+template<class T>
+struct Data{
+    int x;
+    float y;
+
+    int properties_parcel4[10];
+
+    Empty j = [&](){
+               int i = 10;
+                properties_parcel4[0] = i;
+               return Empty();
+    }();
+};
+
+int main () {
+    Data<int> k;
+
+  return 0;
+}