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 16:29:04 +0000 (12:29 -0400)
commit40f749b364b740f41ea6b211f81c21919a2e8bee
tree69cd2201171faa70ad1522e6dd76c9149ab00865
parent73b47159d7811cf1d7aaaf78dbdd141161b93ca3
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]