Re: g77: subroutine foo(rwork,g) \\ real*8 rwork(n)-> segmentation fault

From: Toon Moene (toon_at_moene.indiv.nluug.nl)
Date: 11/12/03


Date: Wed, 12 Nov 2003 21:24:33 +0100

Niels L. Ellegaard wrote:

> My problem occurs in many subroutines on the following form
>
> SUBROUTINE testme (RWORK,n)
> integer n
> REAL*8 RWORK(n)
> write(*,*) ' I stop here to run gdb'
> RETURN
> END
>
> When I run the program for real I get some segmentation faults, and in
> order to test what is going on I am debugging the program using gdb. I
> have put a break point in the main program at the line "CALL
> testme(RWORK,LRW)". Now I can write out some variables

How did you declare RWORK in the main program ?

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)


Relevant Pages