The information in this article applies to:
SYMPTOMSPrograms compiled with FORTRAN versions 4.0, 4.01, 4.1, and 5.0 that have an INTEGER*2 array dimensioned at exactly 32768 and that also access the last element of this array with a variable as a subscript, can give the following error during run time: These programs must be compiled with /4Yb or the $DEBUG metacommand to generate the error. If debug information is removed from the program, the code will run correctly. RESOLUTIONOne possible solution is to increase the array size by one. STATUSMicrosoft has confirmed this to be a problem in FORTRAN versions 4.0, 4.01, 4.1, and 5.0. This problem has been corrected in FORTRAN version 5.1. MORE INFORMATIONThe following code reproduces the problem:
An integer overflow error is correctly flagged on line 5 when this
code is compiled with /4Yb or $DEBUG. This program is overlowing since
the array index must be multiplied by 4 to obtain the offset for the
variable, since the machine is byte addressable.
Increasing the dimension of the array by one also removes the integer overflow, as illustrated by the following program:
Additional query words: 5.00
Keywords : |
Last Reviewed: November 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |