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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:c3b0b98b3ba57840ab2cfbc9d44d001c1e9167bf

commit r15-7260-gc3b0b98b3ba57840ab2cfbc9d44d001c1e9167bf
Author: Jason Merrill <ja...@redhat.com>
Date:   Tue Jan 28 13:11:50 2025 -0500

    c++: constexpr VEC_INIT_EXPR [PR118285]

    cxx_eval_vec_init_1 was doing the wrong thing for an array of
    self-referential class type; just evaluating the TARGET_EXPR initializer
    creates a new object that refers to the TARGET_EXPR_SLOT, if we want it to
    refer properly to the initialization target we need to provide it.

            PR c++/118285

    gcc/cp/ChangeLog:

            * constexpr.cc (cxx_eval_vec_init_1): Build INIT_EXPR for
            initializing a class.

    gcc/testsuite/ChangeLog:

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

Reply via email to