FIX: F1002, R6000 During Compile with Very Large Array

Last reviewed: September 16, 1997
Article ID: Q86069
4.10 5.00 5.10 | 4.10 5.00 5.10
MS-DOS         | OS/2
kbtool kbbuglist kbfixlist kberrmsg

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, versions 4.1, 5.0, and 5.1
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0, and 5.1

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


Additional reference words: 4.10 5.00 5.10 buglist4.10 buglist5.00
buglist5.10 fixlist1.00
KBCategory: kbtool kbbuglist kbfixlist kberrmsg
KBSubcategory: FLIss
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.