From: Jakub Jelinek Date: Wed, 11 Oct 2017 20:49:46 +0000 (+0200) Subject: re PR c++/80194 (ICE with local constant referenced by a lambda expression) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=666a1c32f57a309a1bcf0d0852ea1770bcdce8c8;p=gcc.git re PR c++/80194 (ICE with local constant referenced by a lambda expression) PR c++/80194 * g++.dg/cpp1y/pr80194.C: New test. From-SVN: r253658 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 71647a87b7a..558d19c2150 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-11 Jakub Jelinek + + PR c++/80194 + * g++.dg/cpp1y/pr80194.C: New test. + 2017-10-11 Qing Zhao PR target/81422 diff --git a/gcc/testsuite/g++.dg/cpp1y/pr80194.C b/gcc/testsuite/g++.dg/cpp1y/pr80194.C new file mode 100644 index 00000000000..2a892c3cf37 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr80194.C @@ -0,0 +1,17 @@ +// PR c++/80194 +// { dg-do compile { target c++14 } } + +int fn1 (); + +template +void +fn2 (Fn &&fn) +{ + fn (42); +} + +void fn2 () +{ + auto const x = fn1 (); + fn2 ([&](auto) { x; }); +}