Microsoft KB Archive/58322
Article ID: 58322
Article Last Modified on 9/30/2003
- Microsoft FORTRAN Compiler 5.0
- Microsoft FORTRAN Compiler 5.1
This article was previously published under Q58322
The program below causes the following internal compiler error with FORTRAN versions 5.0 and 5.1:
The program defines a common block of arrays that spans three segments. The program then initializes the arrays of the common block to zero. The error is generated because the program is initializing the arrays in a different order than they are specified in the common block.
The workaround is to initialize the arrays in the same order that they appear in the common block.
Microsoft has confirmed this to be a problem in FORTRAN versions 5.0 and 5.1 for MS-DOS and OS/2. This problem was corrected in FORTRAN PowerStation.
The following program demonstrates the internal compiler error:
C ============ FORTRAN SOURCE CODE == Fragment #1 =============== real*8 test1[huge](225,100), test2(300), test3(300) common /test/ test1, test2, test3 data test3 /300*0/ data test1 /22500*0/ end C ===============================================================
The workaround is to initialize the arrays in the order they appear in the common block as seen below.
C ============ FORTRAN SOURCE CODE == Fragment #2 =============== real*8 test1[huge](225,100), test2(300), test3(300) common /test/ test1, test2, test3 data test1 /22500*0/ data test3 /300*0/ end C ===============================================================
Additional query words: 5.00 5.10
Keywords: kbfix KB58322