On 11/20/2017 02:42 AM, Jakub Jelinek wrote:
Hi!

VEC_COND_EXPR is handled in constexpr code like COND_EXPR, but that is
wrong.  VEC_COND_EXPR is more like an arbitrary arithmetics ternary
operation, we need to compute all 3 arguments and based on the elements of
the first argument pick up elements of 2nd and 3rd arguments.
The COND_EXPR handling just checks the whole first argument, not its
elements, and only evaluates one of the arguments.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk and release branches?

ok. It might be worth noting the above difference in the comment describing cxx_eval_vector_conditional_expression

nathan

--
Nathan Sidwell

Reply via email to