https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109867
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Arsen Arsenovic <ar...@gcc.gnu.org>: https://gcc.gnu.org/g:ff0cba200af72f2514ebc987a99027f314d4cc99 commit r15-3234-gff0cba200af72f2514ebc987a99027f314d4cc99 Author: Arsen ArsenoviÄ <ar...@aarsen.me> Date: Wed Jul 24 20:43:01 2024 +0200 c++/coroutines: fix actor cases not being added to the current switch [PR109867] Previously, we were building and inserting case_labels manually, which led to them not being added into the currently running switch via c_add_case_label. This led to false diagnostics that the user could not act on. PR c++/109867 gcc/cp/ChangeLog: * coroutines.cc (expand_one_await_expression): Replace uses of build_case_label with finish_case_label. (build_actor_fn): Ditto. (create_anon_label_with_ctx): Remove now-unused function. gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr109867.C: New test. Reviewed-by: Iain Sandoe <i...@sandoe.co.uk>