Re: [C++ PATCH] PR 70501, ICE in verify ctor sanity

2016-04-12 Thread Jason Merrill
On 04/07/2016 11:18 AM, Nathan Sidwell wrote: On 04/06/16 07:49, Jason Merrill wrote: Sure, but that also seems unnecessary; vector rvalues don't have object identity the way class and array rvalues do. I attach 2 patches. 70501-2.patch fixes the ICE by treating VECTOR_TYPEs thesame as PMFs

Re: [C++ PATCH] PR 70501, ICE in verify ctor sanity

2016-04-07 Thread Nathan Sidwell
On 04/06/16 07:49, Jason Merrill wrote: Sure, but that also seems unnecessary; vector rvalues don't have object identity the way class and array rvalues do. I attach 2 patches. 70501-2.patch fixes the ICE by treating VECTOR_TYPEs thesame as PMFs in cxx_eval_bare_aggregate). 70501-other.pat

Re: [C++ PATCH] PR 70501, ICE in verify ctor sanity

2016-04-06 Thread Nathan Sidwell
On 04/06/16 07:49, Jason Merrill wrote: On 04/05/2016 05:21 PM, Nathan Sidwell wrote: On 04/05/16 12:40, Jason Merrill wrote: It's not clear to me that we really need a TARGET_EXPR for vector values. Since one element of a vector can't refer to another, we don't need the ctx->ctor handling.

Re: [C++ PATCH] PR 70501, ICE in verify ctor sanity

2016-04-06 Thread Jason Merrill
On 04/05/2016 05:21 PM, Nathan Sidwell wrote: On 04/05/16 12:40, Jason Merrill wrote: It's not clear to me that we really need a TARGET_EXPR for vector values. Since one element of a vector can't refer to another, we don't need the ctx->ctor handling. Perhaps we should handle vectors like we

Re: [C++ PATCH] PR 70501, ICE in verify ctor sanity

2016-04-05 Thread Nathan Sidwell
On 04/05/16 12:40, Jason Merrill wrote: It's not clear to me that we really need a TARGET_EXPR for vector values. Since one element of a vector can't refer to another, we don't need the ctx->ctor handling. Perhaps we should handle vectors like we do PMF types in cxx_eval_bare_aggregate? That

Re: [C++ PATCH] PR 70501, ICE in verify ctor sanity

2016-04-05 Thread Jason Merrill
On 04/04/2016 01:26 PM, Nathan Sidwell wrote: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70501 This fixes 70501. The cause is an omission in typeck when converting a scalar operand to a vector. We use build_vector_from_val, which can return a CONSTRUCTOR. We fail to wrap that CONSTRUCTOR in

[C++ PATCH] PR 70501, ICE in verify ctor sanity

2016-04-04 Thread Nathan Sidwell
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70501 This fixes 70501. The cause is an omission in typeck when converting a scalar operand to a vector. We use build_vector_from_val, which can return a CONSTRUCTOR. We fail to wrap that CONSTRUCTOR in a TARGET_EXPR. The ICE arises because at t