Microsoft KB Archive/75624

= FIX: Unexpected Statement Reached with Loop Optimization =

Article ID: 75624

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.1
 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.1

-



This article was previously published under Q75624



SYMPTOMS
Program execution incorrectly reaches executable statements when loop optimization is enabled.



STATUS
Microsoft has confirmed this to be a problem in the products listed above. The problem was corrected in FORTRAN PowerStation, version 1.0.



MORE INFORMATION
In the following program, line number 116 is executed, when it should never be reached:

Sample code
I INTEGER*2 LOOP/5/

WRITE (*,'(1x,I4)') LOOP

110  IF (LOOP .LE. 0) GOTO 120

C    WRITE (*,'(1x,I4)') LOOP LOOP = LOOP - 1 GOTO 110

116  write (*,'(1x,A,I4)') 'Beyond loop',loop

120  write (*,'(1x,I4)') loop end



RESOLUTION
To alleviate this problem, suppress loop optimization with the /Od or /Odct compiler options.

Additional query words: 5.00 5.10 buglist5.00 buglist5.10 fixlist1.00

Keywords: kbfix KB75624

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.