Microsoft KB Archive/58322

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 16:57, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Article ID: 58322

Article Last Modified on 9/30/2003



APPLIES TO

  • Microsoft FORTRAN Compiler 5.0
  • Microsoft FORTRAN Compiler 5.1



This article was previously published under Q58322

SYMPTOMS

The program below causes the following internal compiler error with FORTRAN versions 5.0 and 5.1:

fatal error F1001: Internal Compiler Error
(compiler file '@(#)omf.c:1.60', line 185)
Contact Microsoft Technical Support

CAUSE

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.

RESOLUTION

The workaround is to initialize the arrays in the same order that they appear in the common block.

STATUS

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.

MORE INFORMATION

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