Re: Run-time error with gfortran -fbounds-check
- From: route6@xxxxxxxxxxx
- Date: Thu, 06 Sep 2007 09:47:50 -0700
I can't send the code because it is copyrighted, but I checked the
dummy arguments and found something possibly wrong: I have
declarations like this
REAL(KIND=8), INTENT(IN) :: r(:)
in a F90 subroutine. Is it wrong? why does the compiler accept it?
The following example is compiled without any problem, but does a run-
time segmentation fault
principal.f:
PROGRAM principal
IMPLICIT NONE
integer n
real*8 x(256)
n=6
call work(x,n)
END PROGRAM
work.f90:
SUBROUTINE work(z,k)
IMPLICIT NONE
REAL(KIND=8), intent(in) :: z(:)
INTEGER,intent(in) :: k
integer :: i
do i=1,k
write(*,*) i,z(i)
end do
END SUBROUTINE
.
- Follow-Ups:
- References:
- Run-time error with gfortran -fbounds-check
- From: route6
- Re: Run-time error with gfortran -fbounds-check
- From: FX
- Re: Run-time error with gfortran -fbounds-check
- From: route6
- Re: Run-time error with gfortran -fbounds-check
- From: alexei . matveev
- Re: Run-time error with gfortran -fbounds-check
- From: Richard Maine
- Re: Run-time error with gfortran -fbounds-check
- From: route6
- Re: Run-time error with gfortran -fbounds-check
- From: route6
- Re: Run-time error with gfortran -fbounds-check
- From: Steven G. Kargl
- Run-time error with gfortran -fbounds-check
- Prev by Date: Re: two complaints by Intel Fortran
- Next by Date: Re: two complaints by Intel Fortran
- Previous by thread: Re: Run-time error with gfortran -fbounds-check
- Next by thread: Re: Run-time error with gfortran -fbounds-check
- Index(es):
Relevant Pages
|