]>
Commit | Line | Data |
---|---|---|
2553e4e0 | 1 | @c Copyright (C) 2004, 2005, 2006, 2007 |
6de9cd9a | 2 | @c Free Software Foundation, Inc. |
7fc15ba5 | 3 | @c This is part of the GNU Fortran manual. |
6de9cd9a DN |
4 | @c For copying conditions, see the file gfortran.texi. |
5 | ||
6 | @ignore | |
7 | @c man begin COPYRIGHT | |
5f9a37a6 | 8 | Copyright @copyright{} 2004, 2005, 2006, 2007 |
6de9cd9a DN |
9 | Free Software Foundation, Inc. |
10 | ||
11 | Permission is granted to copy, distribute and/or modify this document | |
12 | under the terms of the GNU Free Documentation License, Version 1.2 or | |
13 | any later version published by the Free Software Foundation; with the | |
14 | Invariant Sections being ``GNU General Public License'' and ``Funding | |
15 | Free Software'', the Front-Cover texts being (a) (see below), and with | |
16 | the Back-Cover Texts being (b) (see below). A copy of the license is | |
17 | included in the gfdl(7) man page. | |
18 | ||
19 | (a) The FSF's Front-Cover Text is: | |
20 | ||
21 | A GNU Manual | |
22 | ||
23 | (b) The FSF's Back-Cover Text is: | |
24 | ||
25 | You have freedom to copy and modify this GNU Manual, like GNU | |
26 | software. Copies published by the Free Software Foundation raise | |
27 | funds for GNU development. | |
28 | @c man end | |
29 | @c Set file name and title for the man page. | |
30 | @setfilename gfortran | |
7fc15ba5 | 31 | @settitle GNU Fortran compiler. |
6de9cd9a DN |
32 | @c man begin SYNOPSIS |
33 | gfortran [@option{-c}|@option{-S}|@option{-E}] | |
34 | [@option{-g}] [@option{-pg}] [@option{-O}@var{level}] | |
35 | [@option{-W}@var{warn}@dots{}] [@option{-pedantic}] | |
36 | [@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}] | |
37 | [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] | |
38 | [@option{-f}@var{option}@dots{}] | |
39 | [@option{-m}@var{machine-option}@dots{}] | |
40 | [@option{-o} @var{outfile}] @var{infile}@dots{} | |
41 | ||
42 | Only the most useful options are listed here; see below for the | |
43 | remainder. | |
44 | @c man end | |
45 | @c man begin SEEALSO | |
46 | gpl(7), gfdl(7), fsf-funding(7), | |
47 | cpp(1), gcov(1), gcc(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1) | |
48 | and the Info entries for @file{gcc}, @file{cpp}, @file{gfortran}, @file{as}, | |
49 | @file{ld}, @file{binutils} and @file{gdb}. | |
50 | @c man end | |
51 | @c man begin BUGS | |
52 | For instructions on reporting bugs, see | |
53 | @w{@uref{http://gcc.gnu.org/bugs.html}}. | |
54 | @c man end | |
55 | @c man begin AUTHOR | |
56 | See the Info entry for @command{gfortran} for contributors to GCC and | |
7fc15ba5 | 57 | GNU Fortran. |
6de9cd9a DN |
58 | @c man end |
59 | @end ignore | |
60 | ||
7fc15ba5 BM |
61 | @node Invoking GNU Fortran |
62 | @chapter GNU Fortran Command Options | |
63 | @cindex GNU Fortran command options | |
6de9cd9a | 64 | @cindex command options |
7fc15ba5 | 65 | @cindex options, @command{gfortran} command |
6de9cd9a DN |
66 | |
67 | @c man begin DESCRIPTION | |
68 | ||
69 | The @command{gfortran} command supports all the options supported by the | |
7fc15ba5 | 70 | @command{gcc} command. Only options specific to GNU Fortran are documented here. |
6de9cd9a DN |
71 | |
72 | @xref{Invoking GCC,,GCC Command Options,gcc,Using the GNU Compiler | |
73 | Collection (GCC)}, for information | |
74 | on the non-Fortran-specific aspects of the @command{gcc} command (and, | |
75 | therefore, the @command{gfortran} command). | |
76 | ||
77 | @cindex options, negative forms | |
7fc15ba5 | 78 | All GCC and GNU Fortran options |
6de9cd9a DN |
79 | are accepted both by @command{gfortran} and by @command{gcc} |
80 | (as well as any other drivers built at the same time, | |
81 | such as @command{g++}), | |
7fc15ba5 BM |
82 | since adding GNU Fortran to the GCC distribution |
83 | enables acceptance of GNU Fortran options | |
6de9cd9a DN |
84 | by all of the relevant drivers. |
85 | ||
86 | In some cases, options have positive and negative forms; | |
87 | the negative form of @option{-ffoo} would be @option{-fno-foo}. | |
88 | This manual documents only one of these two forms, whichever | |
89 | one is not the default. | |
90 | @c man end | |
91 | ||
92 | @menu | |
93 | * Option Summary:: Brief list of all @command{gfortran} options, | |
94 | without explanations. | |
95 | * Fortran Dialect Options:: Controlling the variant of Fortran language | |
96 | compiled. | |
592600ce | 97 | * Error and Warning Options:: How picky should the compiler be? |
6de9cd9a DN |
98 | * Debugging Options:: Symbol tables, measurements, and debugging dumps. |
99 | * Directory Options:: Where to find module files | |
eaa90d25 | 100 | * Runtime Options:: Influencing runtime behavior |
6de9cd9a DN |
101 | * Code Gen Options:: Specifying conventions for function calls, data layout |
102 | and register usage. | |
7fc15ba5 | 103 | * Environment Variables:: Env vars that affect @command{gfortran}. |
6de9cd9a DN |
104 | @end menu |
105 | ||
106 | @node Option Summary | |
107 | @section Option Summary | |
108 | ||
109 | @c man begin OPTIONS | |
110 | ||
111 | Here is a summary of all the options specific to GNU Fortran, grouped | |
112 | by type. Explanations are in the following sections. | |
113 | ||
114 | @table @emph | |
115 | @item Fortran Language Options | |
116 | @xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}. | |
592600ce | 117 | @gccoptlist{-fall-intrinsics -ffree-form -fno-fixed-form @gol |
6de9cd9a | 118 | -fdollar-ok -fimplicit-none -fmax-identifier-length @gol |
592600ce | 119 | -std=@var{std} -fd-lines-as-code -fd-lines-as-comments @gol |
6de9cd9a | 120 | -ffixed-line-length-@var{n} -ffixed-line-length-none @gol |
16ab8e74 | 121 | -ffree-line-length-@var{n} -ffree-line-length-none @gol |
83d890b9 | 122 | -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 @gol |
eedeea04 | 123 | -fcray-pointer -fopenmp -frange-check -fno-backslash } |
6de9cd9a | 124 | |
592600ce BM |
125 | @item Error and Warning Options |
126 | @xref{Error and Warning Options,,Options to Request or Suppress Errors | |
127 | and Warnings}. | |
128 | @gccoptlist{-fmax-errors=@var{n} @gol | |
6de9cd9a | 129 | -fsyntax-only -pedantic -pedantic-errors @gol |
276419d0 BM |
130 | -w -Wall -Waliasing -Wampersand -Wcharacter-truncation -Wconversion @gol |
131 | -Wimplicit-interface -Wline-truncation -Wnonstd-intrinsics -Wsurprising @gol | |
132 | -Wno-tabs -Wunderflow -W} | |
6de9cd9a DN |
133 | |
134 | @item Debugging Options | |
135 | @xref{Debugging Options,,Options for Debugging Your Program or GCC}. | |
868d75db FXC |
136 | @gccoptlist{-fdump-parse-tree -ffpe-trap=@var{list} @gol |
137 | -fdump-core -fbacktrace} | |
6de9cd9a DN |
138 | |
139 | @item Directory Options | |
140 | @xref{Directory Options,,Options for Directory Search}. | |
276419d0 | 141 | @gccoptlist{-I@var{dir} -J@var{dir} -M@var{dir} -fintrinsic-modules-path @var{dir}} |
6de9cd9a | 142 | |
eaa90d25 TK |
143 | @item Runtime Options |
144 | @xref{Runtime Options,,Options for influencing runtime behavior}. | |
276419d0 BM |
145 | @gccoptlist{-fconvert=@var{conversion} -frecord-marker=@var{length} @gol |
146 | -fmax-subrecord-length=@var{length}} | |
eaa90d25 | 147 | |
6de9cd9a DN |
148 | @item Code Generation Options |
149 | @xref{Code Gen Options,,Options for Code Generation Conventions}. | |
592600ce BM |
150 | @gccoptlist{-fno-automatic -ff2c -fno-underscoring |
151 | -fsecond-underscore @gol | |
6de9cd9a | 152 | -fbounds-check -fmax-stack-var-size=@var{n} @gol |
592600ce | 153 | -fpack-derived -frepack-arrays -fshort-enums -fexternal-blas @gol |
5a0aad31 | 154 | -fblas-matmul-limit=@var{n}} |
6de9cd9a DN |
155 | @end table |
156 | ||
6de9cd9a DN |
157 | @menu |
158 | * Fortran Dialect Options:: Controlling the variant of Fortran language | |
159 | compiled. | |
592600ce | 160 | * Error and Warning Options:: How picky should the compiler be? |
6de9cd9a DN |
161 | * Debugging Options:: Symbol tables, measurements, and debugging dumps. |
162 | * Directory Options:: Where to find module files | |
eaa90d25 | 163 | * Runtime Options:: Influencing runtime behavior |
6de9cd9a DN |
164 | * Code Gen Options:: Specifying conventions for function calls, data layout |
165 | and register usage. | |
166 | @end menu | |
167 | ||
168 | @node Fortran Dialect Options | |
169 | @section Options Controlling Fortran Dialect | |
170 | @cindex dialect options | |
171 | @cindex language, dialect options | |
172 | @cindex options, dialect | |
173 | ||
3397327c BM |
174 | The following options control the details of the Fortran dialect |
175 | accepted by the compiler: | |
6de9cd9a DN |
176 | |
177 | @table @gcctabopt | |
4ba96c02 BM |
178 | @item -ffree-form |
179 | @item -ffixed-form | |
32864778 DF |
180 | @opindex @code{ffree-form} |
181 | @opindex @code{fno-fixed-form} | |
182 | @cindex options, fortran dialect | |
e739dfac DF |
183 | @cindex file format, free |
184 | @cindex file format, fixed | |
49de9e73 | 185 | Specify the layout used by the source file. The free form layout |
6de9cd9a | 186 | was introduced in Fortran 90. Fixed form was traditionally used in |
3397327c BM |
187 | older Fortran programs. When neither option is specified, the source |
188 | form is determined by the file extension. | |
6de9cd9a | 189 | |
a23eec13 | 190 | @item -fall-intrinsics |
32864778 | 191 | @opindex @code{fall-intrinsics} |
a23eec13 SK |
192 | Accept all of the intrinsic procedures provided in libgfortran |
193 | without regard to the setting of @option{-std}. In particular, | |
08f36673 | 194 | this option can be quite useful with @option{-std=f95}. Additionally, |
7fc15ba5 | 195 | @command{gfortran} will ignore @option{-Wnonstd-intrinsics}. |
a23eec13 | 196 | |
e0bcf78c | 197 | @item -fd-lines-as-code |
259b41c1 | 198 | @item -fd-lines-as-comments |
32864778 DF |
199 | @opindex @code{fd-lines-as-code} |
200 | @opindex @code{fd-lines-as-comments} | |
4ba96c02 | 201 | Enable special treatment for lines beginning with @code{d} or @code{D} |
3397327c BM |
202 | in fixed form sources. If the @option{-fd-lines-as-code} option is |
203 | given they are treated as if the first column contained a blank. If the | |
e0bcf78c TS |
204 | @option{-fd-lines-as-comments} option is given, they are treated as |
205 | comment lines. | |
206 | ||
3ae9eb27 | 207 | @item -fdefault-double-8 |
32864778 | 208 | @opindex @code{fdefault-double-8} |
3397327c | 209 | Set the @code{DOUBLE PRECISION} type to an 8 byte wide type. |
3ae9eb27 | 210 | |
3ae9eb27 | 211 | @item -fdefault-integer-8 |
32864778 | 212 | @opindex @code{fdefault-integer-8} |
3ae9eb27 SK |
213 | Set the default integer and logical types to an 8 byte wide type. |
214 | Do nothing if this is already the default. | |
215 | ||
3ae9eb27 | 216 | @item -fdefault-real-8 |
32864778 | 217 | @opindex @code{fdefault-real-8} |
3ae9eb27 SK |
218 | Set the default real type to an 8 byte wide type. |
219 | Do nothing if this is already the default. | |
220 | ||
6de9cd9a | 221 | @item -fdollar-ok |
32864778 | 222 | @opindex @code{fdollar-ok} |
e739dfac | 223 | @cindex $ |
6de9cd9a DN |
224 | @cindex symbol names |
225 | @cindex character set | |
226 | Allow @samp{$} as a valid character in a symbol name. | |
227 | ||
131c66cd | 228 | @item -fno-backslash |
32864778 | 229 | @opindex @code{fno-backslash} |
131c66cd FXC |
230 | @cindex backslash |
231 | @cindex escape characters | |
3397327c BM |
232 | Change the interpretation of backslashes in string literals from |
233 | ``C-style'' escape characters to a single backslash character. | |
131c66cd | 234 | |
6de9cd9a | 235 | @item -ffixed-line-length-@var{n} |
32864778 | 236 | @opindex @code{ffixed-line-length-}@var{n} |
e739dfac | 237 | @cindex file format, fixed |
6de9cd9a DN |
238 | Set column after which characters are ignored in typical fixed-form |
239 | lines in the source file, and through which spaces are assumed (as | |
240 | if padded to that length) after the ends of short fixed-form lines. | |
241 | ||
6de9cd9a | 242 | Popular values for @var{n} include 72 (the |
3397327c | 243 | standard and the default), 80 (card image), and 132 (corresponding |
6de9cd9a | 244 | to ``extended-source'' options in some popular compilers). |
3397327c | 245 | @var{n} may also be @samp{none}, meaning that the entire line is meaningful |
6de9cd9a DN |
246 | and that continued character constants never have implicit spaces appended |
247 | to them to fill out the line. | |
248 | @option{-ffixed-line-length-0} means the same thing as | |
249 | @option{-ffixed-line-length-none}. | |
250 | ||
16ab8e74 | 251 | @item -ffree-line-length-@var{n} |
32864778 | 252 | @opindex @code{ffree-line-length-}@var{n} |
e739dfac | 253 | @cindex file format, free |
16ab8e74 | 254 | Set column after which characters are ignored in typical free-form |
3397327c | 255 | lines in the source file. The default value is 132. |
16ab8e74 BF |
256 | @var{n} may be @samp{none}, meaning that the entire line is meaningful. |
257 | @option{-ffree-line-length-0} means the same thing as | |
258 | @option{-ffree-line-length-none}. | |
259 | ||
6de9cd9a | 260 | @item -fmax-identifier-length=@var{n} |
32864778 | 261 | @opindex @code{fmax-identifier-length=}@var{n} |
6de9cd9a | 262 | Specify the maximum allowed identifier length. Typical values are |
3397327c | 263 | 31 (Fortran 95) and 63 (Fortran 2003). |
6de9cd9a | 264 | |
6de9cd9a | 265 | @item -fimplicit-none |
32864778 | 266 | @opindex @code{fimplicit-none} |
6de9cd9a | 267 | Specify that no implicit typing is allowed, unless overridden by explicit |
40746dcc BM |
268 | @code{IMPLICIT} statements. This is the equivalent of adding |
269 | @code{implicit none} to the start of every procedure. | |
6de9cd9a | 270 | |
83d890b9 | 271 | @item -fcray-pointer |
32864778 | 272 | @opindex @code{fcray-pointer} |
3397327c BM |
273 | Enable the Cray pointer extension, which provides C-like pointer |
274 | functionality. | |
83d890b9 | 275 | |
6c7a4dfd | 276 | @item -fopenmp |
32864778 | 277 | @opindex @code{fopenmp} |
4e8b3590 | 278 | @cindex OpenMP |
3397327c BM |
279 | Enable the OpenMP extensions. This includes OpenMP @code{!$omp} directives |
280 | in free form | |
6c7a4dfd | 281 | and @code{c$omp}, @code{*$omp} and @code{!$omp} directives in fixed form, |
3397327c BM |
282 | @code{!$} conditional compilation sentinels in free form |
283 | and @code{c$}, @code{*$} and @code{!$} sentinels in fixed form, | |
6c7a4dfd JJ |
284 | and when linking arranges for the OpenMP runtime library to be linked |
285 | in. | |
286 | ||
54554825 | 287 | @item -frange-check |
32864778 | 288 | @opindex @code{frange-check} |
40746dcc BM |
289 | Enable range checking on results of simplification of constant |
290 | expressions during compilation. For example, by default, GNU Fortran | |
291 | will give an overflow error at compile time when simplifying @code{a = | |
292 | EXP(1000)}. With @option{-fno-range-check}, no error will be given and | |
293 | the variable @code{a} will be assigned the value @code{+Infinity}. | |
294 | Similarly, @code{DATA i/Z'FFFFFFFF'/} will result in an integer overflow | |
295 | on most systems, but with @option{-fno-range-check} the value will | |
296 | ``wrap around'' and @code{i} will be initialized to @math{-1} instead. | |
54554825 | 297 | |
6de9cd9a | 298 | @item -std=@var{std} |
32864778 | 299 | @opindex @code{std=}@var{std} option |
276419d0 BM |
300 | Specify the standard to which the program is expected to conform, which |
301 | may be one of @samp{f95}, @samp{f2003}, @samp{gnu}, or @samp{legacy}. | |
302 | The default value for @var{std} is @samp{gnu}, which specifies a | |
303 | superset of the Fortran 95 standard that includes all of the extensions | |
304 | supported by GNU Fortran, although warnings will be given for obsolete | |
305 | extensions not recommended for use in new code. The @samp{legacy} value | |
306 | is equivalent but without the warnings for obsolete extensions, and may | |
307 | be useful for old non-standard programs. The @samp{f95} and | |
308 | @samp{f2003} values specify strict conformance to the Fortran 95 and | |
309 | Fortran 2003 standards, respectively; errors are given for all | |
310 | extensions beyond the relevant language standard, and warnings are given | |
311 | for the Fortran 77 features that are permitted but obsolescent in later | |
312 | standards. | |
6de9cd9a | 313 | |
6de9cd9a DN |
314 | @end table |
315 | ||
592600ce BM |
316 | @node Error and Warning Options |
317 | @section Options to Request or Suppress Errors and Warnings | |
6de9cd9a | 318 | @cindex options, warnings |
592600ce | 319 | @cindex options, errors |
6de9cd9a | 320 | @cindex warnings, suppressing |
592600ce | 321 | @cindex messages, error |
6de9cd9a DN |
322 | @cindex messages, warning |
323 | @cindex suppressing warnings | |
324 | ||
592600ce BM |
325 | Errors are diagnostic messages that report that the GNU Fortran compiler |
326 | cannot compile the relevant piece of source code. The compiler will | |
327 | continue to process the program in an attempt to report further errors | |
328 | to aid in debugging, but will not produce any compiled output. | |
329 | ||
6de9cd9a | 330 | Warnings are diagnostic messages that report constructions which |
592600ce | 331 | are not inherently erroneous but which are risky or suggest there is |
4ba96c02 | 332 | likely to be a bug in the program. Unless @option{-Werror} is specified, |
592600ce | 333 | they do not prevent compilation of the program. |
6de9cd9a DN |
334 | |
335 | You can request many specific warnings with options beginning @option{-W}, | |
336 | for example @option{-Wimplicit} to request warnings on implicit | |
337 | declarations. Each of these specific warning options also has a | |
338 | negative form beginning @option{-Wno-} to turn off warnings; | |
339 | for example, @option{-Wno-implicit}. This manual lists only one of the | |
340 | two forms, whichever is not the default. | |
341 | ||
592600ce BM |
342 | These options control the amount and kinds of errors and warnings produced |
343 | by GNU Fortran: | |
6de9cd9a DN |
344 | |
345 | @table @gcctabopt | |
592600ce | 346 | @item -fmax-errors-@var{n} |
32864778 | 347 | @opindex @code{fmax-errors-}@var{n} |
4ba96c02 | 348 | @cindex errors, limiting |
592600ce BM |
349 | Limits the maximum number of error messages to @var{n}, at which point |
350 | GNU Fortran bails out rather than attempting to continue processing the | |
351 | source code. If @var{n} is 0, there is no limit on the number of error | |
352 | messages produced. | |
353 | ||
6de9cd9a | 354 | @item -fsyntax-only |
32864778 | 355 | @opindex @code{fsyntax-only} |
4ba96c02 | 356 | @cindex syntax checking |
6de9cd9a DN |
357 | Check the code for syntax errors, but don't do anything beyond that. |
358 | ||
6de9cd9a | 359 | @item -pedantic |
32864778 | 360 | @opindex @code{pedantic} |
7fc15ba5 | 361 | Issue warnings for uses of extensions to Fortran 95. |
6de9cd9a DN |
362 | @option{-pedantic} also applies to C-language constructs where they |
363 | occur in GNU Fortran source files, such as use of @samp{\e} in a | |
40746dcc | 364 | character constant within a directive like @code{#include}. |
6de9cd9a | 365 | |
7fc15ba5 | 366 | Valid Fortran 95 programs should compile properly with or without |
6de9cd9a DN |
367 | this option. |
368 | However, without this option, certain GNU extensions and traditional | |
369 | Fortran features are supported as well. | |
370 | With this option, many of them are rejected. | |
371 | ||
372 | Some users try to use @option{-pedantic} to check programs for conformance. | |
373 | They soon find that it does not do quite what they want---it finds some | |
374 | nonstandard practices, but not all. | |
7fc15ba5 | 375 | However, improvements to GNU Fortran in this area are welcome. |
6de9cd9a | 376 | |
4ba96c02 BM |
377 | This should be used in conjunction with @option{-std=f95} or |
378 | @option{-std=f2003}. | |
6de9cd9a | 379 | |
6de9cd9a | 380 | @item -pedantic-errors |
32864778 | 381 | @opindex @code{pedantic-errors} |
6de9cd9a DN |
382 | Like @option{-pedantic}, except that errors are produced rather than |
383 | warnings. | |
384 | ||
6de9cd9a | 385 | @item -w |
32864778 DF |
386 | @opindex @code{w} |
387 | @cindex warnings, none | |
6de9cd9a DN |
388 | Inhibit all warning messages. |
389 | ||
6de9cd9a | 390 | @item -Wall |
32864778 | 391 | @opindex @code{Wall} |
6de9cd9a DN |
392 | @cindex all warnings |
393 | @cindex warnings, all | |
3fbab549 JD |
394 | Enables commonly used warning options pertaining to usage that |
395 | we recommend avoiding and that we believe are easy to avoid. | |
2e5758e8 | 396 | This currently includes @option{-Waliasing}, |
276419d0 | 397 | @option{-Wampersand}, @option{-Wsurprising}, @option{-Wnonstd-intrinsics}, |
3fbab549 | 398 | @option{-Wno-tabs}, and @option{-Wline-truncation}. |
6de9cd9a | 399 | |
6de9cd9a | 400 | @item -Waliasing |
32864778 | 401 | @opindex @code{Waliasing} |
6de9cd9a | 402 | @cindex aliasing |
32864778 | 403 | @cindex warnings, aliasing |
3010be13 AD |
404 | Warn about possible aliasing of dummy arguments. Specifically, it warns |
405 | if the same actual argument is associated with a dummy argument with | |
40746dcc | 406 | @code{INTENT(IN)} and a dummy argument with @code{INTENT(OUT)} in a call |
3010be13 AD |
407 | with an explicit interface. |
408 | ||
409 | The following example will trigger the warning. | |
6de9cd9a | 410 | @smallexample |
3010be13 AD |
411 | interface |
412 | subroutine bar(a,b) | |
413 | integer, intent(in) :: a | |
414 | integer, intent(out) :: b | |
415 | end subroutine | |
416 | end interface | |
417 | integer :: a | |
418 | ||
419 | call bar(a,a) | |
6de9cd9a DN |
420 | @end smallexample |
421 | ||
3fbab549 | 422 | @item -Wampersand |
32864778 DF |
423 | @opindex @code{Wampersand} |
424 | @cindex warnings, ampersand | |
e739dfac | 425 | @cindex & |
3fbab549 JD |
426 | Warn about missing ampersand in continued character constants. The warning is |
427 | given with @option{-Wampersand}, @option{-pedantic}, @option{-std=f95}, and | |
428 | @option{-std=f2003}. Note: With no ampersand given in a continued character | |
7fc15ba5 | 429 | constant, GNU Fortran assumes continuation at the first non-comment, |
3fbab549 JD |
430 | non-whitespace character after the ampersand that initiated the continuation. |
431 | ||
276419d0 | 432 | @item -Wcharacter-truncation |
32864778 DF |
433 | @opindex @code{Wcharacter-truncation} |
434 | @cindex warnings, character truncation | |
276419d0 BM |
435 | Warn when a character assignment will truncate the assigned string. |
436 | ||
6de9cd9a | 437 | @item -Wconversion |
32864778 DF |
438 | @opindex @code{Wconversion} |
439 | @cindex warnings, conversion | |
6de9cd9a DN |
440 | @cindex conversion |
441 | Warn about implicit conversions between different types. | |
442 | ||
6de9cd9a | 443 | @item -Wimplicit-interface |
32864778 DF |
444 | @opindex @code{Wimplicit-interface} |
445 | @cindex warnings, implicit interface | |
02712c16 | 446 | Warn if a procedure is called without an explicit interface. |
6de9cd9a DN |
447 | Note this only checks that an explicit interface is present. It does not |
448 | check that the declared interfaces are consistent across program units. | |
449 | ||
276419d0 | 450 | @item -Wnonstd-intrinsics |
32864778 DF |
451 | @opindex @code{Wnonstd-intrinsics} |
452 | @cindex warnings, non-stdandard intrinsics | |
b7892582 | 453 | Warn if the user tries to use an intrinsic that does not belong to the |
276419d0 | 454 | standard the user has chosen via the @option{-std} option. |
b7892582 | 455 | |
6de9cd9a | 456 | @item -Wsurprising |
32864778 DF |
457 | @opindex @code{Wsurprising} |
458 | @cindex warnings, suspicious code | |
2d8b59df SK |
459 | Produce a warning when ``suspicious'' code constructs are encountered. |
460 | While technically legal these usually indicate that an error has been made. | |
6de9cd9a DN |
461 | |
462 | This currently produces a warning under the following circumstances: | |
463 | ||
464 | @itemize @bullet | |
465 | @item | |
ffd1953e FXC |
466 | An INTEGER SELECT construct has a CASE that can never be matched as its |
467 | lower value is greater than its upper value. | |
6de9cd9a DN |
468 | |
469 | @item | |
470 | A LOGICAL SELECT construct has three CASE statements. | |
471 | @end itemize | |
472 | ||
840bd9f7 | 473 | @item -Wtabs |
32864778 DF |
474 | @opindex @code{Wtabs} |
475 | @cindex warnings, tabs | |
e739dfac | 476 | @cindex tabulators |
840bd9f7 SK |
477 | By default, tabs are accepted as whitespace, but tabs are not members |
478 | of the Fortran Character Set. @option{-Wno-tabs} will cause a warning | |
479 | to be issued if a tab is encountered. Note, @option{-Wno-tabs} is active | |
8135cfa8 SK |
480 | for @option{-pedantic}, @option{-std=f95}, @option{-std=f2003}, and |
481 | @option{-Wall}. | |
840bd9f7 | 482 | |
2d8b59df | 483 | @item -Wunderflow |
32864778 DF |
484 | @opindex @code{Wunderflow} |
485 | @cindex warnings, underflow | |
486 | @cindex underflow | |
2d8b59df SK |
487 | Produce a warning when numerical constant expressions are |
488 | encountered, which yield an UNDERFLOW during compilation. | |
489 | ||
6de9cd9a | 490 | @item -Werror |
32864778 DF |
491 | @opindex @code{Werror} |
492 | @cindex warnings, to errors | |
6de9cd9a DN |
493 | Turns all warnings into errors. |
494 | ||
6de9cd9a | 495 | @item -W |
32864778 | 496 | @opindex @code{W} |
6de9cd9a | 497 | @cindex warnings, extra |
32864778 | 498 | @cindex extra warnings |
6de9cd9a DN |
499 | Turns on ``extra warnings'' and, if optimization is specified |
500 | via @option{-O}, the @option{-Wuninitialized} option. | |
7fc15ba5 | 501 | (This might change in future versions of GNU Fortran.) |
6de9cd9a DN |
502 | @end table |
503 | ||
592600ce BM |
504 | @xref{Error and Warning Options,,Options to Request or Suppress Errors and |
505 | Warnings, gcc,Using the GNU Compiler Collection (GCC)}, for information on | |
506 | more options offered by the GBE shared by @command{gfortran}, @command{gcc} | |
507 | and other GNU compilers. | |
6de9cd9a DN |
508 | |
509 | Some of these have no effect when compiling programs written in Fortran. | |
510 | ||
511 | @node Debugging Options | |
512 | @section Options for Debugging Your Program or GNU Fortran | |
513 | @cindex options, debugging | |
514 | @cindex debugging information options | |
515 | ||
516 | GNU Fortran has various special options that are used for debugging | |
7fc15ba5 | 517 | either your program or the GNU Fortran compiler. |
6de9cd9a DN |
518 | |
519 | @table @gcctabopt | |
6de9cd9a | 520 | @item -fdump-parse-tree |
32864778 | 521 | @opindex @code{fdump-parse-tree} |
6de9cd9a | 522 | Output the internal parse tree before starting code generation. Only |
7fc15ba5 | 523 | really useful for debugging the GNU Fortran compiler itself. |
6de9cd9a | 524 | |
944b8b35 | 525 | @item -ffpe-trap=@var{list} |
32864778 | 526 | @opindex @code{ffpe-trap=}@var{list} |
944b8b35 FXC |
527 | Specify a list of IEEE exceptions when a Floating Point Exception |
528 | (FPE) should be raised. On most systems, this will result in a SIGFPE | |
529 | signal being sent and the program being interrupted, producing a core | |
530 | file useful for debugging. @var{list} is a (possibly empty) comma-separated | |
531 | list of the following IEEE exceptions: @samp{invalid} (invalid floating | |
40746dcc | 532 | point operation, such as @code{SQRT(-1.0)}), @samp{zero} (division by |
944b8b35 FXC |
533 | zero), @samp{overflow} (overflow in a floating point operation), |
534 | @samp{underflow} (underflow in a floating point operation), | |
535 | @samp{precision} (loss of precision during operation) and @samp{denormal} | |
27ea0360 | 536 | (operation produced a denormal value). |
eedeea04 | 537 | |
868d75db | 538 | @item -fbacktrace |
32864778 | 539 | @opindex @code{fbacktrace} |
868d75db FXC |
540 | @cindex backtrace |
541 | @cindex trace | |
542 | Specify that, when a runtime error is encountered, the Fortran runtime | |
543 | library should output a backtrace of the error. This option | |
544 | only has influence for compilation of the Fortran main program. | |
545 | ||
eedeea04 | 546 | @item -fdump-core |
e739dfac DF |
547 | @cindex core, dump |
548 | @opindex @code{fdump-core} | |
eedeea04 FXC |
549 | Request that a core-dump file is written to disk when a runtime error |
550 | is encountered on systems that support core dumps. This option is | |
551 | only effective for the compilation of the Fortran main program. | |
944b8b35 FXC |
552 | @end table |
553 | ||
6de9cd9a DN |
554 | @xref{Debugging Options,,Options for Debugging Your Program or GCC, |
555 | gcc,Using the GNU Compiler Collection (GCC)}, for more information on | |
556 | debugging options. | |
557 | ||
558 | @node Directory Options | |
559 | @section Options for Directory Search | |
560 | @cindex directory, options | |
561 | @cindex options, directory search | |
562 | @cindex search path | |
6de9cd9a DN |
563 | @cindex INCLUDE directive |
564 | @cindex directive, INCLUDE | |
7fc15ba5 | 565 | These options affect how GNU Fortran searches |
5724da63 | 566 | for files specified by the @code{INCLUDE} directive and where it searches |
6de9cd9a DN |
567 | for previously compiled modules. |
568 | ||
569 | It also affects the search paths used by @command{cpp} when used to preprocess | |
2d8b59df | 570 | Fortran source. |
6de9cd9a DN |
571 | |
572 | @table @gcctabopt | |
6de9cd9a | 573 | @item -I@var{dir} |
32864778 | 574 | @opindex @code{I}@var{dir} |
6de9cd9a DN |
575 | @cindex directory, search paths for inclusion |
576 | @cindex inclusion, directory search paths for | |
577 | @cindex search paths, for included files | |
578 | @cindex paths, search | |
579 | @cindex module search path | |
580 | These affect interpretation of the @code{INCLUDE} directive | |
581 | (as well as of the @code{#include} directive of the @command{cpp} | |
582 | preprocessor). | |
583 | ||
584 | Also note that the general behavior of @option{-I} and | |
585 | @code{INCLUDE} is pretty much the same as of @option{-I} with | |
586 | @code{#include} in the @command{cpp} preprocessor, with regard to | |
587 | looking for @file{header.gcc} files and other such things. | |
588 | ||
40746dcc | 589 | This path is also used to search for @file{.mod} files when previously |
6de9cd9a DN |
590 | compiled modules are required by a @code{USE} statement. |
591 | ||
592 | @xref{Directory Options,,Options for Directory Search, | |
593 | gcc,Using the GNU Compiler Collection (GCC)}, for information on the | |
594 | @option{-I} option. | |
595 | ||
6de9cd9a DN |
596 | @item -M@var{dir} |
597 | @item -J@var{dir} | |
32864778 DF |
598 | @opindex @code{M}@var{dir} |
599 | @opindex @code{J}@var{dir} | |
276419d0 BM |
600 | @cindex paths, search |
601 | @cindex module search path | |
40746dcc | 602 | This option specifies where to put @file{.mod} files for compiled modules. |
2d8b59df | 603 | It is also added to the list of directories to searched by an @code{USE} |
6de9cd9a DN |
604 | statement. |
605 | ||
606 | The default is the current directory. | |
607 | ||
608 | @option{-J} is an alias for @option{-M} to avoid conflicts with existing | |
609 | GCC options. | |
276419d0 BM |
610 | |
611 | @item -fintrinsic-modules-path @var{dir} | |
32864778 | 612 | @opindex @code{fintrinsic-modules-path} @var{dir} |
276419d0 BM |
613 | @cindex paths, search |
614 | @cindex module search path | |
615 | This option specifies the location of pre-compiled intrinsic modules, if | |
616 | they are not in the default location expected by the compiler. | |
6de9cd9a DN |
617 | @end table |
618 | ||
eaa90d25 TK |
619 | @node Runtime Options |
620 | @section Influencing runtime behavior | |
e739dfac | 621 | @cindex options, runtime |
eaa90d25 | 622 | |
7fc15ba5 | 623 | These options affect the runtime behavior of programs compiled with GNU Fortran. |
eaa90d25 | 624 | @table @gcctabopt |
eaa90d25 | 625 | @item -fconvert=@var{conversion} |
32864778 | 626 | @opindex @code{fconvert=}@var{conversion} |
eaa90d25 TK |
627 | Specify the representation of data for unformatted files. Valid |
628 | values for conversion are: @samp{native}, the default; @samp{swap}, | |
629 | swap between big- and little-endian; @samp{big-endian}, use big-endian | |
630 | representation for unformatted files; @samp{little-endian}, use little-endian | |
631 | representation for unformatted files. | |
632 | ||
633 | @emph{This option has an effect only when used in the main program. | |
634 | The @code{CONVERT} specifier and the GFORTRAN_CONVERT_UNIT environment | |
40746dcc | 635 | variable override the default specified by @option{-fconvert}.} |
d67ab5ee | 636 | |
d67ab5ee | 637 | @item -frecord-marker=@var{length} |
32864778 | 638 | @opindex @code{frecord-marker=}@var{length} |
d67ab5ee | 639 | Specify the length of record markers for unformatted files. |
07b3bbf2 TK |
640 | Valid values for @var{length} are 4 and 8. Default is 4. |
641 | @emph{This is different from previous versions of gfortran}, | |
642 | which specified a default record marker length of 8 on most | |
643 | systems. If you want to read or write files compatible | |
40746dcc | 644 | with earlier versions of gfortran, use @option{-frecord-marker=8}. |
07b3bbf2 | 645 | |
07b3bbf2 | 646 | @item -fmax-subrecord-length=@var{length} |
32864778 | 647 | @opindex @code{fmax-subrecord-length=}@var{length} |
07b3bbf2 TK |
648 | Specify the maximum length for a subrecord. The maximum permitted |
649 | value for length is 2147483639, which is also the default. Only | |
650 | really useful for use by the gfortran testsuite. | |
eaa90d25 TK |
651 | @end table |
652 | ||
6de9cd9a DN |
653 | @node Code Gen Options |
654 | @section Options for Code Generation Conventions | |
655 | @cindex code generation, conventions | |
656 | @cindex options, code generation | |
e739dfac | 657 | @cindex options, run-time |
6de9cd9a DN |
658 | |
659 | These machine-independent options control the interface conventions | |
660 | used in code generation. | |
661 | ||
662 | Most of them have both positive and negative forms; the negative form | |
663 | of @option{-ffoo} would be @option{-fno-foo}. In the table below, only | |
664 | one of the forms is listed---the one which is not the default. You | |
665 | can figure out the other form by either removing @option{no-} or adding | |
666 | it. | |
667 | ||
6de9cd9a | 668 | @table @gcctabopt |
ee5426a4 | 669 | @item -fno-automatic |
32864778 | 670 | @opindex @code{fno-automatic} |
e739dfac DF |
671 | @cindex @code{SAVE} statement |
672 | @cindex statement, @code{SAVE} | |
ee5426a4 FXC |
673 | Treat each program unit as if the @code{SAVE} statement was specified for |
674 | every local variable and array referenced in it. Does not affect common | |
675 | blocks. (Some Fortran compilers provide this option under the name | |
676 | @option{-static}.) | |
677 | ||
973ff4c0 | 678 | @item -ff2c |
e739dfac | 679 | @opindex ff2c |
973ff4c0 TS |
680 | @cindex calling convention |
681 | @cindex @command{f2c} calling convention | |
682 | @cindex @command{g77} calling convention | |
683 | @cindex libf2c calling convention | |
684 | Generate code designed to be compatible with code generated | |
685 | by @command{g77} and @command{f2c}. | |
686 | ||
687 | The calling conventions used by @command{g77} (originally implemented | |
688 | in @command{f2c}) require functions that return type | |
689 | default @code{REAL} to actually return the C type @code{double}, and | |
690 | functions that return type @code{COMPLEX} to return the values via an | |
691 | extra argument in the calling sequence that points to where to | |
692 | store the return value. Under the default GNU calling conventions, such | |
693 | functions simply return their results as they would in GNU | |
8556236b | 694 | C---default @code{REAL} functions return the C type @code{float}, and |
973ff4c0 | 695 | @code{COMPLEX} functions return the GNU C type @code{complex}. |
a226fc2b TS |
696 | Additionally, this option implies the @option{-fsecond-underscore} |
697 | option, unless @option{-fno-second-underscore} is explicitly requested. | |
973ff4c0 TS |
698 | |
699 | This does not affect the generation of code that interfaces with | |
700 | the @command{libgfortran} library. | |
701 | ||
40746dcc BM |
702 | @emph{Caution:} It is not a good idea to mix Fortran code compiled with |
703 | @option{-ff2c} with code compiled with the default @option{-fno-f2c} | |
973ff4c0 TS |
704 | calling conventions as, calling @code{COMPLEX} or default @code{REAL} |
705 | functions between program parts which were compiled with different | |
706 | calling conventions will break at execution time. | |
707 | ||
708 | @emph{Caution:} This will break code which passes intrinsic functions | |
709 | of type default @code{REAL} or @code{COMPLEX} as actual arguments, as | |
40746dcc | 710 | the library implementations use the @option{-fno-f2c} calling conventions. |
973ff4c0 | 711 | |
6de9cd9a | 712 | @item -fno-underscoring |
32864778 | 713 | @opindex @code{fno-underscoring} |
6de9cd9a DN |
714 | @cindex underscore |
715 | @cindex symbol names, underscores | |
716 | @cindex transforming symbol names | |
717 | @cindex symbol names, transforming | |
718 | Do not transform names of entities specified in the Fortran | |
719 | source file by appending underscores to them. | |
720 | ||
7fc15ba5 | 721 | With @option{-funderscoring} in effect, GNU Fortran appends one |
5724da63 JD |
722 | underscore to external names with no underscores. This is done to ensure |
723 | compatibility with code produced by many UNIX Fortran compilers. | |
973ff4c0 | 724 | |
7fc15ba5 | 725 | @emph{Caution}: The default behavior of GNU Fortran is |
973ff4c0 | 726 | incompatible with @command{f2c} and @command{g77}, please use the |
b4cbcd1a | 727 | @option{-ff2c} option if you want object files compiled with |
7fc15ba5 | 728 | GNU Fortran to be compatible with object code created with these |
b4cbcd1a | 729 | tools. |
6de9cd9a DN |
730 | |
731 | Use of @option{-fno-underscoring} is not recommended unless you are | |
7fc15ba5 | 732 | experimenting with issues such as integration of GNU Fortran into |
6de9cd9a DN |
733 | existing system environments (vis-a-vis existing libraries, tools, and |
734 | so on). | |
735 | ||
736 | For example, with @option{-funderscoring}, and assuming other defaults like | |
40746dcc BM |
737 | @option{-fcase-lower} and that @code{j()} and @code{max_count()} are |
738 | external functions while @code{my_var} and @code{lvar} are local variables, | |
6de9cd9a | 739 | a statement like |
6de9cd9a DN |
740 | @smallexample |
741 | I = J() + MAX_COUNT (MY_VAR, LVAR) | |
742 | @end smallexample | |
6de9cd9a DN |
743 | @noindent |
744 | is implemented as something akin to: | |
6de9cd9a DN |
745 | @smallexample |
746 | i = j_() + max_count__(&my_var__, &lvar); | |
747 | @end smallexample | |
748 | ||
749 | With @option{-fno-underscoring}, the same statement is implemented as: | |
750 | ||
751 | @smallexample | |
752 | i = j() + max_count(&my_var, &lvar); | |
753 | @end smallexample | |
754 | ||
755 | Use of @option{-fno-underscoring} allows direct specification of | |
7fc15ba5 | 756 | user-defined names while debugging and when interfacing GNU Fortran |
6de9cd9a DN |
757 | code with other languages. |
758 | ||
759 | Note that just because the names match does @emph{not} mean that the | |
7fc15ba5 | 760 | interface implemented by GNU Fortran for an external name matches the |
6de9cd9a | 761 | interface implemented by some other language for that same name. |
7fc15ba5 | 762 | That is, getting code produced by GNU Fortran to link to code produced |
6de9cd9a DN |
763 | by some other compiler using this or any other method can be only a |
764 | small part of the overall solution---getting the code generated by | |
765 | both compilers to agree on issues other than naming can require | |
766 | significant effort, and, unlike naming disagreements, linkers normally | |
767 | cannot detect disagreements in these other areas. | |
768 | ||
769 | Also, note that with @option{-fno-underscoring}, the lack of appended | |
770 | underscores introduces the very real possibility that a user-defined | |
771 | external name will conflict with a name in a system library, which | |
772 | could make finding unresolved-reference bugs quite difficult in some | |
773 | cases---they might occur at program run time, and show up only as | |
774 | buggy behavior at run time. | |
775 | ||
7fc15ba5 | 776 | In future versions of GNU Fortran we hope to improve naming and linking |
6de9cd9a DN |
777 | issues so that debugging always involves using the names as they appear |
778 | in the source, even if the names as seen by the linker are mangled to | |
779 | prevent accidental linking between procedures with incompatible | |
780 | interfaces. | |
781 | ||
973ff4c0 | 782 | @item -fsecond-underscore |
32864778 | 783 | @opindex @code{fsecond-underscore} |
6de9cd9a DN |
784 | @cindex underscore |
785 | @cindex symbol names, underscores | |
786 | @cindex transforming symbol names | |
787 | @cindex symbol names, transforming | |
973ff4c0 TS |
788 | @cindex @command{f2c} calling convention |
789 | @cindex @command{g77} calling convention | |
790 | @cindex libf2c calling convention | |
7fc15ba5 BM |
791 | By default, GNU Fortran appends an underscore to external |
792 | names. If this option is used GNU Fortran appends two | |
973ff4c0 | 793 | underscores to names with underscores and one underscore to external names |
7fc15ba5 | 794 | with no underscores. GNU Fortran also appends two underscores to |
973ff4c0 TS |
795 | internal names with underscores to avoid naming collisions with external |
796 | names. | |
6de9cd9a DN |
797 | |
798 | This option has no effect if @option{-fno-underscoring} is | |
973ff4c0 | 799 | in effect. It is implied by the @option{-ff2c} option. |
6de9cd9a | 800 | |
40746dcc | 801 | Otherwise, with this option, an external name such as @code{MAX_COUNT} |
6de9cd9a | 802 | is implemented as a reference to the link-time external symbol |
40746dcc | 803 | @code{max_count__}, instead of @code{max_count_}. This is required |
973ff4c0 TS |
804 | for compatibility with @command{g77} and @command{f2c}, and is implied |
805 | by use of the @option{-ff2c} option. | |
6de9cd9a | 806 | |
6de9cd9a | 807 | @item -fbounds-check |
32864778 | 808 | @opindex @code{fbounds-check} |
e739dfac | 809 | @cindex array, bounds checking |
6de9cd9a DN |
810 | @cindex bounds checking |
811 | @cindex range checking | |
6de9cd9a DN |
812 | @cindex subscript checking |
813 | @cindex checking subscripts | |
814 | Enable generation of run-time checks for array subscripts | |
815 | and against the declared minimum and maximum values. It also | |
816 | checks array indices for assumed and deferred | |
817 | shape arrays against the actual allocated bounds. | |
818 | ||
8370304d | 819 | In the future this may also include other forms of checking, e.g., checking |
6de9cd9a DN |
820 | substring references. |
821 | ||
6de9cd9a | 822 | @item -fmax-stack-var-size=@var{n} |
32864778 | 823 | @opindex @code{fmax-stack-var-size} |
6de9cd9a DN |
824 | This option specifies the size in bytes of the largest array that will be put |
825 | on the stack. | |
826 | ||
827 | This option currently only affects local arrays declared with constant | |
828 | bounds, and may not apply to all character variables. | |
7fc15ba5 | 829 | Future versions of GNU Fortran may improve this behavior. |
6de9cd9a DN |
830 | |
831 | The default value for @var{n} is 32768. | |
832 | ||
5139e1e9 | 833 | @item -fpack-derived |
32864778 DF |
834 | @opindex @code{fpack-derived} |
835 | @cindex structure packing | |
7fc15ba5 | 836 | This option tells GNU Fortran to pack derived type members as closely as |
2d8b59df | 837 | possible. Code compiled with this option is likely to be incompatible |
6de9cd9a DN |
838 | with code compiled without this option, and may execute slower. |
839 | ||
6de9cd9a | 840 | @item -frepack-arrays |
32864778 DF |
841 | @opindex @code{frepack-arrays} |
842 | @cindex repacking arrays | |
7fc15ba5 | 843 | In some circumstances GNU Fortran may pass assumed shape array |
02712c16 | 844 | sections via a descriptor describing a noncontiguous area of memory. |
6de9cd9a DN |
845 | This option adds code to the function prologue to repack the data into |
846 | a contiguous block at runtime. | |
847 | ||
848 | This should result in faster accesses to the array. However it can introduce | |
849 | significant overhead to the function call, especially when the passed data | |
02712c16 | 850 | is noncontiguous. |
a63dad5b | 851 | |
a63dad5b | 852 | @item -fshort-enums |
32864778 | 853 | @opindex @code{fshort-enums} |
a63dad5b | 854 | This option is provided for interoperability with C code that was |
4ba96c02 | 855 | compiled with the @option{-fshort-enums} option. It will make |
7fc15ba5 | 856 | GNU Fortran choose the smallest @code{INTEGER} kind a given |
a63dad5b | 857 | enumerator set will fit in, and give all its enumerators this kind. |
5a0aad31 | 858 | |
5a0aad31 | 859 | @item -fexternal-blas |
32864778 | 860 | @opindex @code{fexternal-blas} |
5a0aad31 FXC |
861 | This option will make gfortran generate calls to BLAS functions for some |
862 | matrix operations like @code{MATMUL}, instead of using our own | |
863 | algorithms, if the size of the matrices involved is larger than a given | |
4ba96c02 | 864 | limit (see @option{-fblas-matmul-limit}). This may be profitable if an |
5a0aad31 FXC |
865 | optimized vendor BLAS library is available. The BLAS library will have |
866 | to be specified at link time. | |
867 | ||
5a0aad31 | 868 | @item -fblas-matmul-limit=@var{n} |
32864778 | 869 | @opindex @code{fblas-matmul-limit} |
4ba96c02 | 870 | Only significant when @option{-fexternal-blas} is in effect. |
5a0aad31 FXC |
871 | Matrix multiplication of matrices with size larger than (or equal to) @var{n} |
872 | will be performed by calls to BLAS functions, while others will be | |
873 | handled by @command{gfortran} internal algorithms. If the matrices | |
874 | involved are not square, the size comparison is performed using the | |
875 | geometric mean of the dimensions of the argument and result matrices. | |
876 | ||
877 | The default value for @var{n} is 30. | |
878 | ||
6de9cd9a DN |
879 | @end table |
880 | ||
881 | @xref{Code Gen Options,,Options for Code Generation Conventions, | |
882 | gcc,Using the GNU Compiler Collection (GCC)}, for information on more options | |
883 | offered by the GBE | |
7fc15ba5 | 884 | shared by @command{gfortran}, @command{gcc}, and other GNU compilers. |
6de9cd9a DN |
885 | |
886 | ||
887 | @c man end | |
888 | ||
889 | @node Environment Variables | |
7fc15ba5 | 890 | @section Environment Variables Affecting @command{gfortran} |
e739dfac | 891 | @cindex environment variable |
6de9cd9a DN |
892 | |
893 | @c man begin ENVIRONMENT | |
894 | ||
7fc15ba5 | 895 | The @command{gfortran} compiler currently does not make use of any environment |
6de9cd9a DN |
896 | variables to control its operation above and beyond those |
897 | that affect the operation of @command{gcc}. | |
898 | ||
899 | @xref{Environment Variables,,Environment Variables Affecting GCC, | |
900 | gcc,Using the GNU Compiler Collection (GCC)}, for information on environment | |
901 | variables. | |
902 | ||
eaa90d25 | 903 | @xref{Runtime}, for environment variables that affect the |
7fc15ba5 | 904 | run-time behavior of programs compiled with GNU Fortran. |
6de9cd9a | 905 | @c man end |