This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Semantics of MODIFY_EXPR with CONSTRUCTOR rhs
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 2 Aug 2004 00:18:17 -0700
- Subject: Re: Semantics of MODIFY_EXPR with CONSTRUCTOR rhs
- References: <10408020320.AA28900@vlsi1.ultra.nyu.edu>
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~