PATCH: fortran/27662: Transpose doesn't work on function return

Paul Brook paul@codesourcery.com
Sun May 21 17:27:00 GMT 2006


On Friday 19 May 2006 18:53, Thomas Koenig wrote:
> On Fri, May 19, 2006 at 04:34:26PM +0100, Richard Sandiford wrote:
> > However, the use of zero strides for temporaries was an existing
> > situation, not something specific to the tranpose optimisations.
> > I'm afraid I don't know gfortran well enough to say whether it's
> > still needed.  It looks like Paul has taken up the patch (thanks Paul!)
> > and he knows this stuff much better than I do.
>
> I've never seen zero stride used for anything useful.

Long ago gfortran used to pass many more array arguments via descriptors, and 
pack/unpack the data in the callee. The zero stride was used to avoid an 
unnecessary copy-out.

However with the ABI change to pass arrays g77-style (required for other 
reasons) and the introduction of the internal_pack/internal_unpack routines 
it is mostly redundant. It just bypasses the check at the start of 
internal_pack.

It's probably not worth the effort nowadays.

Paul



More information about the Gcc-patches mailing list