Hi Thomas, This is OK for trunk. Could you expand the comment to capture the two cases without dependency. eg. There is no dependency if the vector indices are equal or things are known to be different in a different dimension.
Thanks for the patch! Paul On 20 July 2013 16:15, Thomas Koenig <tkoe...@netcologne.de> wrote: > Hello world, > > the attached patch fixes two cases of unnecessary array temporaries > when vector indices were involved. When we saw something like that, > we gave up even if > > - The vector indices were equal > - The vector indices didn't matter at all because, in a different > dimension, things were known to be different. > > Regression-tested. OK for trunk? > > Thomas > > 2013-07-20 Thomas Koenig <tkoe...@gcc.gnu.org> > > PR fortran/56937 > * dependency.c (gfc_dep_resolver): Treat identical > array subscripts as identical; don't unconditionally > return a dependency if an array subscript is found. > > 2013-07-20 Thomas Koenig <tkoe...@gcc.gnu.org> > > PR fortran/56937 > * gfortran.dg/dependency_42.f90: New test. > * gfortran.dg/dependency_43.f90: New test. -- The knack of flying is learning how to throw yourself at the ground and miss. --Hitchhikers Guide to the Galaxy