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

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

https://gcc.gnu.org/g:3003d404b436c2dbd5a3a282c25b797d887237d9

commit r14-11346-g3003d404b436c2dbd5a3a282c25b797d887237d9
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