FIX: Duplicate Lines Incorrectly Removed by OptimizerLast reviewed: September 16, 1997Article ID: Q74898 |
5.00 5.10 | 5.00 5.10
MS-DOS | OS/2kbtool kbfixlist kbbuglist The information in this article applies to:
SYMPTOMSThe sample code below produces correct output when optimization is disabled, but not with default optimization. The optimizer incorrectly removes the two lines noted below. The expected output is:
100 1 244 8The output with default optimization is:
0 0 244 8 STATUSMicrosoft has confirmed this to be a bug in the products listed above. This problem was corrected in FORTRAN PowerStation, version 1.0.
MORE INFORMATIONThe following code can be used to demonstrate the problem.
Sample Code
INTEGER*2 IBBYTE(2),MINVAL,MAXVAL,IVAL CHARACTER*1 CBYTE(4) MINVAL=100 MAXVAL=100 MINVAL=MIN(MINVAL,500) MAXVAL=MAX(MAXVAL,500) IBBYTE(1)=MOD(REAL(MINVAL),256.0) !this line is optimized out IBBYTE(2)=MINVAL/56 !this line is optimized out CBYTE(1)=CHAR(IBBYTE(1)) CBYTE(2)=CHAR(IBBYTE(2)) IBBYTE(1)=MOD(REAL(MAXVAL),256.0) IBBYTE(2)=MAXVAL/56 CBYTE(3)=CHAR(IBBYTE(1)) CBYTE(4)=CHAR(IBBYTE(2)) WRITE(*,*) (ICHAR(CBYTE(N)),N=1,4) STOP END |
Additional reference words: 5.00 5.10 buglist5.00 buglist5.10 fixlist1.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |