Mecej4 gives good advice to use /undef
I compiled using :
FTN95 coupled-V2.FOR /-implicit_none /undef /link
SDBG coupled-V2.exe
This showed in subroutine READAT
DO 161 K=1,IZ
Z=ZW(INDE(K),INDE(J))*(EE(INDE(K))-EE(INDE(J)))/(EI(K)-EI(J))
IF (INDE(K).EQ.INDE(J)) Z=ZW(INDE(K),INDE(J)+1)*
& (EE(INDE(K))-EE(INDE(J)+1))/(EI(K)-EI(J))
IF (KOKO.LE.0) Z=0.D0
161 DMA(K+I1,J+I1,IR)=Z
needed to be changed to
DO 161 K=1,IZ
IF (INDE(K).EQ.INDE(J)) then ! patch for
Z = ZW(INDE(K),INDE(J)+1)
& * (EE(INDE(K))-EE(INDE(J)+1))/(EI(K)-EI(J))
ELSE
Z = ZW(INDE(K),INDE(J))
& * (EE(INDE(K))-EE(INDE(J)))/(EI(K)-EI(J))
END IF
IF (KOKO.LE.0) Z=0.D0
161 DMA(K+I1,J+I1,IR)=Z
The order of the IF test is not guaranteed in the standard.
Further, it appears that arrays CMA and GMA are not (sufficiently) initialised.
I presume there are further problems. Perhaps you need a routine INIT to zero all global variables. I am not sure about the local variables. Although /ZERO may be essential, it is not a good option for modern Fortran.
I expect /SAVE and /ZERO will also be necessary for this program to work anything like it did with the previous compiler and operating system on which it was developed.
This is an interesting example of what to do as a minimal fix to get the program to work.
For example: in Subroutine TVR, which has local variables T(10000), NSTT and the DO index NP. These are referenced using ENTRY TVR1.
You would definately need SAVE for this to work.
I don't know the history of this program development, but it will struggle to work with the rules of 'modern Fortran F90+'.
You definately need to understand the rules for ENTRY with the original compiler.
So that your work scope doesn't explode, you should think carefully what are minimal changes required to approach the Fortran environment in which the program was developed. Make sure you keep a copy of the original version so that you can start again with the updates as you better understand what this means.
You need to be careful, to confirm the program works, even after it works for the limited cases you have provided. This program is not standard FORTRAN.