Re: C++ PATCH for c++/84578, ICE when initializing flexarr

2018-03-02 Thread Jason Merrill
OK. On Fri, Mar 2, 2018 at 12:36 PM, Marek Polacek wrote: > We ICE in cxx_eval_vec_init_1 whereby we try to initialize a flexible array > member, because the code computing the number of elements of ATYPE wasn't > prepared to handle arrays with no bounds. Fixed by using > get_array_or_vector_nel

C++ PATCH for c++/84578, ICE when initializing flexarr

2018-03-02 Thread Marek Polacek
We ICE in cxx_eval_vec_init_1 whereby we try to initialize a flexible array member, because the code computing the number of elements of ATYPE wasn't prepared to handle arrays with no bounds. Fixed by using get_array_or_vector_nelts, broken out of existing code. Martin suggested to reject this co