Commit 1d100230 by Thomas Koenig

re PR fortran/45159 (Unnecessary temporaries)


2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/45159
	* depencency.c (gfc_dep_resolver):  Fix logic for when a loop
	can be reversed.

2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/45159

	* gfortran.dg/dependency_29.f90:  New test.

From-SVN: r162829
parent 14292418
2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* depencency.c (gfc_dep_resolver): Fix logic for when a loop
can be reversed.
2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/36854
* dependency.h: Add prototype for gfc_are_identical_variables.
* frontend-passes.c: Include depencency.h.
......
......@@ -1716,8 +1716,8 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
/* If no intention of reversing or reversing is explicitly
inhibited, convert backward dependence to overlap. */
if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
|| (reverse && reverse[n] == GFC_CANNOT_REVERSE))
if (this_dep == GFC_DEP_BACKWARD
&& (reverse == NULL || reverse[n] == GFC_CANNOT_REVERSE))
this_dep = GFC_DEP_OVERLAP;
}
......
2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* gfortran.dg/dependency_29.f90: New test.
2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/36854
* dependency.h: Add prototype for gfc_are_identical_variables.
* frontend-passes.c: Include depencency.h.
(optimimize_equality): Use gfc_are_identical_variables.
* dependency.c (identical_array_ref): New function.
(gfc_are_identical_variables): New function.
(gfc_deb_compare_expr): Use gfc_are_identical_variables.
* dependency.c (gfc_check_section_vs_section). Rename gfc_
prefix from statc function.
(check_section_vs_section): Change arguments to gfc_array_ref,
adjust function body accordingly.
* gfortran.dg/character_comparison_2.f90: New test.
* gfortran.dg/character_comparison_3.f90: New test.
* gfortran.dg/dependency_28.f90: New test.
2010-08-02 Bernd Schmidt <bernds@codesourcery.com>
......
! { dg-do compile }
! { dg-options "-Warray-temporaries" }
subroutine t1(n1,n2, gfft, ufft)
implicit none
integer :: n1, n2, i
real :: gfft(n1,n2), ufft(n2)
DO i=1, n1
gfft(i,:)=gfft(i,:)*ufft(i)
END DO
end subroutine t1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment