This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to allow Ada to work with tree-ssa
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner), rth at redhat dot com
- Date: Tue, 22 Jun 2004 21:22:43 +0100
- Subject: Re: Patch to allow Ada to work with tree-ssa
- Organization: CodeSourcery
- References: <10406221952.AA09590@vlsi1.ultra.nyu.edu>
> 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