compiler_name Function

public pure function compiler_name(self) result(name)

Return a compiler name string

Type Bound



Type IntentOptional Attributes Name
class(compiler_t), intent(in) :: self

Instance of the compiler object

Return Value character(len=:), allocatable

Representation as string


Source Code

Source Code

pure function compiler_name(self) result(name)
   !> Instance of the compiler object
   class(compiler_t), intent(in) :: self
   !> Representation as string
   character(len=:), allocatable :: name

   select case (self%id)
       case(id_gcc); name = "gfortran"
       case(id_f95); name = "f95"
       case(id_caf); name = "caf"
       case(id_intel_classic_nix);     name = "ifort"
       case(id_intel_classic_mac);     name = "ifort"
       case(id_intel_classic_windows); name = "ifort"
       case(id_intel_llvm_nix);     name = "ifx"
       case(id_intel_llvm_windows); name = "ifx"
       case(id_intel_llvm_unknown); name = "ifx"
       case(id_pgi);       name = "pgfortran"
       case(id_nvhpc);     name = "nvfortran"
       case(id_nag);       name = "nagfor"
       case(id_flang);     name = "flang"
       case(id_flang_new); name = "flang-new"
       case(id_f18);       name = "f18"
       case(id_ibmxl);     name = "xlf90"
       case(id_cray);      name = "crayftn"
       case(id_lahey);     name = "lfc"
       case(id_lfortran);  name = "lFortran"
       case default;       name = "invalid/unknown"
   end select
end function compiler_name