mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
re PR fortran/31711 (was "rhs array is changed while assiging to same lhs array")
2007-04-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/31711 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp whenever a dependency is found. 2007-04-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/31711 * gfortran.dg/dependency_21.f90: New test. From-SVN: r124270
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2007-04-29 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/31711
|
||||
* trans-array.c (gfc_conv_resolve_dependencies): Create a temp
|
||||
whenever a dependency is found.
|
||||
|
||||
2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
|
||||
|
||||
* intrinsic.texi (Transfer): Improve documentation.
|
||||
|
||||
@@ -2826,6 +2826,8 @@ gfc_conv_resolve_dependencies (gfc_loopinfo * loop, gfc_ss * dest,
|
||||
rref = ss->expr->ref;
|
||||
|
||||
nDepend = gfc_dep_resolver (lref, rref);
|
||||
if (nDepend == 1)
|
||||
break;
|
||||
#if 0
|
||||
/* TODO : loop shifting. */
|
||||
if (nDepend == 1)
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-29 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/31711
|
||||
* gfortran.dg/dependency_21.f90: New test.
|
||||
|
||||
2007-04-27 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
PR middle-end/31710
|
||||
|
||||
21
gcc/testsuite/gfortran.dg/dependency_21.f90
Normal file
21
gcc/testsuite/gfortran.dg/dependency_21.f90
Normal file
@@ -0,0 +1,21 @@
|
||||
! { dg-do run }
|
||||
! Test the fix for PR31711 in which the dependency in the assignment
|
||||
! at line 18 was detected and then ignored.
|
||||
!
|
||||
! Contributed by Tobias Ivarsson <thobes@gmail.com>
|
||||
!
|
||||
program laplsolv
|
||||
IMPLICIT NONE
|
||||
integer, parameter :: n = 2
|
||||
double precision,dimension(0:n+1, 0:n+1) :: T
|
||||
integer :: i
|
||||
|
||||
T=0.0
|
||||
T(0:n+1 , 0) = 1.0
|
||||
T(0:n+1 , n+1) = 1.0
|
||||
T(n+1 , 0:n+1) = 2.0
|
||||
|
||||
T(1:n,1)=(T(0:n-1,1)+T(1:n,1+1)+1d0)
|
||||
|
||||
if (any (T(1:n,1) .ne. 1d0 )) call abort ()
|
||||
end program laplsolv
|
||||
Reference in New Issue
Block a user