aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-03-26 20:17:13 +0000
committerIain Sandoe <iain@sandoe.co.uk>2020-03-26 20:31:05 +0000
commit2a1f0f64160e078e23795901ff98575805d6875b (patch)
treed2ed2c50dfb587d54af0b82d5e77399ab986d6b0 /gcc/tree-ssa-propagate.c
parent16948c54b7576fb4b27c59915eac71a0c6bf94f6 (diff)
downloadgcc-2a1f0f64160e078e23795901ff98575805d6875b.zip
gcc-2a1f0f64160e078e23795901ff98575805d6875b.tar.gz
gcc-2a1f0f64160e078e23795901ff98575805d6875b.tar.bz2
coroutines: Implement n4849 changes to exception handling.
The standard now calls up a revised mechanism to handle exceptions where exceptions thrown by the await_resume () method of the initial suspend expression are considered in the same manner as exceptions thrown by the user-authored function body. This implements [dcl.fct.def.coroutine] / 5.3. gcc/cp/ChangeLog: 2020-03-26 Iain Sandoe <iain@sandoe.co.uk> * coroutines.cc (co_await_expander): If we are expanding the initial await expression, set a boolean flag to show that we have now reached the initial await_resume() method call. (expand_co_awaits): Handle the 'initial await resume called' flag. (build_actor_fn): Insert the initial await expression into the start of the user-authored function-body. Handle the 'initial await resume called' flag. (morph_fn_to_coro): Initialise the 'initial await resume called' flag. Modify the unhandled exception catch clause to recognise exceptions that occur before the initial await_resume() and re- throw them. gcc/testsuite/ChangeLog: 2020-03-26 Iain Sandoe <iain@sandoe.co.uk> * g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C: New test.
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
0 files changed, 0 insertions, 0 deletions