coroutines : Add a missed begin/finish else clause to the codegen.

Minor code-gen correction.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

gcc/cp/ChangeLog:

	* coroutines.cc (build_actor_fn): Add begin/finish clauses
	to the initial test in the actor function.
This commit is contained in:
Iain Sandoe 2021-03-03 16:14:24 +00:00
parent 8406ed9af2
commit 21b4d0ef54

View file

@ -2331,6 +2331,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody,
finish_switch_stmt (destroy_dispatcher);
finish_then_clause (lsb_if);
begin_else_clause (lsb_if);
tree dispatcher = begin_switch_stmt ();
finish_switch_cond (rat, dispatcher);
@ -2368,6 +2369,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody,
/* Insert the prototype dispatcher. */
finish_switch_stmt (dispatcher);
finish_else_clause (lsb_if);
finish_if_stmt (lsb_if);