aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2codeview.cc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2024-08-18 22:54:50 +0100
committerIain Sandoe <iain@sandoe.co.uk>2024-08-24 19:55:53 +0100
commitf0315f7a325ffccb446fe378fcdfccda6eead8ba (patch)
tree9bc6e352f211e041f99c62ff939a3494b81a2f14 /gcc/dwarf2codeview.cc
parent68ee624bc52ba1154040a904db56dd2f9c3af1f6 (diff)
downloadgcc-f0315f7a325ffccb446fe378fcdfccda6eead8ba.zip
gcc-f0315f7a325ffccb446fe378fcdfccda6eead8ba.tar.gz
gcc-f0315f7a325ffccb446fe378fcdfccda6eead8ba.tar.bz2
c++, coroutines: Rework handling of throwing_cleanups [PR102051].
In the fix for PR95822 (r11-7402) we set throwing_cleanup false in the top level of the coroutine transform code. However, as the current PR shows, that is not sufficient. Any use of cxx_maybe_build_cleanup() can reset the flag, which causes the check_return_expr () logic to try to add a guard variable and set it. For the coroutine code, we need to handle the cleanups separately, since the responsibility for them changes after the first resume point, which we handle in the ramp exception processing. Fix this by forcing the "throwing_cleanup" flag false right before the processing of the return expression. PR c++/102051 gcc/cp/ChangeLog: * coroutines.cc (cp_coroutine_transform::build_ramp_function): Handle "throwing_cleanup" here instead of ... (cp_coroutine_transform::apply_transforms): ... here. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr102051.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