coroutines, ensure placeholder var is properly declared.
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 7 Apr 2020 14:03:21 +0000 (15:03 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 7 Apr 2020 15:30:30 +0000 (16:30 +0100)
commit89b01e86ff8521a0decf292595089e5631cc9320
tree172b02ed153431332d9aca9e62c3e4fba4875e1e
parent6a90680bfff0a3803b3dc950c847046abb2d7d54
coroutines, ensure placeholder var is properly declared.

In cases that we need to extended the lifetime of a temporary captured
by reference, we make a replacement var for the temporary.  This will
be then used to define a coroutine frame entry (so that the var created
is elided by a later phase).  However, we should ensure that the var
is correctly declared anyway.

gcc/cp/ChangeLog:

2020-04-07  Iain Sandoe  <iain@sandoe.co.uk>

* coroutines.cc (maybe_promote_captured_temps): Ensure that
reference capture placeholder vars are properly declared.
gcc/cp/ChangeLog
gcc/cp/coroutines.cc