Microsoft KB Archive/63381

= FIX: &quot;R6001: Null Pointer Assignment&quot; From Loop Optimization =

Article ID: 63381

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.0

-



This article was previously published under Q63381



SYMPTOMS
An attempt to run an application fails and the following message appears on the screen:

R6001: null pointer assignment



CAUSE
The application was compiled by FORTRAN version 5.0 with loop optimizations enabled.



RESOLUTION
To work around this problem, perform one of the following steps:


 * Specify the /Od or /Odct compiler option switch to disable loop optimization.
 * Replace any arrays of CHARACTER*1 variables with character strings.



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



MORE INFORMATION
The following code example demonstrates this problem.

Sample Code
C Compile options needed: None

CHARACTER*1 STR1(10), STR2(10) DATA STR1 / 'T', '.', 'B', '.', 'C', '.', 4*' ' / CALL COPYSTR(STR1, 1, 10, STR2, 1) END

SUBROUTINE COPYSTR(IARRAY, IBEG, IEND, JARRAY, JBEG) CHARACTER*1 IARRAY(10), JARRAY(10)

JPT = JBEG DO 100 IGET = IBEG, IEND JARRAY(JPT) = IARRAY(IGET) JPT = JPT + 1 100 CONTINUE RETURN END

Additional query words: 5.00 buglist5.00 fixlist5.10

Keywords: kbfix KB63381

-

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

© Microsoft Corporation. All rights reserved.