FIX: F2124 with STRUCTURE, COMMON, and LOCFAR

ID: Q77562


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


SYMPTOMS

The following error message during pass two of the compiler:

F2124: Code Generation Error


CAUSE

This error message may happen when the following occur in combination:

  1. A STRUCTURE declaration, with a field declared as INTEGER*4.


  2. The STRUCTURE placed in COMMON.


  3. Setting the value of the LOCFAR function to a REAL number, when the LOCFAR function takes the INTEGER STRUCTURE element as an argument.



STATUS

Microsoft has confirmed this to be a problem in the products listed above. This problem was corrected in FORTRAN PowerStation.


MORE INFORMATION

The following code can be used to generate the error:

Sample code


        STRUCTURE /A2DStructure/ 
           INTEGER*4 Average
        END STRUCTURE

        RECORD /A2DStructure/ A2D
        COMMON /A2D/ A2D

             REAL*4 r
             r = 1.0
             r = r * LOCFAR(a2d.average)
        END 

Additional query words: 5.00 5.10 buglist5.00 buglist5.10 fixlist1.00

Keywords :
Version : :5.0,5.1
Platform :
Issue type :


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