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

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

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

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 reference words: 5.00 5.10 buglist5.00 buglist5.10 fixlist1.00
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.