aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-04-14 20:37:12 +0100
committerIain Sandoe <iain@sandoe.co.uk>2020-04-14 20:44:01 +0100
commita126a1577ffcbf62d97723b35d343bdff014bb40 (patch)
treeb46f6c8e2e85b8ec56e92db98944b333edbd04ac /gcc/c/c-parser.c
parentfa9a57ed91deb57d43fc25891d88867258e06795 (diff)
downloadgcc-a126a1577ffcbf62d97723b35d343bdff014bb40.zip
gcc-a126a1577ffcbf62d97723b35d343bdff014bb40.tar.gz
gcc-a126a1577ffcbf62d97723b35d343bdff014bb40.tar.bz2
coroutines: Fix compile error with symmetric transfers [PR94359]
For symmetric transfers to work with C++20 coroutines, it is currently necessary to tail call the callee coroutine from resume method of the caller coroutine. The current codegen marks these resume calls as "MUST_TAIL_CALL" to indicate that the tail call is required for correctness. Unfortunately, several targets have ABI constraints that prevent an indirect tail-call, which results in the PRs compile error. The change here tests the target sibcall hook for the resume expression and only marks it as requiring a tail call if that's supported. This doesn't fix the underlying problem; that really a solution is needed to allow the tail-calls (or equivalent) to take place - but that will be deferred until next stage 1. gcc/cp/ChangeLog: 2020-04-14 Iain Sandoe <iain@sandoe.co.uk> PR c++/94359 * coroutines.cc (build_actor_fn): Check that the target can support the resume tailcall before mandating it. gcc/testsuite/ChangeLog: 2020-04-14 Iain Sandoe <iain@sandoe.co.uk> PR c++/94359 * g++.dg/coroutines/torture/symmetric-transfer-00-basic.C: Expect a run fail for targets without arbitrary indirect tail-calls.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions