https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105589
--- Comment #5 from CVS 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:40f749b364b740f41ea6b211f81c21919a2e8bee commit r12-8380-g40f749b364b740f41ea6b211f81c21919a2e8bee Author: Jason Merrill <ja...@redhat.com> Date: Fri May 13 16:07:10 2022 -0400 c++: array {}-init [PR105589] My patch for 105191 made us use build_value_init more frequently from build_vec_init_expr, but build_value_init doesn't like to be called to initialize a class in a template. That's caused trouble in the past, and seems like a strange restriction, so let's fix it. PR c++/105589 PR c++/105191 PR c++/92385 gcc/cp/ChangeLog: * init.cc (build_value_init): Handle class in template. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist-array16.C: New test.