Microsoft KB Archive/77461

= PRB: 486, Subroutine Array Element Crosses Segment =

Article ID: 77461

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.1
 * Microsoft FORTRAN Compiler 5.1

-



This article was previously published under Q77461



SYMPTOMS
Programs may generate a protection violation under OS/2 or hang the machine under MS-DOS when that program passes a HUGE array element to a subroutine. In most cases, the coproccesor must be used for the error to occur.

The element from the HUGE array must be contained after the first 64K segment of the HUGE array.



CAUSE
The compiler does not check every array access to verify if it crosses a segment boundary, and was not designed to do so.



RESOLUTION
Try using the HUGE memory model by compiling with /AH to allow arrays to span segments.

This is not an issue in FORTRAN PowerStation.



MORE INFORMATION
The following code reproduces the error: real x(16385) x=1. call y(x(16384)) end

subroutine y(x1) real*8 x1,z z = x1 + 1.d0     write(*,*) x1, z      end

Additional query words: 5.10

Keywords: KB77461

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.