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

ID 767251
Date 3/22/2024
Public

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

Document Table of Contents

COMPILER_OPTIONS

Module Intrinsic Inquiry Function: Returns a string containing the compiler options that were used for compilation.

Module

USE ISO_FORTRAN_ENV

Syntax

result = COMPILER_OPTIONS( )

Results

The result is a scalar of type default character of processor-defined length.

The return value is a list of the compiler options that were used for compilation.

Example

Consider the following file named t.f90:

use ISO_FORTRAN_ENV
character (len = :), allocatable :: res
res = compiler_options ()
print *, "len of res is: ", len (res)
print "('<<', A, '>>')", res
deallocate (res)
end 

The following is the output:

Linux

Lin$ ifx -o t.out -warn alignments -check bounds t.f90   
Lin$ t.out
 len of res is:           40
<<-o t.out -warn alignments -check bounds >>

Windows

Win>ifx /o t.out /warn:alignments /check:bounds t.f90
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.1.0 Build 20240103
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 14.38.33130.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:t.out
-subsystem:console
t.obj

Win>t.out
 len of res is:           40
<</o:t.out /warn:alignments /check:bounds >>