FIX: L1103 and Initialization of Large Common BlocksLast reviewed: September 11, 1997Article ID: Q58431 |
5.00 5.10 | 5.00 5.10
MS-DOS | OS/2kbtool kbfixlist kbbuglist kberrmsg kbcode The information in this article applies to:
SYMPTOMSThe program below causes the following linker error:
fatal error L1103: attempt to access data outside segment boundsThe program defines a common block of arrays that span multiple segments. The program then initializes the arrays in the common block. The error is generated because the program is initializing the arrays in a different order than they are specified in the common block.
RESOLUTIONThe work-around is to initialize the arrays in the same order that they appear in the common block. NOTE: It is also possible to generate an internal compiler error by making simple modifications to the source code mentioned above. However, the workaround, is the same: initialize arrays in the order they are defined in the common block. For an example, query on the following in this Knowledge Base:
internal and compiler and error and F1001 and line and 185 STATUSMicrosoft has confirmed this to be a problem in FORTRAN version 5.0 and 5.1. This problem was corrected in FORTRAN PowerStation.
MORE INFORMATIONThe following program demonstrates the linker error L1103: C ============ FORTRAN SOURCE CODE == Fragment #1 ===============
real*8 test1, test2 common /test/ test1(1000,10), test2(100) data test2 /100*0/ data test1 /10000*0/ endC =============================================================== The workaround is to initialize the arrays in the order they appear in the common block, as shown below.
C ============ FORTRAN SOURCE CODE == Fragment #2 ===============
real*8 test1, test2 common /test/ test1(1000,10), test2(100) data test1 /10000*0/ data test2 /100*0/ endC ===============================================================
|
Additional reference words: 5.00 5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |