https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117827
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 60249 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60249&action=edit gcc15-pr117827.patch With this updated version even those seems to work. There is a difference between build_vec_init e.g. for an automatic array, in that case build_vec_init needs to ensure destruction of the array elements at the end of the scope, and build_vec_init for new expression, there such destruction is needed if something throws during the construction (i.e. from code emitted by build_vec_init) but is incorrect once it successfully completes - it is up to the user to delete the pointer afterwards manually which destructs the array elements.