https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110463
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:fd8a1be04d4cdbfefea457b99ed8404d77b35dd6 commit r14-2198-gfd8a1be04d4cdbfefea457b99ed8404d77b35dd6 Author: Patrick Palka <ppa...@redhat.com> Date: Thu Jun 29 16:02:04 2023 -0400 c++: unpropagated CONSTRUCTOR_MUTABLE_POISON [PR110463] Here we're incorrectly accepting the mutable member accesses because cp_fold neglects to propagate CONSTRUCTOR_MUTABLE_POISON when folding a CONSTRUCTOR. PR c++/110463 gcc/cp/ChangeLog: * cp-gimplify.cc (cp_fold) <case CONSTRUCTOR>: Propagate CONSTRUCTOR_MUTABLE_POISON. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-mutable6.C: New test.