ID: Q94575
4.00 4.01 4.05 | 4.00 4.01
MS-DOS | WINDOWS
kbtool kbcode kberrmsg kbbuglist kbfixlist
The information in this article applies to:
An attempt to debug with CodeView an application developed with Microsoft FORTRAN fails when CodeView terminates with an error or causes the machine to halt. This error occurs with applications developed only with FORTRAN and those developed using another language with FORTRAN code.
When debugging the FORTRAN code in MS-DOS, CodeView may generate the following error message:
run-time error R6003
- integer divide by 0
When debugging the FORTRAN code in Windows, the computer may hang and stop
responding until the computer is rebooted.
The FORTRAN code declares and uses an array of COMPLEX numbers.
To work around this problem, step over calls to FORTRAN modules that contains an array of COMPLEX numbers. In most cases, CodeView can debug the remainder of the code in the application without any problems.
Microsoft has confirmed this to be a problem in CodeView versions 4.0, 4.01, and 4.05 for MS-DOS and versions 4.0 and 4.01 for Windows. This problem was corrected in CodeView version 4.1.
To reproduce this problem in an application developed for the MS-DOS environment, compile and debug the following mixed-language project. To reproduce this problem in an application developed for the Microsoft Windows environment, link the FORTRAN object file into the GENERIC sample application provided with Microsoft C/C++ versions 7.0 and 7.0a and with the Microsoft Windows Software Development Kit (SDK).
Microsoft CodeView version 4.1 does not have this problem, however since the C++ and C expression evaluators do not support complex data types, they are not displayed correctly.
/*
* Compile options needed: None
*/
void extern far FORTRAN sub1(void);
void main(void)
{
sub1();
}
C Compile options needed: None
SUBROUTINE SUB1
COMPLEX A(1)
A(1)=(1.0,1.0)
END
# Make options needed: None
all: cmix.exe
fortmix.obj: fortmix.for
fl /c /Zi /Od /Gs fortmix.for
cmix.obj: cmix.c
cl /c /Zi /Od /Gs /AL cmix.c
cmix.exe: cmix.obj fortmix.obj
link cmix fortmix,, nul, /co /noe /nod llibc7 llibf7rc oldnames;
Additional reference words: 4.00
KBCategory: kbtool kbcode kberrmsg kbbuglist kbfixlist
KBSubcategory: CvwIss
Keywords : kb16bitonly
Solution Type : kbfix
Last Reviewed: September 17, 1997