FIX: F1001 regMD.c, Line 338; Huge Array as Array Index

Last reviewed: September 16, 1997
Article ID: Q86062
4.00 4.01 4.10 5.00 5.10 | 4.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 4.0, 4.01, 4.1, 5.0, and 5.1
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0, and 5.1

SYMPTOMS

Using the Microsoft FORTRAN compiler versions 4.0, 4.01, 4.1, 5.0, and 5.1 under MS-DOS and versions 4.1, 5.0, and 5.1 under OS/2 to compile programs that contain concatenations of CHARACTER arrays where the array elements are specified using an element of a huge INTEGER array can generate the following error:

   fatal error F1001: Internal Compiler Error

The compiler file varies as follows:

   Version 5.1: (compiler file '@(#)regMD.c:1.9', line 338)

   Version 5.0: (compiler file '@(#)regMD.c:1.8', line 338)

   Versions 4.01 and 4.1: (compiler file '@(#)regMD.c:1.79', line 291)

   Version 4.0: (compiler file '@(#)regMD.c:1.74', line 1304)

RESOLUTION

Assign the value of the huge index array to a temporary variable and use this variable in the concatenation statement.

STATUS

Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions 4.0, 4.01, 4.1, 5.0, and 5.1 for MS-DOS and 4.1, 5.0, and 5.1 for OS/2. This problem was corrected in FORTRAN PowerStation, version 1.0.

MORE INFORMATION

Sample Code 1

The following code reproduces the problem:

      character*2 c
      character*1 c1(1), c2(1)
      integer*2   index(32769,1)

      c = c1(index(i,k))//c2(index(i,k))
      end

Sample Code 2

The following code corrects the problem:

      character*2 c
      character*1 c1(1), c2(1)
      integer*2   index(32769,1), temp

      temp = index(i,k)          ! temporary variable temp
      c = c1(temp)//c2(temp)     ! eliminates the error
      end


Additional reference words: 4.00 4.10 5.00 5.10 4.10 5.00 5.10
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 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.