Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gfortran.dg/dependency_21.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gfortran.dg/dependency_21.f90 Fri Oct 27 22:46:09 2017 +0900 @@ -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