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:
Produces output listings in the file any1.lst
Compiles and links the program if there are no errors
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.
demo% f77 -Xlisto /dev/tty any1.f
The -Xlist option provides a combination of features available for output. With no other -Xlist options, you get the following by default:
The listing file name is taken from the first input source or object file that appears, with the extension replaced by .lst
A line-numbered source listing
Error messages (embedded in listing) for inconsistencies across routines
Cross-reference table of the identifiers
Pagination at 66 lines per page and 79 columns per line
No call graph
No expansion of include files
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.
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