https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109227
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:44868e7298de5048d6f04d7fa098d5bc767c8cb8 commit r14-8437-g44868e7298de5048d6f04d7fa098d5bc767c8cb8 Author: Jason Merrill <[email protected]> Date: Thu Jan 25 14:45:35 2024 -0500 c++: co_await and initializer_list [PR109227] Here we end up with an initializer_list of 'aa', a type with a non-trivial destructor, and need to destroy it. The code called build_special_member_call for cleanups, but that doesn't work for arrays, so use cxx_maybe_build_cleanup instead. Let's go ahead and do that everywhere that has been calling the destructor directly. PR c++/109227 gcc/cp/ChangeLog: * coroutines.cc (build_co_await): Use cxx_maybe_build_cleanup. (build_actor_fn, process_conditional, maybe_promote_temps) (morph_fn_to_coro): Likewise. (expand_one_await_expression): Use build_cleanup. gcc/testsuite/ChangeLog: * g++.dg/coroutines/co-await-initlist2.C: New test.
