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

Last reviewed: September 16, 1997
Article ID: Q77258
5.10 | 5.10 MS-DOS | OS/2 kbtool kbbuglist kbfixlist

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 reference words: 5.10 buglist5.10 fixlist1.00
KBCategory: kbtool kbbuglist kbfixlist
KBSubcategory: FLIss
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.