FIX: No F6099 with /4I2 and /4Yb on Integer Overflow (104777)
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 Q104777 SYMPTOMS
Programs compiled with the $STORAGE:2 metacommand, the /4I2 option and
$DEBUG metacommand, or the /4Yb option, with integer variables taking
values beyond their full 16-bit range (-32,768 to 32,767), may not
generate the following error:
Run-Time Error F6099: $DEBUG
INTEGER overflow
CAUSE
The $STORAGE:2 metacommand, /4I2 option and $DEBUG metacommand, or the
/4Yb option does not cause the compiler to generate additional code
that will lead to a jump to the overflow routine for integer values
that are out of range. This incorrect code generation is due to the
common subexpression elimination optimization.
RESOLUTION
To correctly generate this error message for integer values that are
out of the integer*2 (16-bit) range, compile with the /Od switch to
disable optimization. Optimization may be partially turned back on
with the optimization switches: /Os, /Ot, and /Ol (which do not enable
common subexpression elimination /Oc).
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.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbbug kbfix KB104777 |
---|
|