https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94568
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:352c21c8a22a48d34cbd2fbfe398ee12c0a1d681 commit r15-2759-g352c21c8a22a48d34cbd2fbfe398ee12c0a1d681 Author: Jason Merrill <ja...@redhat.com> Date: Mon Aug 5 15:04:05 2024 -0400 c++: zero-init and class nttp [PR94568] A zero-initializer should not reflect the constness of what it's initializing, as it does not for initializers with different syntax. This does have mangling implications for rare C++20 code, but it seems infeasable to make the mangling depend on -fabi-version while fixing the semantic bug, and C++20 is still experimental anyway. PR c++/94568 gcc/cp/ChangeLog: * init.cc (build_zero_init_1): Call cv_unqualified. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nontype-class36.C: Remove xfail. * g++.dg/cpp2a/nontype-class37.C: Remove xfail. * g++.dg/cpp1z/nontype-auto26.C: New test.