FIX: Incorrect Results Writing Array of Structure VariablesLast reviewed: September 11, 1997Article ID: Q68528 |
5.00 | 5.00
MS-DOS | OS/2
kbtool kbfixlist kbbuglist kberrmsg kbcode
The information in this article applies to:
SYMPTOMSAn application produces incorrect results when it writes an array of structure variables. An attempt to compile the application with the patched High-Capacity FORTRAN version 5.0 compiler (F1L.EXE) and link for OS/2 fails and Microsoft LINK generates the following message:
Error L2002: fixup overflow at 13 in segment _DATAThe application runs correctly when you compile it with the unpatched versions of the Microsoft FORTRAN version 5.0 F1.EXE or F1L.EXE file.
CAUSEThe application was compiled with the patched version of the F1.EXE file or with the patched F1L.EXE file.
RESOLUTIONTo address this problem, perform one of the following two steps:
STATUSMicrosoft has confirmed this to be a problem in the patched version of FORTRAN version 5.0 for MS-DOS and OS/2. This problem was corrected in FORTRAN version 5.1 for MS-DOS and OS/2.
MORE INFORMATIONAmong other things, the F1.EXE patch corrects the following error:
F1001: Internal Compiler Error compiler file omf_ms.c:1.118, line 1093This error often occurs when an application performs an I/O operation on the elements of a structure after passing that structure to a subprogram. The High-Capacity Compiler, F1L.EXE, is an alternate form of the first compiler pass. Use the High-Capacity Compiler when an attempt to compile an application with the regular compiler fails and generates the following message:
F1901: program too large for memoryThe following code example demonstrates this problem.
Sample Code #1C Compile options needed: None
STRUCTURE / REC / CHARACTER*12 NUM END STRUCTURE RECORD / REC / ALLREC(3) ALLREC(1).NUM = 'ONE' ALLREC(2).NUM = 'TWO' ALLREC(3).NUM = 'THREE'10 FORMAT(' ', A12) DO 20 I = 1, 3 WRITE(*, 10) ALLREC(I).NUM ! Outputs "ONE" for each iteration20 CONTINUE ENDIn the following code example, NUM is a one element array. The program produces the expected output.
Sample Code #2C Compile options needed: None
STRUCTURE / REC / CHARACTER*12 NUM(1) END STRUCTURE RECORD / REC / ALLREC(3) ALLREC(1).NUM = 'ONE' ALLREC(2).NUM = 'TWO' ALLREC(3).NUM = 'THREE'10 FORMAT(' ', A12) DO 20 I = 1, 3 WRITE(*, 10) ALLREC(I).NUM(1) ! Outputs "ONE" ! "TWO" ! "THREE"20 CONTINUE END |
Additional reference words: 5.00 buglist5.00 fixlist5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |