Produce listings and do global program checking (GPC).
SPARC: 77/90 x86:77
Use this option to find potential programming bugs. It invokes an extra compiler pass to check for consistency in subprogram call arguments, common blocks, and parameters, across the global program. The option also generates a line-numbered listing of the source code, including a cross reference table. The error messages issued by the -Xlist options are advisory warnings and do not prevent the program from being compiled and linked.
Be sure to correct all syntax errors in the source code before compiling with a -Xlist global program checking output. GPC can produce unpredictable reports when run on a source code with syntax errors.
Example: Check across routines for consistency:
demo% f77 -Xlist fil.f
The above example writes the following to the output file fil.lst:
A line-numbered source listing (default)
Error messages (embedded in the listing) for inconsistencies across routines
A cross reference table of the identifiers (default)
By default, the listings are written to the file name.lst, where name is taken from the first listed source file on the command line.
A number of sub-options provide further flexibility in the selection of actions. These are specified by suffixes to the main -Xlist option, as shown in the following table
Table 3-22 -Xlist Suboptions (Not all options are available with f90)
Option |
Feature |
---|---|
-Xlist |
Show errors, listing, and cross reference table |
-Xlistc |
Show call graphs and errors (f77 only) |
-XlistE |
Show errors |
-Xlisterr[nnn] |
Suppress error nnn messages |
-Xlistf |
Show errors, listing, and cross references, but no object files (f77 only) |
-Xlistflndir |
Put .fln files in directory dir, which must already exist (f77 only) |
-Xlisth |
Terminate compilation if errors detected (f77 only) |
-XlistI |
Analyze #include and INCLUDE files as well as source files |
-XlistL |
Show listing and errors only |
-Xlistln |
Set page length to n lines |
-Xlisto name |
Rename report file to name.lst |
-Xlists |
Suppress unreferenced names from the cross-reference table (f77 only) |
-Xlistvn |
Set checking level to n (1,2,3, or 4) - default is 2 (f77 only) |
-Xlistw[nnn] |
Set width of output line to nnn columns - default is 79 |
-Xlistwar[nnn] |
Suppress warning nnn messages |
-XlistX |
Show cross-reference table and errors |
Options -Xlistc, -Xlistf, -Xlistflndir, -Xlisth, -Xlists, and -Xlistvn are not available with f90.
See the Fortran Programming Guide chapter Program Analysis and Debugging for details.