c++: Tweak PR101029 fix
authorJason Merrill <jason@redhat.com>
Wed, 16 Jun 2021 21:42:15 +0000 (17:42 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 17 Jun 2021 03:38:32 +0000 (23:38 -0400)
commitff4deb4b1d0c5947669ddc76fde4db83e28009d8
tree922618349cebb30488c529380f2d3c59318181a3
parent9a61dfdb5ecb58bc4caea1c11e017d93bdd1d9a5
c++: Tweak PR101029 fix

The case of an initializer with side effects for a zero-length array seems
extremely unlikely, but we should still return the right type in that case.

PR c++/101029

gcc/cp/ChangeLog:

* init.c (build_vec_init): Preserve the type of base.
gcc/cp/init.c