-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
https://godbolt.org/z/fcsPfevzW
the code above is from noop_coroutine.
when "coroutine transformation", the code
task<int> v = get_random();
task<int> u = get_random();
std::cout << "in test()\n";
int x = (co_await v + co_await u);transform to
__f->v = get_random();
__f->u = get_random();
std::operator<<(std::cout, "in test()\n");
__f->x = (
/* co_await insights.cpp:103 */
__f->__suspend_103_14 = __f->v.operatorco_await();
if(!__f->__suspend_103_14.await_ready()) {
__builtin_coro_resume(__f->__suspend_103_14.await_suspend(std::coroutine_handle<task<int>::promise_type>::from_address(static_cast<void *>(__f)).operator coroutine_handle()).address());
__f->__suspend_index = 2;
return;
}
__resume_test_2:
__f->__suspend_103_14_res = __f->__suspend_103_14.await_resume();
/* co_await insights.cpp:103 */
__f->__suspend_103_27 = __f->u.operator co_await();
if(!__f->__suspend_103_27.await_ready()) {
__builtin_coro_resume(__f->__suspend_103_27.await_suspend(std::coroutine_handle<task<int>::promise_type>::from_address(static_cast<void *>(__f)).operator coroutine_handle()).address());
__f->__suspend_index = 3;
return;
}
__resume_test_3:
__f->__suspend_103_27_res = __f->__suspend_103_27.await_resume();
);the transform code __f->x = not grammatical.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working