Microsoft KB Archive/77258

= FIX: Compiler Hang with /Zi or /Od, INTERFACE Statement =

Article ID: 77258

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 Q77258



SYMPTOMS
Compiling a source file containing a FORTRAN subroutine and a corresponding INTERFACE statement for that subroutine may cause the FORTRAN version 5.1 compiler to hang the machine under MS-DOS when the /Zi or /Od option is used. The code that exhibits this error must have a subroutine that is expecting a structure element and an array as arguments. Compiling this same source file under OS/2 may generate a protection violation during the first pass of the compiler.



RESOLUTION
Removing the array, /Zi option, structure, or INTERFACE statement eliminates the problem. Switching the order of the arguments within the INTERFACE statement and subroutine call will also eliminate the problem.



STATUS
Microsoft has confirmed this to be a problem in Microsoft FORTRAN version 5.1 for MS-DOS and OS/2. This problem was corrected in FORTRAN PowerStation, version 1.0.



MORE INFORMATION
The following code reproduces the problem:

Sample Code
C Compile options needed: /Zi

INTERFACE to subroutine sub(w,r) real r(2) structure / struc / integer i     end structure record / struc / w     end

SUBROUTINE sub(w,r) real r(2) structure / struc / integer i     end structure record / struc / w       r(1) = 11.11 end

Additional query words: 5.10 buglist5.10 fixlist1.00

Keywords: kbfix KB77258

-

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

© Microsoft Corporation. All rights reserved.