When FTN95 V6.0 is run on the code below with the /opt option, it crashes.
SUBROUTINE TFBU(N,X,F,G)
implicit none
INTEGER N
REAL X(N),G(N),F
REAL FA,S1,T,BET
INTEGER J
BET=14
FA=1.73
DO J=1,N
IF(J.NE.3) THEN
T=SQRT(X(J)**2+3.0/J)
S1=LOG(T)
G(J)=G(J)+(X(J)*(SIN(S1)**5+COS(S1)**5+
+ 5*SIN(S1)**4*COS(S1)-
+ 5*SIN(S1)*COS(S1)**4)/T)*FA
ELSE
G(J)=G(J)+BET*N*FA
ENDIF
END DO
F=0.5D0*F
RETURN
END
When the code is slightly modified as given below, the compiler (again with /opt) gives the puzzling message '*** Operand incompatible with opcode':
SUBROUTINE TFBU28(N,X,F,G)
implicit none
INTEGER N
REAL X(N),G(N),F
REAL FA,S1,T,BET,ALF
INTEGER J
ALF=5
BET=14
FA=1.73
DO J=1,N
IF(J.NE.3) THEN
T=SQRT(X(J)**2+3.0/J)
S1=LOG(T)
G(J)=G(J)+(X(J)*(SIN(S1)**5+COS(S1)**5+
+ 5*SIN(S1)**(ALF-1.0)*COS(S1)-
+ 5*SIN(S1)*COS(S1)**(ALF-1.0))/T)*FA
ELSE
G(J)=G(J)+BET*N*FA
ENDIF
END DO
F=0.5D0*F
RETURN
END