Re: [C++ PATCH] Fix ICE in build_ctor_subob_ref during replace_placeholders (PR c++/92524, take 2)

2019-11-26 Thread Jason Merrill
On 11/26/19 6:42 PM, Jakub Jelinek wrote: On Tue, Nov 26, 2019 at 04:58:01PM -0500, Jason Merrill wrote: Hmm, we shouldn't have any PLACEHOLDER_EXPR under a RANGE_EXPR; if we did, any references to its address would end up all referring to the first element of the range, which would be wrong.

[C++ PATCH] Fix ICE in build_ctor_subob_ref during replace_placeholders (PR c++/92524, take 2)

2019-11-26 Thread Jakub Jelinek
On Tue, Nov 26, 2019 at 04:58:01PM -0500, Jason Merrill wrote: > Hmm, we shouldn't have any PLACEHOLDER_EXPR under a RANGE_EXPR; if we did, > any references to its address would end up all referring to the first > element of the range, which would be wrong. How about skipping RANGE_EXPR > in

Re: [C++ PATCH] Fix ICE in build_ctor_subob_ref during replace_placeholders (PR c++/92524)

2019-11-26 Thread Jason Merrill
On 11/22/19 9:19 AM, Jakub Jelinek wrote: Hi! On the following testcase, replace_placeholders is called on a CONSTRUCTOR { a, [1..63] = NON_LVALUE_EXPR<42> } and call build_ctor_subob_ref in that case. The problem is that index is RANGE_EXPR and as it is not INTEGER_CST, we call

[C++ PATCH] Fix ICE in build_ctor_subob_ref during replace_placeholders (PR c++/92524)

2019-11-22 Thread Jakub Jelinek
Hi! On the following testcase, replace_placeholders is called on a CONSTRUCTOR { a, [1..63] = NON_LVALUE_EXPR<42> } and call build_ctor_subob_ref in that case. The problem is that index is RANGE_EXPR and as it is not INTEGER_CST, we call build_class_member_access_expr which is not appropriate