https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110463
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:8f2cafc03f645748109291710157fdeceac32ee1 commit r13-7516-g8f2cafc03f645748109291710157fdeceac32ee1 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. (cherry picked from commit fd8a1be04d4cdbfefea457b99ed8404d77b35dd6)