FIX: F1001: regMD.c:1.8, Line 338; REAL Arg, /FPc, /FPa

ID: Q73570


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

Compiling a program with the /FPc, /FPa, or /FPc87 option that uses a real formal argument and another numeric formal argument to index an array in an assignment statement may cause the compiler to issue the error:

filename(line#) : fatal error F1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.8', line 338)
Contact Microsoft Technical Support


RESOLUTION

One solution is to assign the real formal argument to a temporary variable and to use the temporary variable as the array index. The error also does not occur is the program is compiled with both /4Yb and /Od.


STATUS

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


MORE INFORMATION

The following program will cause the F1001 compiler error:

Sample code


       SUBROUTINE Test(RealArgument,Argument)

      INTEGER ArrayVariable (2,1)
      REAL RealArgument
      INTEGER Argument

c  In the following line, the order of the arguments is not
c  significant.  The compiler will also fail if another variable is
c  assigned to ArrayVariable but will not fail if ArrayVariable is
c  used in a CALL statement.

      ArrayVariable( Argument, RealArgument) = 0

      END 
The following program illustrates the suggested workaround:

Sample code


       SUBROUTINE Test(RealArgument,Argument)

        INTEGER ArrayVariable (2,1)
        REAL RealArgument
        INTEGER Argument

        TemporaryVariable = RealArgument
        ArrayVariable( Argument, TemporaryVariable) = 0

      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 2, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.