|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
RichardMay
Joined: 02 May 2006 Posts: 25
|
Posted: Fri Jan 19, 2007 1:59 pm Post subject: Operand incompatible with opcode |
|
|
When I compile the code below with the /check option I get an error message "Operand incompatible with opcode" at line 14. What does this mean? It is very old code and was OK with FTN95 4.9.1.
SUBROUTINE ACCTOG(MODE,IX,IVAL)
INTEGER*1 IBTOG4
COMMON/GUT4VB/IBTOG4(1024)
IF(MODE.EQ.1.AND.IX.LT.0)THEN
IF(IX.EQ.-1)THEN
CALL I1ZERO(IBTOG4,1024)
ELSE
NF=-IX
CALL I1ZERO(IBTOG4,NF)
ENDIF
GOTO 9999
ENDIF
IF(MODE.EQ.1)THEN
IBTOG4(IX)=IVAL
ELSE
IVAL=IBTOG4(IX)
ENDIF
9999 RETURN
END |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Sat Jan 20, 2007 6:12 pm Post subject: |
|
|
This is a strange bug.
It only occurs with /check, not with /checkmate which is odd.
The checking process that is going wrong is to do with checking the type of the argument IVAL which has default type INTEGER*4, whilst IBTOG4 has type INTEGER*1.
We will investigate this. In the mean time, try using /checkmate instead or revert to an earlier version of FTN95. |
|
Back to top |
|
|
RichardMay
Joined: 02 May 2006 Posts: 25
|
Posted: Mon Jan 22, 2007 11:34 am Post subject: operand incompatible with opcode |
|
|
I tried using /checkmate and the 1st routine worked. However, here is one that gives the same error with /checkmate. I have cut it down a lot so there are also some warnings about unused variables.
SUBROUTINE ADRCOL(IASTAR,NREP,ICOLD,ICNEW)
INTRINSIC CORE1,CORE2,CORE4
INTEGER*1 I1C,I1COLD,I1CNEW
INTEGER*2 I2C,I2COLD,I2CNEW
DATA NBYCOL/1/
IF(NBYCOL.NE.1)GOTO 200
IA=IASTAR
I1COLD=IABS(ICOLD)
I1CNEW=ICNEW
IF(ICOLD.GE.0)THEN
DO 10 I=1,NREP
I1C=CORE1(IA)
IF(I1C.EQ.I1COLD)CORE1(IA)=I1CNEW
IA=IA+1
10 CONTINUE
ENDIF
GOTO 9999
200 CONTINUE
IF(NBYCOL.NE.2)GOTO 400
IA=IASTAR
I2COLD=IABS(ICOLD)
I2CNEW=ICNEW
400 CONTINUE
9999 RETURN
END |
|
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
|