Microsoft KB Archive/73570

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

Article ID: 73570

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.1
 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.1

-



This article was previously published under Q73570



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: kbfix KB73570

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.