https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105795
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:340c53bc6352d223f543faac71996a3fa87d9119 commit r11-10046-g340c53bc6352d223f543faac71996a3fa87d9119 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.c (cxx_eval_bare_aggregate): Always call init_subob_ctx. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/constexpr-aggr-base1.C: New test.