https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118574
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, even just
foo ({});
outside of range-for has its temporaries without pushdecl.
const struct D D.2692;
...
try
{
D::D (&D.2692);
try
{
D.2693 = foo (&D.2692); [return slot optimization]
A::~A (&D.2693);
}
finally
{
D::~D (&D.2692);
}
}
finally
{
D.2692 = {CLOBBER(eos)};
}
Guess for coro that would be about co_await qux ({}); or similar for qux with
const D & operand.
But in the range-for case, the lifetime of those temporaries doesn't end at the
end of the statement but is until the end of the range for body.