<COMPILER_VERSION Example Program>
Module compiler_info_module Use Iso_Fortran_Env, Only:Compiler_Options, Compiler_Version Character(Len(Compiler_Version())) :: version = Compiler_Version() Character(Len(Compiler_Options())) :: options = Compiler_Options() End Module Program compiler_version_example Use compiler_info_module Print *, 'This was compiled by: ', version Print *, 'The compiler options used were: ', options End Program
<Results (when compiled with build 6106 of the NAG Fortran Compiler, with the -C=array option.)>
This was compiled by: NAG Fortran Compiler Release 6.1(Tozai) Build 6106 The compiler options used were: -C=array