https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105795
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:db4243bb681f7d4e82c15674eb3bfd9b82b0cf71 commit r13-962-gdb4243bb681f7d4e82c15674eb3bfd9b82b0cf71 Author: Jason Merrill <ja...@redhat.com> Date: Wed Jun 1 16:13:48 2022 -0400 c++: constexpr empty aggr [PR105795] In this testcase, leaving ctx->ctor pointing to the enclosing object meant that evaluating the initializer for the subobject clobbered previous initializers for the enclosing object. So do update ctx->ctor, just don't add it to the enclosing object ctor. PR c++/105795 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_bare_aggregate): Always call init_subob_ctx. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/constexpr-aggr-base1.C: New test.