https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120453
Iain Sandoe <iains at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2025-05-28 --- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> --- For the reduced test case (with a couple of small tweaks to avoid miscellaneous warnings). * frame #0: 0x0000000102f388b4 cc1plus`error(gmsgid="use of deleted function %qD") at diagnostic-global-context.cc:393:25 frame #1: 0x00000001001d0ce5 cc1plus`mark_used(decl=0x000000010c301800, complain=3) at decl2.cc:6352:9 frame #2: 0x000000010002f37e cc1plus`::build_over_call(cand=0x0000000130008110, flags=5, complain=3) at call.cc:10332:14 frame #3: 0x000000010003786b cc1plus`build_new_method_call(instance=0x0000000108bfb7e0, fns=0x0000000108bfbd80, args=0x000000030b1f8790, conversion_path=0x0000000108a0e820, flags=5, fn_p=0x0000000000000000, complain=3) at call.cc:12188:31 frame #4: 0x0000000100035641 cc1plus`build_special_member_call(instance=0x0000000108bfb7e0, name=0x0000000108a23840, args=0x000000030b1f8790, binfo=0x0000000108a0e820, flags=5, complain=3) at call.cc:11671:31 frame #5: 0x00000001000263b0 cc1plus`::build_temp(expr=0x0000000108bfb7a0, type=0x0000000108bca738, flags=5, diagnostic_kind=0x000000030b1f8960, complain=3) at call.cc:8428:36 frame #6: 0x000000010002a1c7 cc1plus`::convert_like_internal(convs=0x0000000130008040, expr=0x0000000108bfb7a0, fn=0x0000000000000000, argnum=0, issue_conversion_warnings=true, c_cast_p=false, nested_p=false, complain=3) at call.cc:9171:25 frame #7: 0x000000010002af6e cc1plus`::convert_like(convs=0x0000000130008040, expr=0x0000000108bfb7a0, fn=0x0000000000000000, argnum=0, issue_conversion_warnings=true, c_cast_p=false, nested_p=false, complain=3) at call.cc:9416:32 frame #8: 0x000000010002afe4 cc1plus`::convert_like(convs=0x0000000130008040, expr=0x0000000108bfb7a0, complain=3) at call.cc:9429:23 frame #9: 0x000000010003fbb7 cc1plus`perform_implicit_conversion_flags(type=0x0000000108bca738, expr=0x0000000108bfb7a0, complain=3, flags=5) at call.cc:14007:27 frame #10: 0x000000010053f83d cc1plus`convert_for_initialization(exp=0x0000000000000000, type=0x0000000108bca738, rhs=0x0000000108bfb7a0, flags=5, errtype=ICR_RETURN, fndecl=0x0000000000000000, parmnum=0, complain=3) at typeck.cc:10662:46 frame #11: 0x000000010054469f cc1plus`check_return_expr(retval=0x0000000108bfb7a0, no_warning=0x000000030b1f8d67, dangling=0x000000030b1f8d66) at typeck.cc:11477:4 frame #12: 0x000000010049147a cc1plus`finish_return_stmt(expr=0x0000000108bf08e8) at semantics.cc:1588:28 frame #13: 0x00000001000ef16b cc1plus`cp_coroutine_transform::build_ramp_function(this=0x0000000107704aa0) at coroutines.cc:5300:22 ==== but ... 11474 case that functype is smaller than the valtype. */ 11475 if (!converted) 11476 retval = convert_for_initialization -> 11477 (NULL_TREE, functype, retval, flags, ICR_RETURN, NULL_TREE, 0, 11478 tf_warning_or_error); ---- (lldb) p coro_get_ramp_function (current_function_decl) (tree) $3 = nullptr (lldb) p named_return_value_okay_p (bool) $4 = false So something is amiss earlier in the code - we are attempting a conversion which we should not be.