This is the mail archive of the gcc-patches@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: Patch to allow Ada to work with tree-ssa


On Tuesday 22 June 2004 21:45, Richard Kenner wrote:
>     Basically what we need is ARRAY_REF (or implicitly via ARRAY_TYPE)
>     which allows you to specify the array stride. In C terms this means
>     sizeof(a[0]) != (a[1] - a[0]). In fact sizeof(a[0]) may not be
>     meaningful if it is and outer reference of a multi-dimensional array.
>
> Well the critical question is whether this is always a constant
> or not.  

It's a variable. Indeed it can change between uses within the same function, 
as I said last time this was discussed.

> If it's always a constant, then you always have the option 
> of making up an appropriate ARRAY_TYPE.  If it's a *variable*, then
> you don't have the option of getting the value implicitly from the
> type and have to put it someplace explicitly in the node.

The gimplifier has the option of getting it from the type node.

Paul


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