FIX: Constants Out of Range Not Found by /4Yb (109874)
The information in this article applies to:
- Microsoft FORTRAN PowerStation for MS-DOS 1.0
- Microsoft FORTRAN PowerStation for MS-DOS 1.0a
- Microsoft Fortran Powerstation 32 for Windows NT 1.0
This article was previously published under Q109874 SYMPTOMS
A program that contains a simple arithmetic expression including constant
out of range may produce incorrect results. Using the -4Yb compiler option
does not give a run-time error on constants that are out of range even
though it should.
CAUSE
The constant folding algorithm (arithmetic performed at compile time)
generates 0 (zero) for the variable out of range.
RESOLUTION
Avoid using a simple constant expression that might be out of range. Use
the temporary variable for the intermediate results and then use this
variable in the expression. Compile the program with -4Yb and the
appropriate run-time error will be generated.
STATUS
Microsoft has confirmed this to be a problem in Microsoft FORTRAN
PowerStation 32 for NT, version 1.0 and FORTRAN Powerstation for
MS-DOS version 1.0 and 1.0a. This is not a problem in Microsoft FORTRAN
for MS-DOS, version 5.1, or FORTRAN PowerStation 32, version 4.0.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbbug kbCompiler kbfix KB109874 |
---|
|