https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117364
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Known to work| |15.0
Summary|[12/13/14/15 Regression] |[12/13/14 Regression]
|[coroutines] Use of |[coroutines] Use of
|<retval> triggers an ICE on |<retval> triggers an ICE on
|sparc |sparc
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for GCC 15 so far. The ramp generation is completely different in
earlier versions, the code that would need to change in 14 and below is in
morph_fn_to_coro:
/* [dcl.fct.def.coroutine] / 7
The expression promise.get_return_object() is used to initialize the
glvalue result or... (see below)
Construct the return result directly. */
if (type_build_ctor_call (gro_type))
{
vec<tree, va_gc> *arg = make_tree_vector_single (get_ro);
r = build_special_member_call (DECL_RESULT (orig),
complete_ctor_identifier,
&arg, gro_type, LOOKUP_NORMAL,
tf_warning_or_error);
release_tree_vector (arg);
}
else
r = cp_build_init_expr (fn_start, DECL_RESULT (orig), get_ro);