Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Traceback

When a Fortran program terminates due to a severe error condition, the Fortran runtime system displays additional diagnostic information after the runtime message.

The Fortran runtime 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. This is known as traceback. The minimum information displayed includes:

  • The standard Fortran runtime Runtime Message Display and Format text that explains the error condition.

  • A tabular report that contains one line per call stack frame. This information includes at least the image name and a hexadecimal PC in that image.

The information displayed under the Routine, Line, and Source columns depends on whether your program was compiled with the traceback option.

For example, if option traceback is specified, the displayed information may resemble the following:

 forrtl: severe (24): end-of-file during read, unit 10, file E:\USERS\xxx.dat
 Image             PC        Routine         Line     Source
 libifcorert.dll   1000A3B2  Unknown         Unknown  Unknown
 libifcorert.dll   1000A184  Unknown         Unknown  Unknown
 libifcorert.dll   10009324  Unknown         Unknown  Unknown
 libifcorert.dll   10009596  Unknown         Unknown  Unknown
 libifcorert.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 is not compiled with the traceback option:

  • The Routine name, Line number, and Source file columns would be reported as "Unknown."

  • A link map file is usually needed to locate the cause of the error.

The traceback option provides program counter (PC) to source file line correlation information to appear in the displayed error message information, which simplifies the task of locating the cause of severe runtime errors.

For Fortran objects generated with the traceback option, the compiler generates additional information used by the Fortran runtime system to automatically correlate PC 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 runtime error diagnostic report.

Automatic PC correlation is only supported for Fortran code. For non-Fortran code, only the hexadecimal PC locations are reported.