Skip to content
Snippets Groups Projects
Unverified Commit ff0cba20 authored by Arsen Arsenović's avatar Arsen Arsenović Committed by Arsen Arsenović
Browse files

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: default avatarIain Sandoe <iain@sandoe.co.uk>
parent a83e519a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment