Skip to content

Coroutine transformation does not handle symetric transfer #739

Description

@ARG-Helper

https://compiler-explorer.com/z/TPjEdMWxn transforms into https://compiler-explorer.com/z/o11zKTWKj

the first produces the output:

foo start
bar start

the second produces the output:

foo start
if(__f->__suspend_39_14.await_suspend(std::coroutine_handle<Task::promise_type>::from_address(static_cast<void *>(__f)).operator std::coroutine_handle<void>()).address()) {
        return;
      } 

should be

return __f->__suspend_39_14.await_suspend(std::coroutine_handle<Task::promise_type>::from_address(static_cast<void *>(__f)).operator std::coroutine_handle<void>()).resume();//should preform tail-call-optimisation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions