From 07af06f6a312afcedcf9ff51f77cf9daf43bc6fe Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Fri, 16 Sep 2005 03:26:37 +0000 Subject: re PR fortran/23906 (inappropriate branch condition in function "transform_sections" in "dependency.c") 2005-09-16 Paul Brook PR fortran/23906 fortran/ * dependency.c (transform_sections): Divide by correct value. Elaborate comment. testsuite/ * gfortran.dg/dependency_1.f90: New test. From-SVN: r104339 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/dependency.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index db3d063..fc3cfe3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-09-16 Paul Brook + + PR fortran/23906 + * dependency.c (transform_sections): Divide by correct value. + Elaborate comment. + 2005-09-14 Paul Thomas PR fortran/21875 Internal Unit Array I/O, NIST diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index 9c6b4f6..b93808a 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -392,7 +392,7 @@ get_deps (mpz_t x1, mpz_t x2, mpz_t y) } -/* Transforms a sections l and r such that +/* Perform the same linear transformation on sections l and r such that (l_start:l_end:l_stride) -> (0:no_of_elements) (r_start:r_end:r_stride) -> (X1:X2) Where r_end is implicit as both sections must have the same number of @@ -434,7 +434,7 @@ transform_sections (mpz_t X1, mpz_t X2, mpz_t no_of_elements, mpz_mul (X2, no_of_elements, r_stride->value.integer); if (l_stride != NULL) - mpz_cdiv_q (X2, X2, r_stride->value.integer); + mpz_cdiv_q (X2, X2, l_stride->value.integer); mpz_add (X2, X2, X1); return 0; -- cgit v1.1