This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 a TARGET_EXPR.

The ICE arises because at the point we meet that CONSTRUCTOR during the
constexpr processing, the currently active object under construction is
that for the result of the <= operator, which has type vector-of-bool,
rather than vector-of-int. (thus this  problem arises in other vector
ops, but mostly undetected because the result type is the same  as the
operand type)

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?

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]