From: Jakub Jelinek Date: Wed, 11 Oct 2017 20:50:07 +0000 (+0200) Subject: re PR c++/78523 (ICE on valid lambda code with implicit capture) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fbb0add7c6d5de5162c9829c2aa17c1cf958a891;p=gcc.git re PR c++/78523 (ICE on valid lambda code with implicit capture) PR c++/78523 * g++.dg/cpp1y/pr78523.C: New test. From-SVN: r253659 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 558d19c2150..4d08108323d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2017-10-11 Jakub Jelinek + PR c++/78523 + * g++.dg/cpp1y/pr78523.C: New test. + PR c++/80194 * g++.dg/cpp1y/pr80194.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp1y/pr78523.C b/gcc/testsuite/g++.dg/cpp1y/pr78523.C new file mode 100644 index 00000000000..31e0cc886fa --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr78523.C @@ -0,0 +1,12 @@ +// PR c++/78523 +// { dg-do compile { target c++14 } } + +int bar (); + +void +foo () +{ + const int t = bar (); + auto f = [=] (auto x) { return t; }; + f (0); +}