FIX: F1001: confold.c Line 253, Negative Integer Exponent

Last reviewed: September 16, 1997
Article ID: Q100377
1.00 1.00a | 1.00
MS-DOS     | WINDOWS NT
kbtool kbbuglist kberrmsg kbcode

The information in this article applies to:

  • Microsoft FORTRAN PowerStation for MS-DOS version 1.0 and 1.0a
  • Microsoft FORTRAN PowerStation 32 version 1.0

SYMPTOMS

An attempt to compile an application fails and Microsoft FORTRAN PowerStation version 1.0 for MS-DOS displays the following message:

   fatal error F1001: INTERNAL COMPILER ERROR
      (compiler file '@(#)confold.c:1.144', line 253)
      Contact Microsoft Product Support Services

FORTRAN PowerStation version 1.0a for MS-DOS displays the following error message:

   fatal error F1001: INTERNAL COMPILER ERROR
      (compiler file '@(#)confold.c:1.144', line 254)
      Contact Microsoft Product Support Services


CAUSE

The command line specifies the /Ox optimization and the code contains an expression that computes a negative integer power of a constant integer or of an integer expression. The error above occurs when the compiler processes the unary minus operator in an integer exponentiation expression.

RESOLUTION

There are two methods to work around this problem:

  • Modify the compiler command line to specify the /Oxp compiler option switch.
  • Modify the source code to remove the unary minus operator from integer expressions used as exponents. Assign the exponent to a temporary variable and negate the value. Then specify the temporary as the exponent.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was fixed in FORTRAN PowerStation 32, version 4.0.

MORE INFORMATION

The following sample code demonstrates this problem:

Sample Code #1

c Compiler options needed: /Ox

      program test
      integer j
      real    x

      j = 1
      x = 2**(-j)
      print *, x
      end

The following sample code demonstrates one method to work around this problem:

Sample Code #2

c Compile options needed: /Ox

      program test
      integer j
      real    x

      j = 1
      j = -j      ! Negation occurs here.
      x = 2**(j)
      print *, x
      end


Additional reference words: 1.00 1.00a
KBCategory: kbtool kbbuglist kberrmsg
KBSubcategory: FL32Iss
Keywords : FL32Iss kbbuglist kberrmsg kbtool
Version : 1.00 1.00a | 1.00
Platform : MS-DOS NT WINDOWS
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.