https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111286
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:3add6b9ceefe37faac82e2d24b11c6f45e630877 commit r12-10135-g3add6b9ceefe37faac82e2d24b11c6f45e630877 Author: Jason Merrill <ja...@redhat.com> Date: Mon Feb 5 13:54:22 2024 -0500 c++: prvalue of array type [PR111286] Here we want to build a prvalue array to bind to the T reference, but we were wrongly trying to strip cv-quals from the array prvalue, which should be treated the same as a class prvalue. PR c++/111286 gcc/cp/ChangeLog: * tree.cc (rvalue): Don't drop cv-quals from an array. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist-array22.C: New test. (cherry picked from commit c7e8381748f78335e9fef23f363b6a9e4463ce7e)