FIX: F1002, R6000 During Compile with Very Large Array (86069)



The information in this article applies to:

  • Microsoft FORTRAN Compiler for MS-DOS 4.1
  • Microsoft FORTRAN Compiler for MS-DOS 5.0
  • Microsoft FORTRAN Compiler for MS-DOS 5.1
  • Microsoft FORTRAN compiler for OS/2 4.1
  • Microsoft FORTRAN compiler for OS/2 5.0
  • Microsoft FORTRAN compiler for OS/2 5.1

This article was previously published under Q86069

SYMPTOMS

A program compiled with Microsoft FORTRAN version 4.1, 5.0, or 5.1 that attempts to declare an extremely large array may generate the following errors during compilation:
fatal error F1002: out of heap space
run-time error R6000
- stack overflow

RESOLUTION

Static data larger than 244 segments in size cannot be linked. The compiler is failing with data so large it will never link successfully. Decrease the size of the array dimensions.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN versions 4.1, 5.0, and 5.1 for MS-DOS and OS/2. This problem was corrected in FORTRAN PowerStation, version 1.0.

MORE INFORMATION

The following code demonstrates the problem. Note that if another 0 (zero) is added to the code below, the program compiles without an error but the executable file does not reflect the size of the array defined in the program. If the dimension of the array exceeds the limit of an INTEGER variable, an INTEGER overflow error is generated.

Sample Code

      PARAMETER (n=100000000)
      INTEGER*4 LargeArray(n)
      LargeArray (n) = n
      END
				

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:kbfix KB86069