Program on old fortran IV

Joao Martins Correia Guilherme.Correia@cern.ch
Wed Apr 29 13:37:25 GMT 2020


Dear Gcc Helpers

I recovered an old scientific program code written in Fortran IV.
Still using hollerith assignments - which I think I understand, I can compile it with the many warnings
regarding essentially 3 things

1- hollerith

2- “do" cycles indexed to an active command line instead of “enddo" or “continue”, e.g.

do	10 i=1,n
 		x=x+1
10	y=y+1

3-“if” of the type

 If (n) 10,20,30

All of this can be cleaned, but I have the feeling that in spite of the warnings the compiler still treats these 3 warnings correctly, since I could test it
with coherent results.

The program starts running, properly, reads input files and execute some routines, but then gets stuck with strange huge
numbers that have no apparent reason to be there.
The problem is in fact that there are no assignment of variable types and there are many commons with different variable names
that contribute to the confusion when debugging. Setting “implicit none” creates too many errors, since sometimes is not easy
to assign the type of the variable on a code with 30 routines and more than 5000 lines.

I am considering reviewing it fully, but first would like to know if there is some options that could help emulating
an older compiler for fortran IV. In the moment the fortran routines have type .f 

Thanks anyway

Cheers

João Correia


More information about the Gcc-help mailing list