https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94359

--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
Note1 : the 32b multilib works without any error.

Note2 : The dumps are gimple from symmetric-transfer-00-basic.C.020t.fixup_cfg1
which is the pass after all the coroutine-specific stuff is complete.

thus, For O0 (produces the error saying it can't tail call):

  <bb 25> :
actor.continue.ret:
  actor.continue = VIEW_CONVERT_EXPR<struct coroutine_handle>(D.38505);
  _38 = std::__n4835::coroutine_handle<void>::address (&actor.continue);
  _39 = MEM[(void (*<Te3>) (void *) *)_38];
  _39 (_38); [tail call] [must tail call]
  goto <bb 38>; [INV]

...

  <bb 38> :

  <bb 39> :
  actor.continue = {CLOBBER};

  <bb 40> :
<L55>:
  return;

====

for O2 (execute fails, because without the tail-call we overflow the stack).

  <bb 14> :
actor.continue.ret:
  frame_ptr->__resume_at = 6;
  _22 = &frame_ptr->__lv.1.1.aw;
  D.38734 = Loopy<int>::loopy_awaiter::await_suspend (_22,
frame_ptr->__self_h); [return slot optimization]
  actor.continue = VIEW_CONVERT_EXPR<struct coroutine_handle>(D.38734);
  _38 = std::__n4835::coroutine_handle<void>::address (&actor.continue);
  _39 = MEM[(void (*<Te3>) (void *) *)_38];
  _39 (_38); [tail call]
  goto <bb 21>; [INV]

...

  <bb 21> :
actor.suspend.ret:
<L63>:
  actor.continue = {CLOBBER};
  return;

Reply via email to