https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127016

--- Comment #1 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:bedbcdfd9ab9ff86de96a6338d8eec6bb31ccd22

commit r17-3660-gbedbcdfd9ab9ff86de96a6338d8eec6bb31ccd22
Author: Sebastian Miles <[email protected]>
Date:   Sun Aug 23 23:57:38 2026 +0200

    c++: assignment from {} with array member NSDMI [PR127016]

    can_convert_array only accepts a CONSTRUCTOR or a string literal as a valid
    way to aggregate initialize an array.  When the element type needs a loop
to
    initialize, the digested NSDMI of an array member is a VEC_INIT_EXPR
    instead, so we returned false and discarded the implicit assignment
    operators as non-viable.  Look through it to VEC_INIT_EXPR_INIT.

            PR c++/127016

    gcc/cp/ChangeLog:

            * call.cc (can_convert_array): Handle a VEC_INIT_EXPR FROM.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/initlist-array26.C: New test.

    Signed-off-by: Sebastian Miles <[email protected]>

Reply via email to