When a Fortran program terminates due to a severe error condition, the Fortran run-time system displays additional diagnostic information after the run-time message.
The Fortran run-time system attempts to walk back up the call chain and produce a report of the calling sequence leading to the error as part of the default diagnostic message report. The minimum information displayed includes:
The information displayed under the Routine, Line, and Source columns depends upon whether your program was compiled with the /traceback option. In the visual development environment, the default is /traceback in the debug configuration, but must be requested for the release configuration (Run Time category of Project settings).
For example, if /traceback were specified, the displayed information might resemble the following:
forrtl: severe (24): end-of-file during read, unit 10, file E:\USERS\xxx.dat
Image PC Routine Line Source
DFORRT.dll 1000A3B2 Unknown Unknown Unknown
DFORRT.dll 1000A184 Unknown Unknown Unknown
DFORRT.dll 10009324 Unknown Unknown Unknown
DFORRT.dll 10009596 Unknown Unknown Unknown
DFORRT.dll 10024193 Unknown Unknown Unknown
teof.exe 004011A9 AGAIN 21 teof.for
teof.exe 004010DD GO 15 teof.for
teof.exe 004010A7 WE 11 teof.for
teof.exe 00401071 HERE 7 teof.for
teof.exe 00401035 TEOF 3 teof.for
teof.exe 004013D9 Unknown Unknown Unknown
teof.exe 004012DF Unknown Unknown Unknown
KERNEL32.dll 77F1B304 Unknown Unknown Unknown
If the same program was not compiled with the /traceback option (/notraceback):
The /traceback option provides program counter to source file line correlation information to appear in the displayed error message information, which simplifies the task of locating the cause of severe run-time errors. For Fortran objects generated with /traceback, the compiler generates additional information used by the Fortran run-time system to automatically correlate PC (program counter) values to the routine name in which they occur, Fortran source file, and line number in the source file. This information is displayed in the run-time error diagnostic report.
Automatic PC correlation is only supported for Fortran code. For non-Fortran code, only the hexadecimal PC locations are reported.
The following sections describe traceback-related tools, lists traceback-related environment variables, discuss tradeoffs and restrictions, and provide examples: