The information in this article applies to:
SYMPTOMSAn application that assigns an expression to an array element produces incorrect results. CAUSEThe application uses the READ statement to enter the array element index. The optimizer in the code generator performs common subexpression elimination and generates incorrect code for the array expression. RESOLUTION
To work around this problem, perform one of the following two steps:
STATUSMicrosoft has confirmed this to be a problem in FORTRAN versions 4.0, 4.01, 4.1, 5.0, and 5.1 for MS-DOS and 4.1, 5.0, and 5.1 for OS/2. This problem was corrected in FORTRAN PowerStation, version 1.0. MORE INFORMATIONIn the first code example below, because the compiler treats the expression X(I) as a common subexpression, it generates code to evaluate the expression C = A / B for the expression C = X(I). The second example uses a temporary variable to eliminate the common subexpression. Sample Code #1
Sample Code #2
Additional query words: 4.00 4.01 4.10 5.00 5.10
Keywords : |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |