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



The information in this article applies to:

  • Microsoft FORTRAN Compiler for MS-DOS 4.0
  • Microsoft FORTRAN Compiler for MS-DOS 4.01
  • 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 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

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:KB70653