diff options
author | Jason Merrill <jason@redhat.com> | 2024-01-25 14:45:35 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2024-01-25 15:22:32 -0500 |
commit | 44868e7298de5048d6f04d7fa098d5bc767c8cb8 (patch) | |
tree | e1a48f2d8d563113d1c9d54114d1f3e76fd2e8e5 /gcc/cp/module.cc | |
parent | f03b8f595b6350732bb0a9a69557c5ed2af085b2 (diff) | |
download | gcc-44868e7298de5048d6f04d7fa098d5bc767c8cb8.zip gcc-44868e7298de5048d6f04d7fa098d5bc767c8cb8.tar.gz gcc-44868e7298de5048d6f04d7fa098d5bc767c8cb8.tar.bz2 |
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.
Diffstat (limited to 'gcc/cp/module.cc')
0 files changed, 0 insertions, 0 deletions