mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 17:21:03 +08:00
re PR c++/81032 (ICE with lambda and broken constexpr)
2017-10-10 Paolo Carlini <paolo.carlini@oracle.com> PR c++/81032 * g++.dg/cpp1y/lambda-generic-ice6.C: New. From-SVN: r253619
This commit is contained in:
parent
16d926d2ab
commit
92395f1c24
@ -1,3 +1,8 @@
|
||||
2017-10-10 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/81032
|
||||
* g++.dg/cpp1y/lambda-generic-ice6.C: New.
|
||||
|
||||
2017-10-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/68205
|
||||
|
13
gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice6.C
Normal file
13
gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice6.C
Normal file
@ -0,0 +1,13 @@
|
||||
// PR c++/81032
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
template<typename T> constexpr void foo(T t)
|
||||
{
|
||||
constexpr int i = t; // { dg-error "constant" }
|
||||
[=](auto){ return i; }(0);
|
||||
}
|
||||
|
||||
void bar()
|
||||
{
|
||||
foo(0);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user