weird problem Fortran 77
From: Qian Yong Chen (cqy_at_cfm.brown.edu)
Date: 10/30/03
- Next message: Mark Crispin: "Re: Something strange with g77 ..."
- Previous message: Qian Yong Chen: "weird problem Fortran 77"
- Next in thread: Michael Metcalf: "Re: weird problem Fortran 77"
- Reply: Michael Metcalf: "Re: weird problem Fortran 77"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Oct 2003 11:36:27 -0500
I have a small code which runs well under compaq Fortran,
but gives segmentation error under Sun workstation.
The same code run well under Sun 2 years ago. That is before they
upgrade the Fortran compiler.
I found out what causes the problem. But don't know why. See some
examples:
Code with problem;
program main
integer N
N = 10
call sub(N)
end -----------> end of main
subroutine sub(N)
real*8 a(0:N)
a(0) = 5 -----------> crashes right here.
end
If the value of N is given in the subroutine, it works fine.
Or if I only declare a(N), it also works.
Any ideas? Thanks.
- Next message: Mark Crispin: "Re: Something strange with g77 ..."
- Previous message: Qian Yong Chen: "weird problem Fortran 77"
- Next in thread: Michael Metcalf: "Re: weird problem Fortran 77"
- Reply: Michael Metcalf: "Re: weird problem Fortran 77"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|