On Thu, Jun 5, 2014 at 3:26 PM, Paolo Carlini <[email protected]> wrote:
> Hi,
>
>
> On 06/05/2014 03:20 PM, Richard Biener wrote:
>>
>> I think the operands have to be reversed though - the type matches that of
>> op0. Sorry ;)
>
> Something like this, then?
Yes. I suppose it's ok to re-order side-effects lhs, rhs to rhs, lhs?
Otherwise you'd need to do sth like
op0 = save_expr (op0);
*expr_p = build2 (COMPOUND_EXPR, TREE_TYPE (*expr_p),
op0,
build2 (COMPOUND_EXPR, TREE_TYPE (*expr_p),
build_fold_addr_expr (op1), op0));
(which may or may not work or be a good idea with zero-size aggregate op0)
Richard.
> Thanks,
> Paolo.
>
> ///////////////