BUG: F1001: Line 1826 with IAND, IOR, COMMON, /Od /ND

ID: Q75199


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 4.0, 4.01, 4.1, 5.0, 5.1
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0, 5.1


SYMPTOMS

When compiling a program with Microsoft FORTRAN version 5.1 under MS-DOS or OS/2, the following error may be generated during the second pass of the compiler:

fatal error F1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.9', line 1826)
Contact Microsoft Technical Support
Compiling with FORTRAN version 5.0, the following error is produced:
fatal error F1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.8', line 1816)
Contact Microsoft Technical Support
Compiling with FORTRAN versions 4.1 and 4.01, the following error is produced:
fatal error F1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.79', line 1747)
Contact Microsoft Technical Support
Compiling with FORTRAN version 4.0, the following error is produced:
fatal error F1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.74', line 1735)
Contact Microsoft Technical Support


CAUSE

The program was compiled with the /Od and /ND<segmentname> options, and also utilized the IAND and IOR intrinsic functions on the same executable statement. For this error to occur, these functions must operate on two arrays that are in COMMON, one of the arrays must be greater than 65,532 bytes, and the value returned by the IAND and IOR operation must be set equal to one of the arrays used within the operation, dimensioned by a variable (see sample code below).


RESOLUTION

Setting the outcome of the IAND and IOR operation to a temporary variable or eliminating the /ND or /Od compile option will avoid this error message.


STATUS

Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions 4.0, 4.01, 4.1, 5.0 and 5.1.

This is not an issue with FORTRAN PowerStation because the /ND switch is not supported.


MORE INFORMATION

The following code reproduces the problem when compiled with the /Od and /ND<segmentname> options (where <segmentname> is a character string naming a data segment:

Sample Code #1


       integer i(16383), j(2),k

      COMMON i, j

      i(k)=IOR(IAND(i(k),j(1)),j(2))

      END 
The following code illustrates how to set the outcome of the IAND and IOR operation to a temporary variable:

Sample Code #2


      integer i(16383), j(2),k, temp

      COMMON i, j

      temp=IOR(IAND(i(k),j(1)),j(2))    ! Set outcome of operation to
        i(k)=temp                       ! temporary variable
      END 

Additional query words: nofps 4.00 4.01 4.10 5.00 5.10

Keywords :
Version : :4.0,4.01,4.1,5.0,5.1
Platform :
Issue type :


Last Reviewed: November 2, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.