Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Generate Listing and Map Files

Compiler-generated assembler output listings and linker-generated map files can help you understand the effects of compiler optimizations and see how your application is laid out in memory. They may also help you interpret the information provided in a stack trace at the time of an error.

How to Generate Assembler Output

When compiling from the command line, specify the S option:

ifx -S file.f90 ! Linux
ifx file.f90 /S ! Windows

Linux

The resulting assembly file name has an .s suffix.

Windows

The resulting assembly file name has an .asm suffix.

You can also use the Microsoft Visual Studio* Integrated Development Environment to generate assembler output:

  1. Select Project > Properties.

  2. Click the Fortran tab.

  3. In the Output Files category, change the Assembler Output settings according to your needs. You can choose from a number of options such as No Listing, Assembly-only Listing, and Assembly, Machine Code and Source.

How to Generate a Link Map (.map) File

When compiling from the command line, specify the -Xlinker and -M options (Linux) or the /map (Windows) option:

ifx file.f90 -Xlinker -M  ! Linux
ifx file.f90 /map ! Windows

Windows

You can also use the Microsoft Visual Studio* Integrated Development Environment to generate a link map:

  1. Select Project>Properties.

  2. Click the Linker tab.

  3. In the Debug category, select Generate Map File.

How to Generate a Source File Listing

You can use the list compiler option to create a listing of the source file. The listing can contain the following information: a display of INCLUDE files, a symbol list with a line number cross reference for each routine, and a list of compiler options used for the compilation.

Use the show compiler option to control the contents of the listing file.

Windows

You can also use the Microsoft Visual Studio* Integrated Development Environment to create a source file listing:

  1. Select Project > Properties.

  2. Click the Fortran tab.
  3. In the Output Files category, change the Source Listing setting to Yes.

See Also