| <html lang="en"> |
| <head> |
| <title>Code Gen Options - The GNU Fortran Compiler</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="The GNU Fortran Compiler"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" title="Invoking GNU Fortran"> |
| <link rel="prev" href="Runtime-Options.html#Runtime-Options" title="Runtime Options"> |
| <link rel="next" href="Environment-Variables.html#Environment-Variables" title="Environment Variables"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <!-- |
| Copyright (C) 1999-2013 Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 or |
| any later version published by the Free Software Foundation; with the |
| Invariant Sections being ``Funding Free Software'', the Front-Cover |
| Texts being (a) (see below), and with the Back-Cover Texts being (b) |
| (see below). A copy of the license is included in the section entitled |
| ``GNU Free Documentation License''. |
| |
| (a) The FSF's Front-Cover Text is: |
| |
| A GNU Manual |
| |
| (b) The FSF's Back-Cover Text is: |
| |
| You have freedom to copy and modify this GNU Manual, like GNU |
| software. Copies published by the Free Software Foundation raise |
| funds for GNU development.--> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="Code-Gen-Options"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="Environment-Variables.html#Environment-Variables">Environment Variables</a>, |
| Previous: <a rel="previous" accesskey="p" href="Runtime-Options.html#Runtime-Options">Runtime Options</a>, |
| Up: <a rel="up" accesskey="u" href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran">Invoking GNU Fortran</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">2.9 Options for code generation conventions</h3> |
| |
| <p><a name="index-code-generation_002c-conventions-230"></a><a name="index-options_002c-code-generation-231"></a><a name="index-options_002c-run_002dtime-232"></a> |
| These machine-independent options control the interface conventions |
| used in code generation. |
| |
| <p>Most of them have both positive and negative forms; the negative form |
| of <samp><span class="option">-ffoo</span></samp> would be <samp><span class="option">-fno-foo</span></samp>. In the table below, only |
| one of the forms is listed—the one which is not the default. You |
| can figure out the other form by either removing <samp><span class="option">no-</span></samp> or adding |
| it. |
| |
| <dl> |
| <dt><code>-fno-automatic</code><dd><a name="index-g_t_0040code_007bfno_002dautomatic_007d-233"></a><a name="index-g_t_0040code_007bSAVE_007d-statement-234"></a><a name="index-statement_002c-_0040code_007bSAVE_007d-235"></a>Treat each program unit (except those marked as RECURSIVE) as if the |
| <code>SAVE</code> statement were specified for every local variable and array |
| referenced in it. Does not affect common blocks. (Some Fortran compilers |
| provide this option under the name <samp><span class="option">-static</span></samp> or <samp><span class="option">-save</span></samp>.) |
| The default, which is <samp><span class="option">-fautomatic</span></samp>, uses the stack for local |
| variables smaller than the value given by <samp><span class="option">-fmax-stack-var-size</span></samp>. |
| Use the option <samp><span class="option">-frecursive</span></samp> to use no static memory. |
| |
| <br><dt><code>-ff2c</code><dd><a name="index-ff2c-236"></a><a name="index-calling-convention-237"></a><a name="index-g_t_0040command_007bf2c_007d-calling-convention-238"></a><a name="index-g_t_0040command_007bg77_007d-calling-convention-239"></a><a name="index-libf2c-calling-convention-240"></a>Generate code designed to be compatible with code generated |
| by <samp><span class="command">g77</span></samp> and <samp><span class="command">f2c</span></samp>. |
| |
| <p>The calling conventions used by <samp><span class="command">g77</span></samp> (originally implemented |
| in <samp><span class="command">f2c</span></samp>) require functions that return type |
| default <code>REAL</code> to actually return the C type <code>double</code>, and |
| functions that return type <code>COMPLEX</code> to return the values via an |
| extra argument in the calling sequence that points to where to |
| store the return value. Under the default GNU calling conventions, such |
| functions simply return their results as they would in GNU |
| C—default <code>REAL</code> functions return the C type <code>float</code>, and |
| <code>COMPLEX</code> functions return the GNU C type <code>complex</code>. |
| Additionally, this option implies the <samp><span class="option">-fsecond-underscore</span></samp> |
| option, unless <samp><span class="option">-fno-second-underscore</span></samp> is explicitly requested. |
| |
| <p>This does not affect the generation of code that interfaces with |
| the <samp><span class="command">libgfortran</span></samp> library. |
| |
| <p><em>Caution:</em> It is not a good idea to mix Fortran code compiled with |
| <samp><span class="option">-ff2c</span></samp> with code compiled with the default <samp><span class="option">-fno-f2c</span></samp> |
| calling conventions as, calling <code>COMPLEX</code> or default <code>REAL</code> |
| functions between program parts which were compiled with different |
| calling conventions will break at execution time. |
| |
| <p><em>Caution:</em> This will break code which passes intrinsic functions |
| of type default <code>REAL</code> or <code>COMPLEX</code> as actual arguments, as |
| the library implementations use the <samp><span class="option">-fno-f2c</span></samp> calling conventions. |
| |
| <br><dt><code>-fno-underscoring</code><dd><a name="index-g_t_0040code_007bfno_002dunderscoring_007d-241"></a><a name="index-underscore-242"></a><a name="index-symbol-names_002c-underscores-243"></a><a name="index-transforming-symbol-names-244"></a><a name="index-symbol-names_002c-transforming-245"></a>Do not transform names of entities specified in the Fortran |
| source file by appending underscores to them. |
| |
| <p>With <samp><span class="option">-funderscoring</span></samp> in effect, GNU Fortran appends one |
| underscore to external names with no underscores. This is done to ensure |
| compatibility with code produced by many UNIX Fortran compilers. |
| |
| <p><em>Caution</em>: The default behavior of GNU Fortran is |
| incompatible with <samp><span class="command">f2c</span></samp> and <samp><span class="command">g77</span></samp>, please use the |
| <samp><span class="option">-ff2c</span></samp> option if you want object files compiled with |
| GNU Fortran to be compatible with object code created with these |
| tools. |
| |
| <p>Use of <samp><span class="option">-fno-underscoring</span></samp> is not recommended unless you are |
| experimenting with issues such as integration of GNU Fortran into |
| existing system environments (vis-à-vis existing libraries, tools, |
| and so on). |
| |
| <p>For example, with <samp><span class="option">-funderscoring</span></samp>, and assuming other defaults like |
| <samp><span class="option">-fcase-lower</span></samp> and that <code>j()</code> and <code>max_count()</code> are |
| external functions while <code>my_var</code> and <code>lvar</code> are local variables, |
| a statement like |
| <pre class="smallexample"> I = J() + MAX_COUNT (MY_VAR, LVAR) |
| </pre> |
| <p class="noindent">is implemented as something akin to: |
| <pre class="smallexample"> i = j_() + max_count__(&my_var__, &lvar); |
| </pre> |
| <p>With <samp><span class="option">-fno-underscoring</span></samp>, the same statement is implemented as: |
| |
| <pre class="smallexample"> i = j() + max_count(&my_var, &lvar); |
| </pre> |
| <p>Use of <samp><span class="option">-fno-underscoring</span></samp> allows direct specification of |
| user-defined names while debugging and when interfacing GNU Fortran |
| code with other languages. |
| |
| <p>Note that just because the names match does <em>not</em> mean that the |
| interface implemented by GNU Fortran for an external name matches the |
| interface implemented by some other language for that same name. |
| That is, getting code produced by GNU Fortran to link to code produced |
| by some other compiler using this or any other method can be only a |
| small part of the overall solution—getting the code generated by |
| both compilers to agree on issues other than naming can require |
| significant effort, and, unlike naming disagreements, linkers normally |
| cannot detect disagreements in these other areas. |
| |
| <p>Also, note that with <samp><span class="option">-fno-underscoring</span></samp>, the lack of appended |
| underscores introduces the very real possibility that a user-defined |
| external name will conflict with a name in a system library, which |
| could make finding unresolved-reference bugs quite difficult in some |
| cases—they might occur at program run time, and show up only as |
| buggy behavior at run time. |
| |
| <p>In future versions of GNU Fortran we hope to improve naming and linking |
| issues so that debugging always involves using the names as they appear |
| in the source, even if the names as seen by the linker are mangled to |
| prevent accidental linking between procedures with incompatible |
| interfaces. |
| |
| <br><dt><code>-fno-whole-file</code><dd><a name="index-g_t_0040code_007bfno_002dwhole_002dfile_007d-246"></a>This flag causes the compiler to resolve and translate each procedure in |
| a file separately. |
| |
| <p>By default, the whole file is parsed and placed in a single front-end tree. |
| During resolution, in addition to all the usual checks and fixups, references |
| to external procedures that are in the same file effect resolution of |
| that procedure, if not already done, and a check of the interfaces. The |
| dependences are resolved by changing the order in which the file is |
| translated into the backend tree. Thus, a procedure that is referenced |
| is translated before the reference and the duplication of backend tree |
| declarations eliminated. |
| |
| <p>The <samp><span class="option">-fno-whole-file</span></samp> option is deprecated and may lead to wrong code. |
| |
| <br><dt><code>-fsecond-underscore</code><dd><a name="index-g_t_0040code_007bfsecond_002dunderscore_007d-247"></a><a name="index-underscore-248"></a><a name="index-symbol-names_002c-underscores-249"></a><a name="index-transforming-symbol-names-250"></a><a name="index-symbol-names_002c-transforming-251"></a><a name="index-g_t_0040command_007bf2c_007d-calling-convention-252"></a><a name="index-g_t_0040command_007bg77_007d-calling-convention-253"></a><a name="index-libf2c-calling-convention-254"></a>By default, GNU Fortran appends an underscore to external |
| names. If this option is used GNU Fortran appends two |
| underscores to names with underscores and one underscore to external names |
| with no underscores. GNU Fortran also appends two underscores to |
| internal names with underscores to avoid naming collisions with external |
| names. |
| |
| <p>This option has no effect if <samp><span class="option">-fno-underscoring</span></samp> is |
| in effect. It is implied by the <samp><span class="option">-ff2c</span></samp> option. |
| |
| <p>Otherwise, with this option, an external name such as <code>MAX_COUNT</code> |
| is implemented as a reference to the link-time external symbol |
| <code>max_count__</code>, instead of <code>max_count_</code>. This is required |
| for compatibility with <samp><span class="command">g77</span></samp> and <samp><span class="command">f2c</span></samp>, and is implied |
| by use of the <samp><span class="option">-ff2c</span></samp> option. |
| |
| <br><dt><code>-fcoarray=</code><var><keyword></var><dd><a name="index-g_t_0040code_007bfcoarray_007d-255"></a><a name="index-coarrays-256"></a> |
| <dl> |
| <dt>‘<samp><span class="samp">none</span></samp>’<dd>Disable coarray support; using coarray declarations and image-control |
| statements will produce a compile-time error. (Default) |
| |
| <br><dt>‘<samp><span class="samp">single</span></samp>’<dd>Single-image mode, i.e. <code>num_images()</code> is always one. |
| |
| <br><dt>‘<samp><span class="samp">lib</span></samp>’<dd>Library-based coarray parallelization; a suitable GNU Fortran coarray |
| library needs to be linked. |
| </dl> |
| |
| <br><dt><code>-fcheck=</code><var><keyword></var><dd><a name="index-g_t_0040code_007bfcheck_007d-257"></a><a name="index-array_002c-bounds-checking-258"></a><a name="index-bounds-checking-259"></a><a name="index-pointer-checking-260"></a><a name="index-memory-checking-261"></a><a name="index-range-checking-262"></a><a name="index-subscript-checking-263"></a><a name="index-checking-subscripts-264"></a><a name="index-run_002dtime-checking-265"></a><a name="index-checking-array-temporaries-266"></a> |
| Enable the generation of run-time checks; the argument shall be |
| a comma-delimited list of the following keywords. |
| |
| <dl> |
| <dt>‘<samp><span class="samp">all</span></samp>’<dd>Enable all run-time test of <samp><span class="option">-fcheck</span></samp>. |
| |
| <br><dt>‘<samp><span class="samp">array-temps</span></samp>’<dd>Warns at run time when for passing an actual argument a temporary array |
| had to be generated. The information generated by this warning is |
| sometimes useful in optimization, in order to avoid such temporaries. |
| |
| <p>Note: The warning is only printed once per location. |
| |
| <br><dt>‘<samp><span class="samp">bounds</span></samp>’<dd>Enable generation of run-time checks for array subscripts |
| and against the declared minimum and maximum values. It also |
| checks array indices for assumed and deferred |
| shape arrays against the actual allocated bounds and ensures that all string |
| lengths are equal for character array constructors without an explicit |
| typespec. |
| |
| <p>Some checks require that <samp><span class="option">-fcheck=bounds</span></samp> is set for |
| the compilation of the main program. |
| |
| <p>Note: In the future this may also include other forms of checking, e.g., |
| checking substring references. |
| |
| <br><dt>‘<samp><span class="samp">do</span></samp>’<dd>Enable generation of run-time checks for invalid modification of loop |
| iteration variables. |
| |
| <br><dt>‘<samp><span class="samp">mem</span></samp>’<dd>Enable generation of run-time checks for memory allocation. |
| Note: This option does not affect explicit allocations using the |
| <code>ALLOCATE</code> statement, which will be always checked. |
| |
| <br><dt>‘<samp><span class="samp">pointer</span></samp>’<dd>Enable generation of run-time checks for pointers and allocatables. |
| |
| <br><dt>‘<samp><span class="samp">recursion</span></samp>’<dd>Enable generation of run-time checks for recursively called subroutines and |
| functions which are not marked as recursive. See also <samp><span class="option">-frecursive</span></samp>. |
| Note: This check does not work for OpenMP programs and is disabled if used |
| together with <samp><span class="option">-frecursive</span></samp> and <samp><span class="option">-fopenmp</span></samp>. |
| </dl> |
| |
| <br><dt><code>-fbounds-check</code><dd><a name="index-g_t_0040code_007bfbounds_002dcheck_007d-267"></a><!-- Note: This option is also referred in gcc's manpage --> |
| Deprecated alias for <samp><span class="option">-fcheck=bounds</span></samp>. |
| |
| <br><dt><code>-fcheck-array-temporaries</code><dd><a name="index-g_t_0040code_007bfcheck_002darray_002dtemporaries_007d-268"></a>Deprecated alias for <samp><span class="option">-fcheck=array-temps</span></samp>. |
| |
| <br><dt><code>-fmax-array-constructor=</code><var>n</var><dd><a name="index-g_t_0040code_007bfmax_002darray_002dconstructor_007d-269"></a>This option can be used to increase the upper limit permitted in |
| array constructors. The code below requires this option to expand |
| the array at compile time. |
| |
| <pre class="smallexample"> program test |
| implicit none |
| integer j |
| integer, parameter :: n = 100000 |
| integer, parameter :: i(n) = (/ (2*j, j = 1, n) /) |
| print '(10(I0,1X))', i |
| end program test |
| </pre> |
| <p><em>Caution: This option can lead to long compile times and excessively |
| large object files.</em> |
| |
| <p>The default value for <var>n</var> is 65535. |
| |
| <br><dt><code>-fmax-stack-var-size=</code><var>n</var><dd><a name="index-g_t_0040code_007bfmax_002dstack_002dvar_002dsize_007d-270"></a>This option specifies the size in bytes of the largest array that will be put |
| on the stack; if the size is exceeded static memory is used (except in |
| procedures marked as RECURSIVE). Use the option <samp><span class="option">-frecursive</span></samp> to |
| allow for recursive procedures which do not have a RECURSIVE attribute or |
| for parallel programs. Use <samp><span class="option">-fno-automatic</span></samp> to never use the stack. |
| |
| <p>This option currently only affects local arrays declared with constant |
| bounds, and may not apply to all character variables. |
| Future versions of GNU Fortran may improve this behavior. |
| |
| <p>The default value for <var>n</var> is 32768. |
| |
| <br><dt><code>-fstack-arrays</code><dd><a name="index-g_t_0040code_007bfstack_002darrays_007d-271"></a>Adding this option will make the Fortran compiler put all local arrays, |
| even those of unknown size onto stack memory. If your program uses very |
| large local arrays it is possible that you will have to extend your runtime |
| limits for stack memory on some operating systems. This flag is enabled |
| by default at optimization level <samp><span class="option">-Ofast</span></samp>. |
| |
| <br><dt><code>-fpack-derived</code><dd><a name="index-g_t_0040code_007bfpack_002dderived_007d-272"></a><a name="index-structure-packing-273"></a>This option tells GNU Fortran to pack derived type members as closely as |
| possible. Code compiled with this option is likely to be incompatible |
| with code compiled without this option, and may execute slower. |
| |
| <br><dt><code>-frepack-arrays</code><dd><a name="index-g_t_0040code_007bfrepack_002darrays_007d-274"></a><a name="index-repacking-arrays-275"></a>In some circumstances GNU Fortran may pass assumed shape array |
| sections via a descriptor describing a noncontiguous area of memory. |
| This option adds code to the function prologue to repack the data into |
| a contiguous block at runtime. |
| |
| <p>This should result in faster accesses to the array. However it can introduce |
| significant overhead to the function call, especially when the passed data |
| is noncontiguous. |
| |
| <br><dt><code>-fshort-enums</code><dd><a name="index-g_t_0040code_007bfshort_002denums_007d-276"></a>This option is provided for interoperability with C code that was |
| compiled with the <samp><span class="option">-fshort-enums</span></samp> option. It will make |
| GNU Fortran choose the smallest <code>INTEGER</code> kind a given |
| enumerator set will fit in, and give all its enumerators this kind. |
| |
| <br><dt><code>-fexternal-blas</code><dd><a name="index-g_t_0040code_007bfexternal_002dblas_007d-277"></a>This option will make <samp><span class="command">gfortran</span></samp> generate calls to BLAS functions |
| for some matrix operations like <code>MATMUL</code>, instead of using our own |
| algorithms, if the size of the matrices involved is larger than a given |
| limit (see <samp><span class="option">-fblas-matmul-limit</span></samp>). This may be profitable if an |
| optimized vendor BLAS library is available. The BLAS library will have |
| to be specified at link time. |
| |
| <br><dt><code>-fblas-matmul-limit=</code><var>n</var><dd><a name="index-g_t_0040code_007bfblas_002dmatmul_002dlimit_007d-278"></a>Only significant when <samp><span class="option">-fexternal-blas</span></samp> is in effect. |
| Matrix multiplication of matrices with size larger than (or equal to) <var>n</var> |
| will be performed by calls to BLAS functions, while others will be |
| handled by <samp><span class="command">gfortran</span></samp> internal algorithms. If the matrices |
| involved are not square, the size comparison is performed using the |
| geometric mean of the dimensions of the argument and result matrices. |
| |
| <p>The default value for <var>n</var> is 30. |
| |
| <br><dt><code>-frecursive</code><dd><a name="index-g_t_0040code_007bfrecursive_007d-279"></a>Allow indirect recursion by forcing all local arrays to be allocated |
| on the stack. This flag cannot be used together with |
| <samp><span class="option">-fmax-stack-var-size=</span></samp> or <samp><span class="option">-fno-automatic</span></samp>. |
| |
| <br><dt><code>-finit-local-zero</code><dt><code>-finit-integer=</code><var>n</var><dt><code>-finit-real=</code><var><zero|inf|-inf|nan|snan></var><dt><code>-finit-logical=</code><var><true|false></var><dt><code>-finit-character=</code><var>n</var><dd><a name="index-g_t_0040code_007bfinit_002dlocal_002dzero_007d-280"></a><a name="index-g_t_0040code_007bfinit_002dinteger_007d-281"></a><a name="index-g_t_0040code_007bfinit_002dreal_007d-282"></a><a name="index-g_t_0040code_007bfinit_002dlogical_007d-283"></a><a name="index-g_t_0040code_007bfinit_002dcharacter_007d-284"></a>The <samp><span class="option">-finit-local-zero</span></samp> option instructs the compiler to |
| initialize local <code>INTEGER</code>, <code>REAL</code>, and <code>COMPLEX</code> |
| variables to zero, <code>LOGICAL</code> variables to false, and |
| <code>CHARACTER</code> variables to a string of null bytes. Finer-grained |
| initialization options are provided by the |
| <samp><span class="option">-finit-integer=</span><var>n</var></samp>, |
| <samp><span class="option">-finit-real=</span><var><zero|inf|-inf|nan|snan></var></samp> (which also initializes |
| the real and imaginary parts of local <code>COMPLEX</code> variables), |
| <samp><span class="option">-finit-logical=</span><var><true|false></var></samp>, and |
| <samp><span class="option">-finit-character=</span><var>n</var></samp> (where <var>n</var> is an ASCII character |
| value) options. These options do not initialize |
| <ul> |
| <li>allocatable arrays |
| <li>components of derived type variables |
| <li>variables that appear in an <code>EQUIVALENCE</code> statement. |
| </ul> |
| (These limitations may be removed in future releases). |
| |
| <p>Note that the <samp><span class="option">-finit-real=nan</span></samp> option initializes <code>REAL</code> |
| and <code>COMPLEX</code> variables with a quiet NaN. For a signalling NaN |
| use <samp><span class="option">-finit-real=snan</span></samp>; note, however, that compile-time |
| optimizations may convert them into quiet NaN and that trapping |
| needs to be enabled (e.g. via <samp><span class="option">-ffpe-trap</span></samp>). |
| |
| <p>Finally, note that enabling any of the <samp><span class="option">-finit-*</span></samp> options will |
| silence warnings that would have been emitted by <samp><span class="option">-Wuninitialized</span></samp> |
| for the affected local variables. |
| |
| <br><dt><code>-falign-commons</code><dd><a name="index-g_t_0040code_007bfalign_002dcommons_007d-285"></a><a name="index-alignment-of-_0040code_007bCOMMON_007d-blocks-286"></a>By default, <samp><span class="command">gfortran</span></samp> enforces proper alignment of all variables in a |
| <code>COMMON</code> block by padding them as needed. On certain platforms this is mandatory, |
| on others it increases performance. If a <code>COMMON</code> block is not declared with |
| consistent data types everywhere, this padding can cause trouble, and |
| <samp><span class="option">-fno-align-commons</span></samp> can be used to disable automatic alignment. The |
| same form of this option should be used for all files that share a <code>COMMON</code> block. |
| To avoid potential alignment issues in <code>COMMON</code> blocks, it is recommended to order |
| objects from largest to smallest. |
| |
| <br><dt><code>-fno-protect-parens</code><dd><a name="index-g_t_0040code_007bfno_002dprotect_002dparens_007d-287"></a><a name="index-re_002dassociation-of-parenthesized-expressions-288"></a>By default the parentheses in expression are honored for all optimization |
| levels such that the compiler does not do any re-association. Using |
| <samp><span class="option">-fno-protect-parens</span></samp> allows the compiler to reorder <code>REAL</code> and |
| <code>COMPLEX</code> expressions to produce faster code. Note that for the re-association |
| optimization <samp><span class="option">-fno-signed-zeros</span></samp> and <samp><span class="option">-fno-trapping-math</span></samp> |
| need to be in effect. The parentheses protection is enabled by default, unless |
| <samp><span class="option">-Ofast</span></samp> is given. |
| |
| <br><dt><code>-frealloc-lhs</code><dd><a name="index-g_t_0040code_007bfrealloc_002dlhs_007d-289"></a><a name="index-Reallocate-the-LHS-in-assignments-290"></a>An allocatable left-hand side of an intrinsic assignment is automatically |
| (re)allocated if it is either unallocated or has a different shape. The |
| option is enabled by default except when <samp><span class="option">-std=f95</span></samp> is given. See |
| also <samp><span class="option">-Wrealloc-lhs</span></samp>. |
| |
| <br><dt><code>-faggressive-function-elimination</code><dd><a name="index-g_t_0040code_007bfaggressive_002dfunction_002delimination_007d-291"></a><a name="index-Elimination-of-functions-with-identical-argument-lists-292"></a>Functions with identical argument lists are eliminated within |
| statements, regardless of whether these functions are marked |
| <code>PURE</code> or not. For example, in |
| <pre class="smallexample"> a = f(b,c) + f(b,c) |
| </pre> |
| <p>there will only be a single call to <code>f</code>. This option only works |
| if <samp><span class="option">-ffrontend-optimize</span></samp> is in effect. |
| |
| <br><dt><code>-ffrontend-optimize</code><dd><a name="index-g_t_0040code_007bfrontend_002doptimize_007d-293"></a><a name="index-Front_002dend-optimization-294"></a>This option performs front-end optimization, based on manipulating |
| parts the Fortran parse tree. Enabled by default by any <samp><span class="option">-O</span></samp> |
| option. Optimizations enabled by this option include elimination of |
| identical function calls within expressions, removing unnecessary |
| calls to <code>TRIM</code> in comparisons and assignments and replacing |
| <code>TRIM(a)</code> with <code>a(1:LEN_TRIM(a))</code>. |
| It can be deselected by specifying <samp><span class="option">-fno-frontend-optimize</span></samp>. |
| </dl> |
| |
| <p>See <a href="../gcc/Code-Gen-Options.html#Code-Gen-Options">Options for Code Generation Conventions</a>, for information on more options |
| offered by the GBE |
| shared by <samp><span class="command">gfortran</span></samp>, <samp><span class="command">gcc</span></samp>, and other GNU compilers. |
| |
| <!-- man end --> |
| </body></html> |
| |