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


>     I should have been more clear.  Fortran has plans to use this
>     field for stride different than size.
>
> OK, but array_ref_element_size looks at that field only if it's set.
> Before gimplification, it's not and it returns the actual element size.
> Are Fortran's plans consistent with that?

I haven't looked at you implementation closely enough to tell if it matches 
what we want. We currently lower everything down to a 1-d arrays and to the 
address arithmetic manually.

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.

We can generate this in pretty much whatever form is most convenient for the 
tree-ssa people.

I gave an example in:
http://gcc.gnu.org/ml/gcc/2004-06/msg00477.html
For fortran I don't see any benefit in the lbound argument. This can be 
trivially folded into the index expression.

Paul


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