Semantics of MODIFY_EXPR with CONSTRUCTOR rhs

Richard Henderson rth@redhat.com
Mon Aug 2 07:18:00 GMT 2004


On Sun, Aug 01, 2004 at 11:20:06PM -0400, Richard Kenner wrote:
> Suppose we have this in .t03.original:
> 
>   r = {.x=5, .y=8};
>   r = {.x=1, .y=r.x};
> 
> Is the second statement valid?
...
> What's supposed to be happening here?

No one's defined it, is my guess.

I'd have been surprised if you'd told me we had supported this
in the rtl expanders, but I can only assume from the context of
this message that we did.

I suppose it makes logical sense to support it -- as if we're
creating a temporary object with the CONSTRUCTOR.  The tricky
bit will be to not pessimize the common case in which we do not
have overlap between the lhs and the rhs.

I suppose I can take a look at this problem this week...


r~



More information about the Gcc mailing list