diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2024-08-17 12:49:41 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2024-08-24 19:53:30 +0100 |
commit | efc99ab2d5fdb7f2a942199b0e5b16e1e2bb8c27 (patch) | |
tree | f63ea0ace7936906b59e982c4ceb5b5cd07909a8 /gcc/dwarf2codeview.cc | |
parent | 624fb5b4407b4b9c23ca813a49b928d650d52480 (diff) | |
download | gcc-efc99ab2d5fdb7f2a942199b0e5b16e1e2bb8c27.zip gcc-efc99ab2d5fdb7f2a942199b0e5b16e1e2bb8c27.tar.gz gcc-efc99ab2d5fdb7f2a942199b0e5b16e1e2bb8c27.tar.bz2 |
c++, coroutines: Fix handling of early exceptions [PR113773].
The responsibility for destroying part of the frame content (promise,
arg copies and the frame itself) transitions from the ramp to the
body of the coroutine once we reach the await_resume () for the
initial suspend.
We added the variable that flags the transition, but failed to act on
it. This corrects that so that the ramp only tries to run DTORs for
objects when an exception occurs before the initial suspend await
resume has started.
PR c++/113773
gcc/cp/ChangeLog:
* coroutines.cc
(cp_coroutine_transform::build_ramp_function): Only cleanup the
frame state on exceptions that occur before the initial await
resume has begun.
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/torture/pr113773.C: New test.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
Diffstat (limited to 'gcc/dwarf2codeview.cc')
0 files changed, 0 insertions, 0 deletions