Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

3.4.105 –Xlist[x]

(Solaris only) Produce listings and do global program checking (GPC) .

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.


Note -  Be sure to correct all syntax errors in the source code before compiling with -Xlist. Unpredictable reports may result when run on a source code with syntax errors.

Example: Check across routines for consistency:

 demo% f95 -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-11  –Xlist Sub-options
Option
Feature
–Xlist
Show errors, listing, and cross reference table
–Xlistc
Show call graphs and errors
–XlistE
Show errors
–Xlisterr[nnn]
Suppress error nnn messages
–Xlistf
Show errors, listing, and cross references, but no object files
–Xlisth
Terminate compilation if errors detected
–XlistI
Analyze #include and INCLUDE files as well as source files
–XlistL
Show listing and errors only
–Xlistln
Set page length to n lines
-XlistMP
Check OpenMP directives (SPARC)
–Xlisto name
Output report file to name instead of file.lst
–Xlists
Suppress unreferenced names from the cross–reference table
–Xlistvn
Set checking level to n (1,2,3, or 4) -default is 2
–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

See the Fortran Programming Guide chapter “Program Analysis and Debugging” for details.

This option is not available on Linux systems.