Commit 07af06f6 by Paul Brook Committed by Paul Brook

re PR fortran/23906 (inappropriate branch condition in function…

re PR fortran/23906 (inappropriate branch condition in function "transform_sections" in "dependency.c")

2005-09-16  Paul Brook  <paul@codesourcery.com>

	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
parent 3489ea0c
2005-09-16 Paul Brook <paul@codesourcery.com>
PR fortran/23906
* dependency.c (transform_sections): Divide by correct value.
Elaborate comment.
2005-09-14 Paul Thomas <pault@gcc.gnu.org>
PR fortran/21875 Internal Unit Array I/O, NIST
......
......@@ -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;
......
2005-09-16 Paul Brook <paul@codesourcery.com>
PR fortran/23906
* gfortran.dg/dependency_1.f90: New test.
2005-09-15 Mark Mitchell <mark@codesourcery.com>
PR c++/23896
! { dg-do compile }
! PR23906
! Dependency analysis was using the stride from the wrong expression and
! segfaulting
subroutine foo(a)
real, dimension(:) :: a
a(1:3:2) = a(1:2)
a(1:2) = a(1:3:2)
end subroutine
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