On 10/25/2011 10:20 AM, Andrew MacLeod wrote:
> +   /* Otherwise there is a lockfree match, transform the call from:
> +        void fn(T* mem, T* desired, T* return, model)
> +      into
> +        *((In *)return = fn (T* mem, *((In *)desired, model)  */

This is, in general, an aliasing violation nearly guaranteed to fail.
Instead try

  *return = VCE<In>(fn(mem, VCE<In>(*desired), model))

where VCE<T>(E) is a VIEW_CONVERT_EXPR with TREE_TYPE = T and a
first operand expression of E.

But in particular, the actual stores and loads happen in the original type.


r~

Reply via email to