Fortran Programming Guide

How to Invoke Global Program Checking

The -Xlist option on the command line invokes the compiler's global program analyzer. There are a number of -Xlistx suboptions, as described in the sections that follow.

Example: Compile three files for basic global program checking:


demo% f77 -Xlist  any1.f  any2.f  any3.f

In the preceding example, the compiler:

Screen Output

Normally, output listings produced by -Xlistx are written to a file. To display directly to the screen, use -Xlisto to write the output file to /dev/tty.

Example: Display to terminal:


demo% f77 -Xlisto /dev/tty  any1.f 

Default Output Features

The -Xlist option provides a combination of features available for output. With no other -Xlist options, you get the following by default:

File Types

The checking process recognizes all the files in the compiler command line that end in .f, .f90, .for, .F, or .o. The .o files supply the process with information regarding only global names, such as subroutine and function names.

Analysis Files (.fln Files)

Programs compiled with --Xlist options have their analysis data built into the binary files automatically. This enables global program checking over programs in libraries.

Alternatively, the compiler will save individual source file analysis results into files with a .fln suffix if the -Xlistflndir option is also specified. dir indicates the directory to receive these files.


demo% f77 -Xlistfln/tmp *.f