This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]