This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Question about automatic arrays
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: fortran at gcc dot gnu dot org
- Date: Mon, 01 Nov 2010 10:49:35 +0100
- Subject: Question about automatic arrays
Hi!
Is the following code valid?
subroutine NF2DPrecon(x, au2,i1,i2) ! 2D NF Preconditioning matrix
integer, parameter :: dpkind=8
integer :: i1 , i2
real(dpkind),dimension(i2)::x, au2
real(dpkind),dimension(i1:i2)::t
integer :: i
do i = i1 , i2 , nx
if ( i>i1 ) x(i:i+nx-1) = x(i:i+nx-1) - au2(i-nx:i-1)*x(i-nx:i-1)
call trisolve(x,i,i+nx-1)
enddo
do i = i2-2*nx+1 , i1 , -nx
t(i:i+nx-1) = au2(i:i+nx-1)*x(i+nx:i+2*nx-1)
call trisolve(t,i,i+nx-1)
x(i:i+nx-1) = x(i:i+nx-1) - t(i:i+nx-1)
enddo
end subroutine NF2DPrecon !=========================================
If yes, why the executable from the nf.f90 with this change segfault?
Is this a gfortran bug?
TIA
Dominique