fortran program fails -- help...
Toon Moene
toon@moene.indiv.nluug.nl
Mon Oct 13 11:14:00 GMT 1997
Paul,
> I have a fortran program that compiles fine but fails at
> runtime. (It's "somnec2s" which is a companion program
> to nec, the antenna analysis tool.) One of its
> subroutines initializes an array the first time through,
> and expects it to be untouched after. Problem is that
> it is scribbled on shortly after exit from that
> subroutine.
Are you sure the array is declared SAVE ?
I.e.
save m
Otherwise, the contents won't be preserved for the second call of
the routine (this is a Standards Issue, and it is explained in the
manual, because some Fortran compilers SAVE local data by default;
g77 doesn't).
HTH,
Toon.
More information about the Gcc-bugs
mailing list