Manual Reference Pages  - compiler_version (3fortran)

NAME

COMPILER_VERSION(3) - [COMPILER:INQUIRY] Compiler version string

SYNOPSIS

result = compiler_version()

         character(len=:) function compiler_version()

CHARACTERISTICS

o The return value is a default-kind scalar character with system-dependent length.

DESCRIPTION

COMPILER_VERSION(3) returns a string containing the name and version of the compiler.

OPTIONS

None.

RESULT

The return value contains the name of the compiler and its version number used to compile the file containing the COMPILER_VERSION(3) call.

EXAMPLES

Sample program:

    program demo_compiler_version
    use, intrinsic :: iso_fortran_env, only : compiler_version
    use, intrinsic :: iso_fortran_env, only : compiler_options
    implicit none
       print ’(4a)’, &
          ’This file was compiled by ’, &
          compiler_version(),           &
          ’ using the options ’,        &
          compiler_options()
    end program demo_compiler_version

Results:

     > This file was compiled by GCC version 10.3.0

> This file was compiled by Intel(R) Fortran Intel(R) 64 Compiler > Classic for applications running on Intel(R) 64, Version 2021.3.0 Build > 20210609_000000

> This file was compiled by nvfortran 21.5-0 LLVM

STANDARD

Fortran 2008

SEE ALSO

COMPILER_OPTIONS(3), ISO_FORTRAN_ENV(7)

Fortran intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 compiler_version (3fortran) February 19, 2025
Generated by manServer 1.08 from 65e643ec-8906-4a5c-b5af-732a5b7d47b6 using man macros.