1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 1999-2023 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. -->
<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>The GNU Fortran Compiler: Fortran Dialect Options</title>
<meta name="description" content="The GNU Fortran Compiler: Fortran Dialect Options">
<meta name="keywords" content="The GNU Fortran Compiler: Fortran Dialect Options">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" rel="up" title="Invoking GNU Fortran">
<link href="Preprocessing-Options.html#Preprocessing-Options" rel="next" title="Preprocessing Options">
<link href="Option-Summary.html#Option-Summary" rel="previous" title="Option Summary">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Fortran-Dialect-Options"></a>
<div class="header">
<p>
Next: <a href="Preprocessing-Options.html#Preprocessing-Options" accesskey="n" rel="next">Preprocessing Options</a>, Previous: <a href="Option-Summary.html#Option-Summary" accesskey="p" rel="previous">Option Summary</a>, Up: <a href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" accesskey="u" rel="up">Invoking GNU Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Options-controlling-Fortran-dialect"></a>
<h3 class="section">2.2 Options controlling Fortran dialect</h3>
<a name="index-dialect-options"></a>
<a name="index-language_002c-dialect-options"></a>
<a name="index-options_002c-dialect"></a>
<p>The following options control the details of the Fortran dialect
accepted by the compiler:
</p>
<dl compact="compact">
<dd><a name="index-ffree_002dform"></a>
<a name="index-ffixed_002dform"></a>
<a name="index-options_002c-Fortran-dialect"></a>
<a name="index-file-format_002c-free"></a>
<a name="index-file-format_002c-fixed"></a>
</dd>
<dt><code>-ffree-form</code></dt>
<dt><code>-ffixed-form</code></dt>
<dd><p>Specify the layout used by the source file. The free form layout
was introduced in Fortran 90. Fixed form was traditionally used in
older Fortran programs. When neither option is specified, the source
form is determined by the file extension.
</p>
<a name="index-fall_002dintrinsics"></a>
</dd>
<dt><code>-fall-intrinsics</code></dt>
<dd><p>This option causes all intrinsic procedures (including the GNU-specific
extensions) to be accepted. This can be useful with <samp>-std=</samp> to
force standard-compliance but get access to the full range of intrinsics
available with <code>gfortran</code>. As a consequence, <samp>-Wintrinsics-std</samp>
will be ignored and no user-defined procedure with the same name as any
intrinsic will be called except when it is explicitly declared <code>EXTERNAL</code>.
</p>
<a name="index-fallow_002dargument_002dmismatch"></a>
</dd>
<dt><code>-fallow-argument-mismatch</code></dt>
<dd><p>Some code contains calls to external procedures with mismatches
between the calls and the procedure definition, or with mismatches
between different calls. Such code is non-conforming, and will usually
be flagged with an error. This options degrades the error to a
warning, which can only be disabled by disabling all warnings via
<samp>-w</samp>. Only a single occurrence per argument is flagged by this
warning. <samp>-fallow-argument-mismatch</samp> is implied by
<samp>-std=legacy</samp>.
</p>
<p>Using this option is <em>strongly</em> discouraged. It is possible to
provide standard-conforming code which allows different types of
arguments by using an explicit interface and <code>TYPE(*)</code>.
</p>
<a name="index-allow_002dinvalid_002dboz"></a>
</dd>
<dt><code>-fallow-invalid-boz</code></dt>
<dd><p>A BOZ literal constant can occur in a limited number of contexts in
standard conforming Fortran. This option degrades an error condition
to a warning, and allows a BOZ literal constant to appear where the
Fortran standard would otherwise prohibit its use.
</p>
<a name="index-fd_002dlines_002das_002dcode"></a>
<a name="index-fd_002dlines_002das_002dcomments"></a>
</dd>
<dt><code>-fd-lines-as-code</code></dt>
<dt><code>-fd-lines-as-comments</code></dt>
<dd><p>Enable special treatment for lines beginning with <code>d</code> or <code>D</code>
in fixed form sources. If the <samp>-fd-lines-as-code</samp> option is
given they are treated as if the first column contained a blank. If the
<samp>-fd-lines-as-comments</samp> option is given, they are treated as
comment lines.
</p>
<a name="index-fdec"></a>
</dd>
<dt><code>-fdec</code></dt>
<dd><p>DEC compatibility mode. Enables extensions and other features that mimic
the default behavior of older compilers (such as DEC).
These features are non-standard and should be avoided at all costs.
For details on GNU Fortran’s implementation of these extensions see the
full documentation.
</p>
<p>Other flags enabled by this switch are:
<samp>-fdollar-ok</samp> <samp>-fcray-pointer</samp> <samp>-fdec-char-conversions</samp>
<samp>-fdec-structure</samp> <samp>-fdec-intrinsic-ints</samp> <samp>-fdec-static</samp>
<samp>-fdec-math</samp> <samp>-fdec-include</samp> <samp>-fdec-blank-format-item</samp>
<samp>-fdec-format-defaults</samp>
</p>
<p>If <samp>-fd-lines-as-code</samp>/<samp>-fd-lines-as-comments</samp> are unset, then
<samp>-fdec</samp> also sets <samp>-fd-lines-as-comments</samp>.
</p>
<a name="index-fdec_002dchar_002dconversions"></a>
</dd>
<dt><code>-fdec-char-conversions</code></dt>
<dd><p>Enable the use of character literals in assignments and <code>DATA</code> statements
for non-character variables.
</p>
<a name="index-fdec_002dstructure"></a>
</dd>
<dt><code>-fdec-structure</code></dt>
<dd><p>Enable DEC <code>STRUCTURE</code> and <code>RECORD</code> as well as <code>UNION</code>,
<code>MAP</code>, and dot (’.’) as a member separator (in addition to ’%’). This is
provided for compatibility only; Fortran 90 derived types should be used
instead where possible.
</p>
<a name="index-fdec_002dintrinsic_002dints"></a>
</dd>
<dt><code>-fdec-intrinsic-ints</code></dt>
<dd><p>Enable B/I/J/K kind variants of existing integer functions (e.g. BIAND, IIAND,
JIAND, etc...). For a complete list of intrinsics see the full documentation.
</p>
<a name="index-fdec_002dmath"></a>
</dd>
<dt><code>-fdec-math</code></dt>
<dd><p>Enable legacy math intrinsics such as COTAN and degree-valued trigonometric
functions (e.g. TAND, ATAND, etc...) for compatability with older code.
</p>
<a name="index-fdec_002dstatic"></a>
</dd>
<dt><code>-fdec-static</code></dt>
<dd><p>Enable DEC-style STATIC and AUTOMATIC attributes to explicitly specify
the storage of variables and other objects.
</p>
<a name="index-fdec_002dinclude"></a>
</dd>
<dt><code>-fdec-include</code></dt>
<dd><p>Enable parsing of INCLUDE as a statement in addition to parsing it as
INCLUDE line. When parsed as INCLUDE statement, INCLUDE does not have to
be on a single line and can use line continuations.
</p>
<a name="index-fdec_002dformat_002ddefaults"></a>
</dd>
<dt><code>-fdec-format-defaults</code></dt>
<dd><p>Enable format specifiers F, G and I to be used without width specifiers,
default widths will be used instead.
</p>
<a name="index-fdec_002dblank_002dformat_002ditem"></a>
</dd>
<dt><code>-fdec-blank-format-item</code></dt>
<dd><p>Enable a blank format item at the end of a format specification i.e. nothing
following the final comma.
</p>
<a name="index-fdollar_002dok"></a>
<a name="index-_0024"></a>
<a name="index-symbol-names"></a>
<a name="index-character-set"></a>
</dd>
<dt><code>-fdollar-ok</code></dt>
<dd><p>Allow ‘<samp>$</samp>’ as a valid non-first character in a symbol name. Symbols
that start with ‘<samp>$</samp>’ are rejected since it is unclear which rules to
apply to implicit typing as different vendors implement different rules.
Using ‘<samp>$</samp>’ in <code>IMPLICIT</code> statements is also rejected.
</p>
<a name="index-backslash-1"></a>
<a name="index-backslash"></a>
<a name="index-escape-characters"></a>
</dd>
<dt><code>-fbackslash</code></dt>
<dd><p>Change the interpretation of backslashes in string literals from a single
backslash character to “C-style” escape characters. The following
combinations are expanded <code>\a</code>, <code>\b</code>, <code>\f</code>, <code>\n</code>,
<code>\r</code>, <code>\t</code>, <code>\v</code>, <code>\\</code>, and <code>\0</code> to the ASCII
characters alert, backspace, form feed, newline, carriage return,
horizontal tab, vertical tab, backslash, and NUL, respectively.
Additionally, <code>\x</code><var>nn</var>, <code>\u</code><var>nnnn</var> and
<code>\U</code><var>nnnnnnnn</var> (where each <var>n</var> is a hexadecimal digit) are
translated into the Unicode characters corresponding to the specified code
points. All other combinations of a character preceded by \ are
unexpanded.
</p>
<a name="index-fmodule_002dprivate"></a>
<a name="index-module-entities"></a>
<a name="index-private"></a>
</dd>
<dt><code>-fmodule-private</code></dt>
<dd><p>Set the default accessibility of module entities to <code>PRIVATE</code>.
Use-associated entities will not be accessible unless they are explicitly
declared as <code>PUBLIC</code>.
</p>
<a name="index-ffixed_002dline_002dlength_002dn"></a>
<a name="index-file-format_002c-fixed-1"></a>
</dd>
<dt><code>-ffixed-line-length-<var>n</var></code></dt>
<dd><p>Set column after which characters are ignored in typical fixed-form
lines in the source file, and, unless <code>-fno-pad-source</code>, through which
spaces are assumed (as if padded to that length) after the ends of short
fixed-form lines.
</p>
<p>Popular values for <var>n</var> include 72 (the
standard and the default), 80 (card image), and 132 (corresponding
to “extended-source” options in some popular compilers).
<var>n</var> may also be ‘<samp>none</samp>’, meaning that the entire line is meaningful
and that continued character constants never have implicit spaces appended
to them to fill out the line.
<samp>-ffixed-line-length-0</samp> means the same thing as
<samp>-ffixed-line-length-none</samp>.
</p>
<a name="index-fpad_002dsource"></a>
</dd>
<dt><code>-fno-pad-source</code></dt>
<dd><p>By default fixed-form lines have spaces assumed (as if padded to that length)
after the ends of short fixed-form lines. This is not done either if
<samp>-ffixed-line-length-0</samp>, <samp>-ffixed-line-length-none</samp> or
if <samp>-fno-pad-source</samp> option is used. With any of those options
continued character constants never have implicit spaces appended
to them to fill out the line.
</p>
<a name="index-ffree_002dline_002dlength_002dn"></a>
<a name="index-file-format_002c-free-1"></a>
</dd>
<dt><code>-ffree-line-length-<var>n</var></code></dt>
<dd><p>Set column after which characters are ignored in typical free-form
lines in the source file. The default value is 132.
<var>n</var> may be ‘<samp>none</samp>’, meaning that the entire line is meaningful.
<samp>-ffree-line-length-0</samp> means the same thing as
<samp>-ffree-line-length-none</samp>.
</p>
<a name="index-fmax_002didentifier_002dlength_003dn"></a>
</dd>
<dt><code>-fmax-identifier-length=<var>n</var></code></dt>
<dd><p>Specify the maximum allowed identifier length. Typical values are
31 (Fortran 95) and 63 (Fortran 2003 and later).
</p>
<a name="index-fimplicit_002dnone"></a>
</dd>
<dt><code>-fimplicit-none</code></dt>
<dd><p>Specify that no implicit typing is allowed, unless overridden by explicit
<code>IMPLICIT</code> statements. This is the equivalent of adding
<code>implicit none</code> to the start of every procedure.
</p>
<a name="index-fcray_002dpointer"></a>
</dd>
<dt><code>-fcray-pointer</code></dt>
<dd><p>Enable the Cray pointer extension, which provides C-like pointer
functionality.
</p>
<a name="index-fopenacc"></a>
<a name="index-OpenACC"></a>
</dd>
<dt><code>-fopenacc</code></dt>
<dd><p>Enable the OpenACC extensions. This includes OpenACC <code>!$acc</code>
directives in free form and <code>c$acc</code>, <code>*$acc</code> and
<code>!$acc</code> directives in fixed form, <code>!$</code> conditional
compilation sentinels in free form and <code>c$</code>, <code>*$</code> and
<code>!$</code> sentinels in fixed form, and when linking arranges for the
OpenACC runtime library to be linked in.
</p>
<a name="index-fopenmp"></a>
<a name="index-OpenMP"></a>
</dd>
<dt><code>-fopenmp</code></dt>
<dd><p>Enable the OpenMP extensions. This includes OpenMP <code>!$omp</code> directives
in free form
and <code>c$omp</code>, <code>*$omp</code> and <code>!$omp</code> directives in fixed form,
<code>!$</code> conditional compilation sentinels in free form
and <code>c$</code>, <code>*$</code> and <code>!$</code> sentinels in fixed form,
and when linking arranges for the OpenMP runtime library to be linked
in. The option <samp>-fopenmp</samp> implies <samp>-frecursive</samp>.
</p>
<a name="index-frange_002dcheck"></a>
</dd>
<dt><code>-fno-range-check</code></dt>
<dd><p>Disable range checking on results of simplification of constant
expressions during compilation. For example, GNU Fortran will give
an error at compile time when simplifying <code>a = 1. / 0</code>.
With this option, no error will be given and <code>a</code> will be assigned
the value <code>+Infinity</code>. If an expression evaluates to a value
outside of the relevant range of [<code>-HUGE()</code>:<code>HUGE()</code>],
then the expression will be replaced by <code>-Inf</code> or <code>+Inf</code>
as appropriate.
Similarly, <code>DATA i/Z'FFFFFFFF'/</code> will result in an integer overflow
on most systems, but with <samp>-fno-range-check</samp> the value will
“wrap around” and <code>i</code> will be initialized to <em>-1</em> instead.
</p>
<a name="index-fdefault_002dinteger_002d8"></a>
</dd>
<dt><code>-fdefault-integer-8</code></dt>
<dd><p>Set the default integer and logical types to an 8 byte wide type. This option
also affects the kind of integer constants like <code>42</code>. Unlike
<samp>-finteger-4-integer-8</samp>, it does not promote variables with explicit
kind declaration.
</p>
<a name="index-fdefault_002dreal_002d8"></a>
</dd>
<dt><code>-fdefault-real-8</code></dt>
<dd><p>Set the default real type to an 8 byte wide type. This option also affects
the kind of non-double real constants like <code>1.0</code>. This option promotes
the default width of <code>DOUBLE PRECISION</code> and double real constants
like <code>1.d0</code> to 16 bytes if possible. If <code>-fdefault-double-8</code>
is given along with <code>fdefault-real-8</code>, <code>DOUBLE PRECISION</code>
and double real constants are not promoted. Unlike <samp>-freal-4-real-8</samp>,
<code>fdefault-real-8</code> does not promote variables with explicit kind
declarations.
</p>
<a name="index-fdefault_002dreal_002d10"></a>
</dd>
<dt><code>-fdefault-real-10</code></dt>
<dd><p>Set the default real type to an 10 byte wide type. This option also affects
the kind of non-double real constants like <code>1.0</code>. This option promotes
the default width of <code>DOUBLE PRECISION</code> and double real constants
like <code>1.d0</code> to 16 bytes if possible. If <code>-fdefault-double-8</code>
is given along with <code>fdefault-real-10</code>, <code>DOUBLE PRECISION</code>
and double real constants are not promoted. Unlike <samp>-freal-4-real-10</samp>,
<code>fdefault-real-10</code> does not promote variables with explicit kind
declarations.
</p>
<a name="index-fdefault_002dreal_002d16"></a>
</dd>
<dt><code>-fdefault-real-16</code></dt>
<dd><p>Set the default real type to an 16 byte wide type. This option also affects
the kind of non-double real constants like <code>1.0</code>. This option promotes
the default width of <code>DOUBLE PRECISION</code> and double real constants
like <code>1.d0</code> to 16 bytes if possible. If <code>-fdefault-double-8</code>
is given along with <code>fdefault-real-16</code>, <code>DOUBLE PRECISION</code>
and double real constants are not promoted. Unlike <samp>-freal-4-real-16</samp>,
<code>fdefault-real-16</code> does not promote variables with explicit kind
declarations.
</p>
<a name="index-fdefault_002ddouble_002d8"></a>
</dd>
<dt><code>-fdefault-double-8</code></dt>
<dd><p>Set the <code>DOUBLE PRECISION</code> type and double real constants
like <code>1.d0</code> to an 8 byte wide type. Do nothing if this
is already the default. This option prevents <samp>-fdefault-real-8</samp>,
<samp>-fdefault-real-10</samp>, and <samp>-fdefault-real-16</samp>,
from promoting <code>DOUBLE PRECISION</code> and double real constants like
<code>1.d0</code> to 16 bytes.
</p>
<a name="index-finteger_002d4_002dinteger_002d8"></a>
</dd>
<dt><code>-finteger-4-integer-8</code></dt>
<dd><p>Promote all <code>INTEGER(KIND=4)</code> entities to an <code>INTEGER(KIND=8)</code>
entities. If <code>KIND=8</code> is unavailable, then an error will be issued.
This option should be used with care and may not be suitable for your codes.
Areas of possible concern include calls to external procedures,
alignment in <code>EQUIVALENCE</code> and/or <code>COMMON</code>, generic interfaces,
BOZ literal constant conversion, and I/O. Inspection of the intermediate
representation of the translated Fortran code, produced by
<samp>-fdump-tree-original</samp>, is suggested.
</p>
<a name="index-freal_002d4_002dreal_002d8"></a>
<a name="index-freal_002d4_002dreal_002d10"></a>
<a name="index-freal_002d4_002dreal_002d16"></a>
<a name="index-freal_002d8_002dreal_002d4"></a>
<a name="index-freal_002d8_002dreal_002d10"></a>
<a name="index-freal_002d8_002dreal_002d16"></a>
<a name="index-options_002c-real-kind-type-promotion"></a>
</dd>
<dt><code>-freal-4-real-8</code></dt>
<dt><code>-freal-4-real-10</code></dt>
<dt><code>-freal-4-real-16</code></dt>
<dt><code>-freal-8-real-4</code></dt>
<dt><code>-freal-8-real-10</code></dt>
<dt><code>-freal-8-real-16</code></dt>
<dd><p>Promote all <code>REAL(KIND=M)</code> entities to <code>REAL(KIND=N)</code> entities.
If <code>REAL(KIND=N)</code> is unavailable, then an error will be issued.
The <code>-freal-4-</code> flags also affect the default real kind and the
<code>-freal-8-</code> flags also the double-precision real kind. All other
real-kind types are unaffected by this option. The promotion is also
applied to real literal constants of default and double-precision kind
and a specified kind number of 4 or 8, respectively.
However, <code>-fdefault-real-8</code>, <code>-fdefault-real-10</code>,
<code>-fdefault-real-10</code>, and <code>-fdefault-double-8</code> take precedence
for the default and double-precision real kinds, both for real literal
constants and for declarations without a kind number.
Note that for <code>REAL(KIND=KIND(1.0))</code> the literal may get promoted and
then the result may get promoted again.
These options should be used with care and may not be suitable for your
codes. Areas of possible concern include calls to external procedures,
alignment in <code>EQUIVALENCE</code> and/or <code>COMMON</code>, generic interfaces,
BOZ literal constant conversion, and I/O and calls to intrinsic procedures
when passing a value to the <code>kind=</code> dummy argument. Inspection of the
intermediate representation of the translated Fortran code, produced by
<samp>-fdump-fortran-original</samp> or <samp>-fdump-tree-original</samp>, is suggested.
</p>
<a name="index-std_003dstd-option"></a>
</dd>
<dt><code>-std=<var>std</var></code></dt>
<dd><p>Specify the standard to which the program is expected to conform,
which may be one of ‘<samp>f95</samp>’, ‘<samp>f2003</samp>’, ‘<samp>f2008</samp>’,
‘<samp>f2018</samp>’, ‘<samp>gnu</samp>’, or ‘<samp>legacy</samp>’. The default value for
<var>std</var> is ‘<samp>gnu</samp>’, which specifies a superset of the latest
Fortran standard that includes all of the extensions supported by GNU
Fortran, although warnings will be given for obsolete extensions not
recommended for use in new code. The ‘<samp>legacy</samp>’ value is
equivalent but without the warnings for obsolete extensions, and may
be useful for old non-standard programs. The ‘<samp>f95</samp>’,
‘<samp>f2003</samp>’, ‘<samp>f2008</samp>’, and ‘<samp>f2018</samp>’ values specify strict
conformance to the Fortran 95, Fortran 2003, Fortran 2008 and Fortran
2018 standards, respectively; errors are given for all extensions
beyond the relevant language standard, and warnings are given for the
Fortran 77 features that are permitted but obsolescent in later
standards. The deprecated option ‘<samp>-std=f2008ts</samp>’ acts as an alias for
‘<samp>-std=f2018</samp>’. It is only present for backwards compatibility with
earlier gfortran versions and should not be used any more.
</p>
<a name="index-ftest_002dforall_002dtemp"></a>
</dd>
<dt><code>-ftest-forall-temp</code></dt>
<dd><p>Enhance test coverage by forcing most forall assignments to use temporary.
</p>
</dd>
</dl>
<hr>
<div class="header">
<p>
Next: <a href="Preprocessing-Options.html#Preprocessing-Options" accesskey="n" rel="next">Preprocessing Options</a>, Previous: <a href="Option-Summary.html#Option-Summary" accesskey="p" rel="previous">Option Summary</a>, Up: <a href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" accesskey="u" rel="up">Invoking GNU Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|