FIX: Combining -4Yb with -Ox May Cause Invalid Run-Time ErrorsLast reviewed: September 18, 1997Article ID: Q110002 |
1.00 1.00a | 1.00
MS-DOS | WINDOWS NTkbtool kbfixlist The information in this article applies to:
SYMPTOMSOn some rare boundary cases, using optimizations (-Ox) with extended error handling ($DEBUG or -4Yb) can cause invalid run-time errors to be output, such as:
run-time error F6096: $DEBUG - array subscript expression out of range RESOLUTIONIf you have determined that a run-time error such as the above is not correct for the code indicated, you can prevent your program from terminating with the error. To do this, place a $NODEBUG metacommand before the line of code that is being flagged, and place a $DEBUG metacommand after it.
STATUSMicrosoft has confirmed this to be a problem in FORTRAN PowerStation 32 for Windows NT and MS-DOS, version 1.0 and 1.0A. This problem was corrected in FORTRAN PowerStation 32, version 4.0.
MORE INFORMATIONThe sample below illustrates the problem:
Sample Codec Compile options required: -Ox -4Yb c CHARACTER CA(512),CB(512),CC(512)
OPEN(7,FILE='N117.TMP',FORM='UNFORMATTED',RECL=128,
+ ACCESS='DIRECT')
DO 10 I=1,512
CA(I)=CHAR(48)
10 CONTINUE
DO 20 I=1,16
WRITE(7,REC=I) (CA(J),J=(I-1)*32+1,(I-1)*32+32)
c The F6096 error incorrectly occurs on the following line.
WRITE(7,REC=16+I) (CA(J),J=(16-I)*32+32,(16-I)*32+1,-1)20 CONTINUE DO 30 I=1,16
IE1=(16-I)*32+32
IE2=(16-I)*32+1
READ(7,REC=I+16) (CC(J),J=IE1,IE2,-1)
30 CONTINUE
IE=1
DO 40 I=1,512
IF(CA(I).NE.CB(I).OR.CA(I).NE.CC(I)) IE=0
40 CONTINUE
END |
Additional reference words: 1.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |