gnu/gcc/bedbcdfd9ab9ff86de96a6338d8eec6bb31ccd22 c++: assignment from {} with array member NSDMI [PR127016]
can_convert_array only accepts a CONSTRUCTOR or a string literal as a valid
way to aggregate initialize an array. When the element type needs a loop to
initialize, the digested NSDMI of an array member is a VEC_INIT_EXPR
instead, so we returned false and discarded the implicit assignment
operators as non-viable. Look through it to VEC_INIT_EXPR_INIT.
PR c++/127016
gcc/cp/ChangeLog:
* call.cc (can_convert_array): Handle a VEC_INIT_EXPR FROM.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/initlist-array26.C: New test.
Signed-off-by: Sebastian Miles <sebastianmiles20@gmail.com>
2 files changed