coroutines: Ensure distinct DTOR trees [PR95137].
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 9 Jun 2020 18:17:14 +0000 (19:17 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 9 Jun 2020 19:52:34 +0000 (20:52 +0100)
commit006f28aefeb3be575239beddc7febe56dff463a2
treece7205dac1694b22b3057ff47a863c35edb530d3
parent62963c60fc19d07615afe9d4f1b897b2f60801b2
coroutines: Ensure distinct DTOR trees [PR95137].

Part of the PR notes that there are UBSAN fails for the coroutines
test suite.  These are primarily related to the use of the same DTOR
tree in the two edges from the await block.  Fixed by building a new
tree for each.

gcc/cp/ChangeLog:

PR c++/95137
* coroutines.cc (expand_one_await_expression): Build separate
DTOR trees for the awaitable object on the destroy and resume
paths.
gcc/cp/coroutines.cc