c++, coroutines: Partial reversion of r12-8308-g15a176a833f23e [PR105426].
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 28 Apr 2022 19:06:29 +0000 (20:06 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 29 Apr 2022 06:36:26 +0000 (07:36 +0100)
commit3d8d093e820b10a4b4b2af8949a368377c0888cb
treeaed18909cd70650cb669e4e71bd85b9d10e916df
parente27eef7478f30ea79048dbde3317e89679d75a6e
c++, coroutines: Partial reversion of r12-8308-g15a176a833f23e [PR105426].

The changes to fix PR 105287 included a tightening of the constraints on which
variables are promoted to frame copies.  This has exposed that we are failing
to name some variables that should be promoted.

We avoid the use of DECL_UID to build anonymous symbols since that might not
be stable for -fcompare-debug.

The long-term fix is to address the cases where the naming has been missed,
but for the short-term (and for the GCC-12 branch) backing out the additional
constraint is proposed.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR c++/105426

gcc/cp/ChangeLog:

* coroutines.cc (register_local_var_uses): Allow promotion of unnamed
temporaries to coroutine frame copies.
gcc/cp/coroutines.cc