Martin,
I'm pleased to see another wilson subroutine. I am still using many from the 70's.
I'm drawn to reply to this as I am also having repeated problems with infrequent use of SDBG with FTN95 Ver 4.9.1. There appear to be a number of other recent possibly unrelated problems.
Frequently when I start SDBG, nothing appears and I have to maximise, exit then restart to get the windows to appear... I think it's a problem with the SDBG configuration file being repeatedly corrupted.
Anyway, I tried your example with FTN95 Ver 4.9.1 and also Ver 4.00, which I have on a very old machine.
In Ver 4.00, SDBG reported arrays S and EPS as pointers, but did not display their values corectly.
In ver 4.9.1, they are reported as arrays, but again I could not view their values. I put a breakpoint at the second set of do loops, but the reported values of S were undefined. It did not crash.
So both SDBG do not corectly display the local automatic arrays.
I also changed your code to 'clean it up'. I prefer the use of LOG rather than DLOG, as this uses the generic function name, which saves on possible errors when changing KIND. I also use /implicit_none to confirm all variable declarations.
integer4, parameter :: nc = 4
real8 X(NC), LAMBDA(NC,NC), GAMMA(NC), GAMMAL(NC,NC,NC), GAMMAX(NC,NC)
!
lambda = 1
x = 1
call WILSON (NC,X,LAMBDA,GAMMA,GAMMAL,GAMMAX)
end
SUBROUTINE WILSON (NC,X,LAMBDA,GAMMA,GAMMAL,GAMMAX)
!
integer4 nc
real8 X(NC), LAMBDA(NC,NC), GAMMA(NC), GAMMAL(NC,NC,NC), GAMMAX(NC,NC)
!
integer4 K, J, M
real8 sum, S(NC),EPS(NC,NC)
real8, parameter :: zero = 0
real8, parameter :: one = 1
DO K=1,NC
sum = zero
DO J=1,NC
sum = sum + X(J)*LAMBDA(J,K)
END DO
S(K) = sum
END DO
DO K=1,NC
SUM = zero
DO M=1,NC
SUM = SUM + X(M)*LAMBDA(K,M)/S(M)
END DO
GAMMA(K) = one - LOG (S(K)) - SUM
END DO
RETURN
END