From: Jakub Jelinek Date: Tue, 10 Oct 2017 20:10:56 +0000 (+0200) Subject: re PR c++/70338 (ICE combining debug symbols, range-for in lambda in function templat... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aaf58ab1739d7d1ca2a6c2e2396d70a2dbfe6f79;p=gcc.git re PR c++/70338 (ICE combining debug symbols, range-for in lambda in function template accessing captured variable-size array) PR c++/70338 * g++.dg/cpp0x/pr70338.C: New test. From-SVN: r253615 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c306573c5e9..43fb756f6ff 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2017-10-10 Jakub Jelinek + PR c++/70338 + * g++.dg/cpp0x/pr70338.C: New test. + PR c++/77786 * g++.dg/cpp1y/pr77786.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr70338.C b/gcc/testsuite/g++.dg/cpp0x/pr70338.C new file mode 100644 index 00000000000..156cb917080 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr70338.C @@ -0,0 +1,17 @@ +// PR c++/70338 +// { dg-do compile { target c++11 } } +// { dg-options "-g" } + +template +void +foo (int x) +{ + T a[x]; + auto b = [&]() { for (auto &c: a) c = 0.; }; +} + +int +main () +{ + foo (3); +}