FIX: Internal Compiler Error: '@(#)omf.c:1.60', Line 185 (58322)



The information in this article applies to:

  • Microsoft FORTRAN Compiler for MS-DOS 5.0
  • Microsoft FORTRAN Compiler for MS-DOS 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 ===============================================================
				

Modification Type:MajorLast Reviewed:9/30/2003
Keywords:kbfix KB58322