Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-06 Thread Jakub Jelinek
On Thu, Feb 06, 2020 at 10:38:25AM -0500, Jason Merrill wrote: > > I don't know, can try to add some instrumentation and do bootstrap/regtest > > with it. The handling of the CONSTRUCTORs with missing or present or mixed > > indexes is what I found in various middle-end routines. > > The only thin

Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-06 Thread Jason Merrill
On Thu, Feb 6, 2020 at 7:02 AM Jakub Jelinek wrote: > On Wed, Feb 05, 2020 at 01:31:30PM -0500, Jason Merrill wrote: > > > from the constexpr new change apparently broke the following testcase. > > > When handling COND_EXPR, we build_vector_from_val, however as the > argument we > > > pass to it

Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-06 Thread Richard Biener
On Thu, 6 Feb 2020, Jakub Jelinek wrote: > On Wed, Feb 05, 2020 at 01:31:30PM -0500, Jason Merrill wrote: > > > from the constexpr new change apparently broke the following testcase. > > > When handling COND_EXPR, we build_vector_from_val, however as the > > > argument we > > > pass to it is not

Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-06 Thread Jakub Jelinek
On Wed, Feb 05, 2020 at 01:31:30PM -0500, Jason Merrill wrote: > > from the constexpr new change apparently broke the following testcase. > > When handling COND_EXPR, we build_vector_from_val, however as the argument > > we > > pass to it is not an INTEGER_CST/REAL_CST, but that wrapped in a > > N

Re: [PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-05 Thread Jason Merrill
On 2/4/20 4:20 AM, Jakub Jelinek wrote: Hi! My change * typeck2.c (store_init_value): Don't call cp_fully_fold_init on initializers of automatic non-constexpr variables in constexpr functions. - value = cp_fully_fold_init (value); + /* Don't fold initializers of automatic variables in constexp

[PATCH] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-04 Thread Jakub Jelinek
Hi! My change * typeck2.c (store_init_value): Don't call cp_fully_fold_init on initializers of automatic non-constexpr variables in constexpr functions. - value = cp_fully_fold_init (value); + /* Don't fold initializers of automatic variables in constexpr functions, + that might fold away so