More on gimplify:create_tmp_var
Richard Henderson
rth@redhat.com
Sun Jun 6 17:21:00 GMT 2004
On Sun, Jun 06, 2004 at 12:58:43AM -0400, Richard Kenner wrote:
> I have a tree which is an ARRAY_REF of a VIEW_CONVERT_EXPR of an
> INDIRECT_REF of a VAR_DECL. The INDIRECT_REF has a variable-sized type and
> so you can't make a temporary of it.
>
> But I think it's a serious mistake to try to split up such a reference anyway.
> Shouldn't it be the same code as in get_inner_reference where we go
> inside VIEW_CONVERT_EXPR and most NOP_EXPR and CONVERT_EXPR?
No, I don't. Why? Because get_inner_reference is not type safe.
I think you should be generating <INDIRECT_REF <NOP_EXPR <VAR>>>
instead of using VIEW_CONVERT_EXPR after the fact. Except that
as a short-term hack you'll have to use a non-aliasing type variant
of the original type for the INDIRECT_REF.
r~
More information about the Gcc
mailing list