Microsoft KB Archive/70653

= BUG: F1001: omf.c:160', Line 185; Huge Array with /Fa or /Fc =

Article ID: 70653

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 4.0
 * Microsoft FORTRAN Compiler 4.01
 * Microsoft FORTRAN Compiler 4.1
 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.1
 * Microsoft FORTRAN Compiler 4.1
 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.1

-



This article was previously published under Q70653



SYMPTOMS
In Microsoft FORTRAN versions 4.0, 4.01, 4.1, 5.0 and 5.1, when compiling a program that contains an array over 2,147,483,648 bytes long under MS-DOS or OS/2 with the /Fa or /Fc option, the third pass of the compiler generates the following error:

fatal error F1001: Internal Compiler Error

(compiler file '@(#)omf.c:1.60', line 185)

Contact Microsoft Technical Support

If the /Fa or /Fc option is not included on compile, the object module, when linked, will generate an invalid executable that incorrectly reflects the minimum load size, as indicated by the EXEMOD utility.



STATUS
Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions 4.x and 5.x for MS-DOS and OS/2.

This is not a problem in FORTRAN PowerStation, because [huge] is not supported.



MORE INFORMATION
Note: An array this large cannot be declared in a code module compiled with Microsoft FORTRAN because of the linker limit of 244, 64K segments per module. (The limit stated in the manual is 255 segments per module, but 11 segments are preassigned.) Thus, even under OS/2, the largest possible data item is 64K times 244 or 15,990,784 bytes. If the internal compiler error does not occur, the following linker error should be generated:

fatal error L1047: too many group, segment, and class names in one module

The following code reproduces the problem: integer*2 n [huge] (2000000000) end Compiling a program with an array dimensioned to 200,000,000 (one less zero) generates the following errors during the third pass of the compiler:

fatal error F1002: out of heap space

run-time error R6000

- stack overflow

The options /Fa or /Fc are not needed to generate this error.

Compiling a program with an array dimensioned to 20,000,000 (two less zeros than the original array) generates the following error during link:

fatal error L1047: too many group, segment, and class names in one module

Additional query words: nofps 5.00 5.10

Keywords: KB70653

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.