FIX: F6099 Integer Overflow with /4I2 and /4Yb

Last reviewed: September 16, 1997
Article ID: Q87884
4.00 4.01 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.0, 4.01, 4.1, 5.0, and 5.1
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0, and 5.1

SYMPTOMS

Programs compiled with the metacommands $STORAGE:2 (or the /4I2 option) and $DEBUG (or the /4Yb option) in Microsoft FORTRAN version 4.0, 4.01, 4.1, 5.0 or 5.1 under MS-DOS or version 4.1, 5.0 and 5.1 under OS/2 may incorrectly generate the following error:

   Run-Time Error F6099: $DEBUG
        INTEGER overflow

CAUSE

The code must contain an assignment to an array where the array index is greater than 32768. The $STORAGE:2 (/4I2 option) and $DEBUG metacommands (/4Yb option) cause the compiler to generate incorrect assembly code leading to a jump to the overflow error output routine.

RESOLUTION

To avoid this error, compile without either the $STORAGE:2 (/4I2 option) or the $DEBUG metacommand (/4Yb option).

STATUS

Microsoft has confirmed this to be a problem in FORTRAN versions 4.0, 4.01, 4.1, 5.0 and 5.1. This problem was corrected in FORTRAN PowerStation, version 1.0.

MORE INFORMATION

The following code reproduces the problem:

Sample Code

$debug $storage:2

      integer*4 i
      integer*1 ar(32768)

      i=32768
      ar(i)=1
      end


Additional reference words: 4.00 4.10 5.00 5.10 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.