c++: array {}-init [PR105589]
authorJason Merrill <jason@redhat.com>
Fri, 13 May 2022 20:07:10 +0000 (16:07 -0400)
committerJason Merrill <jason@redhat.com>
Sun, 15 May 2022 09:45:06 +0000 (05:45 -0400)
commitce46d6041358052dfa26f3720732f0357c5d72e7
tree3e504b37d2f73d199cf1624a9ddf8daf0a761f13
parentc5397682aff4ae9ced15ddc74971b9b6e218b664
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.
gcc/cp/init.cc
gcc/testsuite/g++.dg/cpp0x/initlist-array16.C [new file with mode: 0644]