Microsoft KB Archive/71335

F1001: trees.c, Line 1165, Adjustable-Size Array with ENTRY PSS ID Number: Q71335 Article last modified on 04-08-1993

5.00 | 5.00

MS-DOS | OS/2

Summary:

In FORTRAN 5.00, when compiling a program that contains an adjustable-size array that is accessed in a subroutine before the ENTRY point at which the array is passed into the routine, the following error may occur:

fatal error F1001: Internal Compiler Error (compiler file ‘../../../P2/trees.c’, line 1165) Contact Microsoft Technical Support

Microsoft has confirmed this to be a problem in Microsoft FORTRAN version 5.00 for MS-DOS and OS/2. This problem was corrected in Microsoft FORTRAN version 5.10.

More Information:

The code below reproduces the internal compiler error:

subroutine sub(ndim) dimension array(ndim) do 700 i=1,8 array(i)=0              ! Array has not been passed in yet 700 continue return entry wavef(array) end

The program should generate the following error message:

error F2500: ARRAY : adjustable-size array : used before

definition

This error is correctly generated in Microsoft FORTRAN versions 4.00, 4.01, and 4.10 and 5.10.

The adjustable-size array should be dimensioned and initialized after the ENTRY point where the array is passed as an argument.

The following code illustrates how an adjustable-size array should be used with an ENTRY into a subroutine:

subroutine sub(ndim) return entry wavef(array)       ! Array passed into subroutine dimension array(ndim)    ! then dimensioned and used do 700 i=1,8 array(i)=0 700 continue end

=
================================================================

Copyright Microsoft Corporation 1993.