This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More on gimplify:create_tmp_var


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]