2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
8 COMPILER_OPTIONS --- Options passed to the compiler
9 ***************************************************
11 .. index:: COMPILER_OPTIONS, flags inquiry function, options inquiry function, compiler flags inquiry function
13 .. function:: COMPILER_OPTIONS()
15 ``COMPILER_OPTIONS`` returns a string with the options used for
19 The return value is a default-kind string with system-dependent length.
20 It contains the compiler flags used to compile the file, which called
21 the ``COMPILER_OPTIONS`` intrinsic.
27 Inquiry function of the module ``ISO_FORTRAN_ENV``
30 .. code-block:: fortran
32 STR = COMPILER_OPTIONS()
38 .. code-block:: fortran
41 print '(4a)', 'This file was compiled by ', &
42 compiler_version(), ' using the options ', &
47 :ref:`COMPILER_VERSION`,
48 :ref:`ISO_FORTRAN_ENV`