https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110102
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:be1e122bd20c17aa0b57fc40cbd64f9e9a889aa2 commit r13-7471-gbe1e122bd20c17aa0b57fc40cbd64f9e9a889aa2 Author: Jason Merrill <ja...@redhat.com> Date: Thu Jun 8 16:21:38 2023 -0400 c++: init-list of uncopyable type [PR110102] The maybe_init_list_as_range optimization is a form of copy elision, but we can only elide well-formed copies. PR c++/110102 gcc/cp/ChangeLog: * call.cc (maybe_init_list_as_array): Check that the element type is copyable. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist-opt1.C: New test.