From: Paolo Carlini Date: Tue, 10 Oct 2017 20:16:40 +0000 (+0000) Subject: re PR c++/81032 (ICE with lambda and broken constexpr) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92395f1c2473db7898ca06fa9b17f144564554df;p=gcc.git re PR c++/81032 (ICE with lambda and broken constexpr) 2017-10-10 Paolo Carlini PR c++/81032 * g++.dg/cpp1y/lambda-generic-ice6.C: New. From-SVN: r253619 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0eadf82a31d..14c2a5ad907 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-10 Paolo Carlini + + PR c++/81032 + * g++.dg/cpp1y/lambda-generic-ice6.C: New. + 2017-10-10 Jakub Jelinek PR rtl-optimization/68205 diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice6.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice6.C new file mode 100644 index 00000000000..6851afc860e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice6.C @@ -0,0 +1,13 @@ +// PR c++/81032 +// { dg-do compile { target c++14 } } + +template constexpr void foo(T t) +{ + constexpr int i = t; // { dg-error "constant" } + [=](auto){ return i; }(0); +} + +void bar() +{ + foo(0); +}