FIX: $DEBUG Does Not Trap Range Errors in Implied-DO Loops

ID: Q106635


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 4.0, 4.1, 5.0, 5.1
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0, 5.1
  • Microsoft FORTRAN PowerStation for MS-DOS, versions 1.0, 1.0a
  • Microsoft Fortran Powerstation 32 for Windows NT, version 1.0


SYMPTOMS

Extended error handling (enabled by $DEBUG or /4Yb) does not catch array subscript out-of-range errors in implied-DO loops (it does not generate F6096).


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 version 4.0.


MORE INFORMATION

To duplicate the problem, compile and run the sample code below, which generates no errors. Because the code writes to elements 11-20 of array J, the following should have been generated:

: run-time error F6096: $DEBUG
- array subscript expression out of range

Sample Code


C Compiler options needed: none
$debug
      parameter (n=20)
      integer j(10)
      j=1                      ! set entire array to 1
      write (*,*) (j(i),i=1,n)
      end 

Additional query words: 1.00

Keywords :
Version : :1.0,1.0a,4.0,4.1,5.0,5.1
Platform :
Issue type :


Last Reviewed: November 2, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.