FIX: Optimization Problem, $STORAGE:2 and Multiplication (73392)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q73392 SYMPTOMS
The sample code below produces the output:
6 0
instead of the expected output
6 1280
RESOLUTION
Use one of the following to work around the problem in the sample code:
- Disable optimization by compiling with /Od
-or-
- Delete $storage:2 so that the default $storage:4 is used
-or-
- Assign the result of (iy - 1) in line 10 to a temporary variable and use
the temporary variable in line 20.
STATUS
Microsoft has confirmed this to be a bug in the products listed above. This
problem was corrected in FORTRAN PowerStation, version 1.0.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbfix KB73392 |
---|
|