From: Iain Sandoe Date: Wed, 3 Mar 2021 16:14:24 +0000 (+0000) Subject: coroutines : Add a missed begin/finish else clause to the codegen. X-Git-Tag: releases/gcc-11.3.0~836 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb6101a4eea1881457261b09aa1e00fc6806d145;p=thirdparty%2Fgcc.git coroutines : Add a missed begin/finish else clause to the codegen. Minor code-gen correction. Signed-off-by: Iain Sandoe gcc/cp/ChangeLog: * coroutines.cc (build_actor_fn): Add begin/finish clauses to the initial test in the actor function. (cherry picked from commit 21b4d0ef543d68187d258415b51d0d6676af89fd) --- diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 3fe44e47a3d1..8577320d09b4 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -2332,6 +2332,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); @@ -2369,6 +2370,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);