FIX: /AH and /4Yb with Adjustable-Size Arrays Cause F2124

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

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 code with the /4Yb and /AH options that contains an adjustable- size array that is passed in a CALL statement to another subroutine may cause the compiler to generate the following error:

   error F2124: CODE GENERATION ERROR

CAUSE

The problem is caused by common sub-expression elimination optimization.

RESOLUTION

Compiling with /Od will suppress the error. When debugging is completed and the /4Yb option is removed full optimization can then be used.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN version 5.1. This problem was corrected in FORTRAN PowerStation, version 1.0.

MORE INFORMATION

Compiling the following code with /AH and /4Yb will reproduce the problem:

Sample code

      subroutine sub1(n,p)
      real p(n,2,1)

      call sub2(p(1,2,1))

      return
      end


Additional reference words: 5.10 buglist5.10 fixlist1.00
KBCategory: kbtool kbfixlist kbbuglist
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.