From: Paolo Carlini Date: Tue, 3 Oct 2017 21:15:56 +0000 (+0000) Subject: re PR c++/70343 (internal compiler error: in tsubst_copy, wrong code with lambda... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5bd8ff41eb22a555f751334864a68d100688b0f3;p=gcc.git re PR c++/70343 (internal compiler error: in tsubst_copy, wrong code with lambda in template fn) 2017-10-03 Paolo Carlini PR c++/70343 * g++.dg/cpp0x/lambda/lambda-70343.C: New. From-SVN: r253388 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c5aec6ef564..49cd60eb059 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-03 Paolo Carlini + + PR c++/70343 + * g++.dg/cpp0x/lambda/lambda-70343.C: New. + 2017-10-03 Jeff Law 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 index 00000000000..209e207a044 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70343.C @@ -0,0 +1,24 @@ +// PR c++/70343 +// { dg-do run { target c++11 } } + +struct Empty{}; + +template +struct Data{ + int x; + float y; + + int properties_parcel4[10]; + + Empty j = [&](){ + int i = 10; + properties_parcel4[0] = i; + return Empty(); + }(); +}; + +int main () { + Data k; + + return 0; +}