COMPILER_VERSION

Module Intrinsic Inquiry Function: Returns a string containing the name and version number of the compiler used for compilation.

Module

USE ISO_FORTRAN_ENV

Syntax

result = COMPILER_VERSION( )

Results

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

The return value contains the name and version number of the compiler used for compilation.

Example

Consider the following file named t.f90:

use ISO_FORTRAN_ENV

character (len = :), allocatable :: res

res = compiler_version ()
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:           98
<<Intel® Fortran Compiler for applications running on Intel® 64, Version 2024.1.0 Build 20240125>>

Windows

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

Microsoft ® 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:           98
<<Intel® Fortran Compiler for applications running on Intel® 64, Version 2024.1.0 Build 20240103>>

See Also