This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] PR 56937 - temporaries with array indices
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 20 Jul 2013 18:44:52 +0200
- Subject: Re: [patch, fortran] PR 56937 - temporaries with array indices
- References: <51EA9B78 dot 6030200 at netcologne dot de>
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 <tkoenig@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 <tkoenig@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 <tkoenig@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