FIX: SELECT CASE with /4I2 Creates Oversized .OBJ Module

Last reviewed: September 11, 1997
Article ID: Q68104
5.00 5.10 | 5.00 5.10
MS-DOS    | OS/2
kbtool kbfixlist kbbuglist kberrmsg

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, versions 5.0 and 5.1
  • Microsoft FORTRAN for OS/2, versions 5.0 and 5.1

SYMPTOMS

The FORTRAN compiler can create greatly oversized object modules when a program that uses the SELECT CASE statement is compiled with the /4I2 switch in the MS-DOS environment. When the same program is compiled under OS/2, the compiler appears to hang.

Because of the size of the object module, the following warnings are also generated when you compile with the /4I2 switch:

   F4063: function too large for post-optimizer
   L4020: code segment size exceeds 65500

The resulting executable can cause the machine to hang.

RESOLUTION

To avoid this problem, do not use the /4I2 compiler switch when you are compiling programs that use the SELECT CASE...END SELECT statement.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN versions 5.0 and 5.1. This problem was corrected in FORTRAN PowerStation.

MORE INFORMATION

When the following sample program is compiled with the /4I2 compiler switch under MS-DOS, the program produces an object file of over 160,000 bytes. Without the /4I2 switch, an object module of several hundred bytes is generated. An assembly listing of the program shows that the compiler generates repetitive lines of invalid code.

Sample Code

      select case (i)
             case (  :-3)
             case (-2: 0)
             case ( 1 )
             case ( 2 )
      end select
      end


Additional reference words: 5.00 5.10
KBCategory: kbtool kbfixlist kbbuglist kberrmsg
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 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.