The -Xlist option on the command line invokes the compiler’s global program analyzer. There are a number of suboptions, as described in the sections that follow.
Example: Compile three files for basic global program checking:
demo% f95 -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.
Example: Display to terminal:
demo% f95 -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
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, .f95, .for, .F, .F95, or .o. The .o files supply the process with information regarding only global names, such as subroutine and function names.