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

ID: Q77258


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, version 5.1
  • Microsoft FORTRAN for OS/2, version 5.1


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 :
Version : :5.1
Platform :
Issue type :


Last Reviewed: November 2, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.