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

Arsen Arsenović <arsen at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arsen at gcc dot gnu.org

--- Comment #2 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
this is because the '(auto)' template parameter suppresses CO_AWAIT expansion,
so we enter the following block in coroutine.cc:finish_co_await_expr


  /* Defer expansion when we are processing a template.
     FIXME: If the coroutine function's type is not dependent, and the operand
     is not dependent, we should determine the type of the co_await expression
     using the DEPENDENT_EXPR wrapper machinery.  That allows us to determine
     the subexpression type, but leave its operand unchanged and then
     instantiate it later.  */
  if (processing_template_decl)
    {
      tree aw_expr = build5_loc (kw, CO_AWAIT_EXPR, unknown_type_node, expr,
                                 NULL_TREE, NULL_TREE, NULL_TREE,
                                 integer_zero_node);
      TREE_SIDE_EFFECTS (aw_expr) = true;
      return aw_expr;
    }

... which sets the type of the co_await to the unknown type

Reply via email to