 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1899
|
Posted: Thu Mar 17, 2011 10:43 am Post subject: Compiler V6.0 crashes on short code with /opt |
|
|
When FTN95 V6.0 is run on the code below with the /opt option, it crashes.
Code: | 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":
Code: | 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
|
|
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Thu Mar 17, 2011 11:32 am Post subject: |
|
|
OK. I will log this for investigation. |
|
Back to top |
|
 |
sparge
Joined: 11 Apr 2005 Posts: 371
|
Posted: Thu Mar 17, 2011 12:10 pm Post subject: |
|
|
This rings a bell. I got that puzzling error message once. If I remember correctly, it turned out to be something to do with a slight change in instruction set between two flavours of Pentium CPU, which the compiler was not aware of. So worth trying on a machine of different vintage, if possible. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Apr 27, 2011 9:18 am Post subject: |
|
|
Both of these bugs have now been fixed for the next release. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|