c++: dependent array bounds completion [PR104302]
The patch for PR55227 changed the minimal init-list handling in
cp_complete_array_type to a call to reshape_init, which broke on the
dependent initializer. It occurred to me that trying to deduce the array
size from a dependent init-list is wrong in general, so let's just not. I
also limited the reshape_init call to the case of a char array, as before
the patch for 55227; that's the only case where we want to strip a level of
braces from an array.
PR c++/104302
gcc/cp/ChangeLog:
* decl.cc (maybe_deduce_size_from_array_init): Give up
on type-dependent init.
(cp_complete_array_type): Only call reshape_init for character
array.
gcc/testsuite/ChangeLog:
* g++.dg/template/array35.C: New test.
* g++.dg/template/array36.C: New test.