https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103912
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-01-05
Status|UNCONFIRMED |NEW
Summary|ICE in a consteval function |ICE in a consteval function
|in cp_gimplify_expr, at |which returns a lambda
|cp/cp-gimplify.c:557 |which takes a "non-POD"
| |argument and the consteval
| |has other code
Blocks| |54367
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed reduced testcase:
struct f{f();};
consteval auto MakeHash ()
{
if (1) ;
return [] (f str) { };
}
void bar(f arg)
{
auto hash = MakeHash ();
hash(arg);
}
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54367
[Bug 54367] [meta-bug] lambda expressions