1 |
38 |
julius |
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
|
2 |
|
|
.\"
|
3 |
|
|
.\" Standard preamble:
|
4 |
|
|
.\" ========================================================================
|
5 |
|
|
.de Sh \" Subsection heading
|
6 |
|
|
.br
|
7 |
|
|
.if t .Sp
|
8 |
|
|
.ne 5
|
9 |
|
|
.PP
|
10 |
|
|
\fB\\$1\fR
|
11 |
|
|
.PP
|
12 |
|
|
..
|
13 |
|
|
.de Sp \" Vertical space (when we can't use .PP)
|
14 |
|
|
.if t .sp .5v
|
15 |
|
|
.if n .sp
|
16 |
|
|
..
|
17 |
|
|
.de Vb \" Begin verbatim text
|
18 |
|
|
.ft CW
|
19 |
|
|
.nf
|
20 |
|
|
.ne \\$1
|
21 |
|
|
..
|
22 |
|
|
.de Ve \" End verbatim text
|
23 |
|
|
.ft R
|
24 |
|
|
.fi
|
25 |
|
|
..
|
26 |
|
|
.\" Set up some character translations and predefined strings. \*(-- will
|
27 |
|
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
28 |
|
|
.\" double quote, and \*(R" will give a right double quote. | will give a
|
29 |
|
|
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
|
30 |
|
|
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
|
31 |
|
|
.\" expand to `' in nroff, nothing in troff, for use with C<>.
|
32 |
|
|
.tr \(*W-|\(bv\*(Tr
|
33 |
|
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
34 |
|
|
.ie n \{\
|
35 |
|
|
. ds -- \(*W-
|
36 |
|
|
. ds PI pi
|
37 |
|
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
38 |
|
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
39 |
|
|
. ds L" ""
|
40 |
|
|
. ds R" ""
|
41 |
|
|
. ds C` ""
|
42 |
|
|
. ds C' ""
|
43 |
|
|
'br\}
|
44 |
|
|
.el\{\
|
45 |
|
|
. ds -- \|\(em\|
|
46 |
|
|
. ds PI \(*p
|
47 |
|
|
. ds L" ``
|
48 |
|
|
. ds R" ''
|
49 |
|
|
'br\}
|
50 |
|
|
.\"
|
51 |
|
|
.\" If the F register is turned on, we'll generate index entries on stderr for
|
52 |
|
|
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
|
53 |
|
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
54 |
|
|
.\" output yourself in some meaningful fashion.
|
55 |
|
|
.if \nF \{\
|
56 |
|
|
. de IX
|
57 |
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
58 |
|
|
..
|
59 |
|
|
. nr % 0
|
60 |
|
|
. rr F
|
61 |
|
|
.\}
|
62 |
|
|
.\"
|
63 |
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
64 |
|
|
.\" way too many mistakes in technical documents.
|
65 |
|
|
.hy 0
|
66 |
|
|
.if n .na
|
67 |
|
|
.\"
|
68 |
|
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
69 |
|
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
70 |
|
|
. \" fudge factors for nroff and troff
|
71 |
|
|
.if n \{\
|
72 |
|
|
. ds #H 0
|
73 |
|
|
. ds #V .8m
|
74 |
|
|
. ds #F .3m
|
75 |
|
|
. ds #[ \f1
|
76 |
|
|
. ds #] \fP
|
77 |
|
|
.\}
|
78 |
|
|
.if t \{\
|
79 |
|
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
80 |
|
|
. ds #V .6m
|
81 |
|
|
. ds #F 0
|
82 |
|
|
. ds #[ \&
|
83 |
|
|
. ds #] \&
|
84 |
|
|
.\}
|
85 |
|
|
. \" simple accents for nroff and troff
|
86 |
|
|
.if n \{\
|
87 |
|
|
. ds ' \&
|
88 |
|
|
. ds ` \&
|
89 |
|
|
. ds ^ \&
|
90 |
|
|
. ds , \&
|
91 |
|
|
. ds ~ ~
|
92 |
|
|
. ds /
|
93 |
|
|
.\}
|
94 |
|
|
.if t \{\
|
95 |
|
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
96 |
|
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
97 |
|
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
98 |
|
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
99 |
|
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
100 |
|
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
101 |
|
|
.\}
|
102 |
|
|
. \" troff and (daisy-wheel) nroff accents
|
103 |
|
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
104 |
|
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
105 |
|
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
106 |
|
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
107 |
|
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
108 |
|
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
109 |
|
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
110 |
|
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
111 |
|
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
112 |
|
|
. \" corrections for vroff
|
113 |
|
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
114 |
|
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
115 |
|
|
. \" for low resolution devices (crt and lpr)
|
116 |
|
|
.if \n(.H>23 .if \n(.V>19 \
|
117 |
|
|
\{\
|
118 |
|
|
. ds : e
|
119 |
|
|
. ds 8 ss
|
120 |
|
|
. ds o a
|
121 |
|
|
. ds d- d\h'-1'\(ga
|
122 |
|
|
. ds D- D\h'-1'\(hy
|
123 |
|
|
. ds th \o'bp'
|
124 |
|
|
. ds Th \o'LP'
|
125 |
|
|
. ds ae ae
|
126 |
|
|
. ds Ae AE
|
127 |
|
|
.\}
|
128 |
|
|
.rm #[ #] #H #V #F C
|
129 |
|
|
.\" ========================================================================
|
130 |
|
|
.\"
|
131 |
|
|
.IX Title "GFORTRAN 1"
|
132 |
|
|
.TH GFORTRAN 1 "2007-10-07" "gcc-4.2.2" "GNU"
|
133 |
|
|
.SH "NAME"
|
134 |
|
|
gfortran \- GNU Fortran compiler
|
135 |
|
|
.SH "SYNOPSIS"
|
136 |
|
|
.IX Header "SYNOPSIS"
|
137 |
|
|
gfortran [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR]
|
138 |
|
|
[\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR]
|
139 |
|
|
[\fB\-W\fR\fIwarn\fR...] [\fB\-pedantic\fR]
|
140 |
|
|
[\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...]
|
141 |
|
|
[\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
|
142 |
|
|
[\fB\-f\fR\fIoption\fR...]
|
143 |
|
|
[\fB\-m\fR\fImachine-option\fR...]
|
144 |
|
|
[\fB\-o\fR \fIoutfile\fR] \fIinfile\fR...
|
145 |
|
|
.PP
|
146 |
|
|
Only the most useful options are listed here; see below for the
|
147 |
|
|
remainder.
|
148 |
|
|
.SH "DESCRIPTION"
|
149 |
|
|
.IX Header "DESCRIPTION"
|
150 |
|
|
The \fBgfortran\fR command supports all the options supported by the
|
151 |
|
|
\&\fBgcc\fR command. Only options specific to \s-1GNU\s0 Fortran are documented here.
|
152 |
|
|
.PP
|
153 |
|
|
All \s-1GCC\s0 and \s-1GNU\s0 Fortran options
|
154 |
|
|
are accepted both by \fBgfortran\fR and by \fBgcc\fR
|
155 |
|
|
(as well as any other drivers built at the same time,
|
156 |
|
|
such as \fBg++\fR),
|
157 |
|
|
since adding \s-1GNU\s0 Fortran to the \s-1GCC\s0 distribution
|
158 |
|
|
enables acceptance of \s-1GNU\s0 Fortran options
|
159 |
|
|
by all of the relevant drivers.
|
160 |
|
|
.PP
|
161 |
|
|
In some cases, options have positive and negative forms;
|
162 |
|
|
the negative form of \fB\-ffoo\fR would be \fB\-fno\-foo\fR.
|
163 |
|
|
This manual documents only one of these two forms, whichever
|
164 |
|
|
one is not the default.
|
165 |
|
|
.SH "OPTIONS"
|
166 |
|
|
.IX Header "OPTIONS"
|
167 |
|
|
Here is a summary of all the options specific to \s-1GNU\s0 Fortran, grouped
|
168 |
|
|
by type. Explanations are in the following sections.
|
169 |
|
|
.IP "\fIFortran Language Options\fR" 4
|
170 |
|
|
.IX Item "Fortran Language Options"
|
171 |
|
|
\&\fB\-fall\-intrinsics \-ffree\-form \-fno\-fixed\-form
|
172 |
|
|
\&\-fdollar\-ok \-fimplicit\-none \-fmax\-identifier\-length
|
173 |
|
|
\&\-std=\fR\fIstd\fR \fB\-fd\-lines\-as\-code \-fd\-lines\-as\-comments
|
174 |
|
|
\&\-ffixed\-line\-length\-\fR\fIn\fR \fB\-ffixed\-line\-length\-none
|
175 |
|
|
\&\-ffree\-line\-length\-\fR\fIn\fR \fB\-ffree\-line\-length\-none
|
176 |
|
|
\&\-fdefault\-double\-8 \-fdefault\-integer\-8 \-fdefault\-real\-8
|
177 |
|
|
\&\-fcray\-pointer \-fopenmp \-frange\-check \-fno\-backslash\fR
|
178 |
|
|
.IP "\fIError and Warning Options\fR" 4
|
179 |
|
|
.IX Item "Error and Warning Options"
|
180 |
|
|
\&\fB\-fmax\-errors=\fR\fIn\fR
|
181 |
|
|
\&\fB\-fsyntax\-only \-pedantic \-pedantic\-errors
|
182 |
|
|
\&\-Wall \-Waliasing \-Wampersand \-Wcharacter\-truncation \-Wconversion
|
183 |
|
|
\&\-Wimplicit\-interface \-Wline\-truncation \-Wnonstd\-intrinsics \-Wsurprising
|
184 |
|
|
\&\-Wno\-tabs \-Wunderflow\fR
|
185 |
|
|
.IP "\fIDebugging Options\fR" 4
|
186 |
|
|
.IX Item "Debugging Options"
|
187 |
|
|
\&\fB\-fdump\-parse\-tree \-ffpe\-trap=\fR\fIlist\fR
|
188 |
|
|
.IP "\fIDirectory Options\fR" 4
|
189 |
|
|
.IX Item "Directory Options"
|
190 |
|
|
\&\fB\-I\fR\fIdir\fR \fB\-J\fR\fIdir\fR \fB\-M\fR\fIdir\fR
|
191 |
|
|
.IP "\fIRuntime Options\fR" 4
|
192 |
|
|
.IX Item "Runtime Options"
|
193 |
|
|
\&\fB\-fconvert=\fR\fIconversion\fR \fB\-frecord\-marker=\fR\fIlength\fR
|
194 |
|
|
\&\fB\-fmax\-subrecord\-length=\fR\fIlength\fR
|
195 |
|
|
.IP "\fICode Generation Options\fR" 4
|
196 |
|
|
.IX Item "Code Generation Options"
|
197 |
|
|
\&\fB\-fno\-automatic \-ff2c \-fno\-underscoring
|
198 |
|
|
\&\-fsecond\-underscore
|
199 |
|
|
\&\-fbounds\-check \-fmax\-stack\-var\-size=\fR\fIn\fR
|
200 |
|
|
\&\fB\-fpack\-derived \-frepack\-arrays \-fshort\-enums\fR
|
201 |
|
|
.Sh "Options controlling Fortran dialect"
|
202 |
|
|
.IX Subsection "Options controlling Fortran dialect"
|
203 |
|
|
The following options control the details of the Fortran dialect
|
204 |
|
|
accepted by the compiler:
|
205 |
|
|
.IP "\fB\-ffree\-form\fR" 4
|
206 |
|
|
.IX Item "-ffree-form"
|
207 |
|
|
.PD 0
|
208 |
|
|
.IP "\fB\-ffixed\-form\fR" 4
|
209 |
|
|
.IX Item "-ffixed-form"
|
210 |
|
|
.PD
|
211 |
|
|
Specify the layout used by the source file. The free form layout
|
212 |
|
|
was introduced in Fortran 90. Fixed form was traditionally used in
|
213 |
|
|
older Fortran programs. When neither option is specified, the source
|
214 |
|
|
form is determined by the file extension.
|
215 |
|
|
.IP "\fB\-fall\-intrinsics\fR" 4
|
216 |
|
|
.IX Item "-fall-intrinsics"
|
217 |
|
|
Accept all of the intrinsic procedures provided in libgfortran
|
218 |
|
|
without regard to the setting of \fB\-std\fR. In particular,
|
219 |
|
|
this option can be quite useful with \fB\-std=f95\fR. Additionally,
|
220 |
|
|
\&\fBgfortran\fR will ignore \fB\-Wnonstd\-intrinsics\fR.
|
221 |
|
|
.IP "\fB\-fd\-lines\-as\-code\fR" 4
|
222 |
|
|
.IX Item "-fd-lines-as-code"
|
223 |
|
|
.PD 0
|
224 |
|
|
.IP "\fB\-fd\-lines\-as\-comments\fR" 4
|
225 |
|
|
.IX Item "-fd-lines-as-comments"
|
226 |
|
|
.PD
|
227 |
|
|
Enable special treatment for lines beginning with \f(CW\*(C`d\*(C'\fR or \f(CW\*(C`D\*(C'\fR
|
228 |
|
|
in fixed form sources. If the \fB\-fd\-lines\-as\-code\fR option is
|
229 |
|
|
given they are treated as if the first column contained a blank. If the
|
230 |
|
|
\&\fB\-fd\-lines\-as\-comments\fR option is given, they are treated as
|
231 |
|
|
comment lines.
|
232 |
|
|
.IP "\fB\-fdefault\-double\-8\fR" 4
|
233 |
|
|
.IX Item "-fdefault-double-8"
|
234 |
|
|
Set the \f(CW\*(C`DOUBLE PRECISION\*(C'\fR type to an 8 byte wide type.
|
235 |
|
|
.IP "\fB\-fdefault\-integer\-8\fR" 4
|
236 |
|
|
.IX Item "-fdefault-integer-8"
|
237 |
|
|
Set the default integer and logical types to an 8 byte wide type.
|
238 |
|
|
Do nothing if this is already the default.
|
239 |
|
|
.IP "\fB\-fdefault\-real\-8\fR" 4
|
240 |
|
|
.IX Item "-fdefault-real-8"
|
241 |
|
|
Set the default real type to an 8 byte wide type.
|
242 |
|
|
Do nothing if this is already the default.
|
243 |
|
|
.IP "\fB\-fdollar\-ok\fR" 4
|
244 |
|
|
.IX Item "-fdollar-ok"
|
245 |
|
|
Allow \fB$\fR as a valid character in a symbol name.
|
246 |
|
|
.IP "\fB\-fno\-backslash\fR" 4
|
247 |
|
|
.IX Item "-fno-backslash"
|
248 |
|
|
Change the interpretation of backslashes in string literals from
|
249 |
|
|
\&\*(L"C\-style\*(R" escape characters to a single backslash character.
|
250 |
|
|
.IP "\fB\-ffixed\-line\-length\-\fR\fIn\fR" 4
|
251 |
|
|
.IX Item "-ffixed-line-length-n"
|
252 |
|
|
Set column after which characters are ignored in typical fixed-form
|
253 |
|
|
lines in the source file, and through which spaces are assumed (as
|
254 |
|
|
if padded to that length) after the ends of short fixed-form lines.
|
255 |
|
|
.Sp
|
256 |
|
|
Popular values for \fIn\fR include 72 (the
|
257 |
|
|
standard and the default), 80 (card image), and 132 (corresponding
|
258 |
|
|
to \*(L"extended\-source\*(R" options in some popular compilers).
|
259 |
|
|
\&\fIn\fR may also be \fBnone\fR, meaning that the entire line is meaningful
|
260 |
|
|
and that continued character constants never have implicit spaces appended
|
261 |
|
|
to them to fill out the line.
|
262 |
|
|
\&\fB\-ffixed\-line\-length\-0\fR means the same thing as
|
263 |
|
|
\&\fB\-ffixed\-line\-length\-none\fR.
|
264 |
|
|
.IP "\fB\-ffree\-line\-length\-\fR\fIn\fR" 4
|
265 |
|
|
.IX Item "-ffree-line-length-n"
|
266 |
|
|
Set column after which characters are ignored in typical free-form
|
267 |
|
|
lines in the source file. The default value is 132.
|
268 |
|
|
\&\fIn\fR may be \fBnone\fR, meaning that the entire line is meaningful.
|
269 |
|
|
\&\fB\-ffree\-line\-length\-0\fR means the same thing as
|
270 |
|
|
\&\fB\-ffree\-line\-length\-none\fR.
|
271 |
|
|
.IP "\fB\-fmax\-identifier\-length=\fR\fIn\fR" 4
|
272 |
|
|
.IX Item "-fmax-identifier-length=n"
|
273 |
|
|
Specify the maximum allowed identifier length. Typical values are
|
274 |
|
|
31 (Fortran 95) and 63 (Fortran 2003).
|
275 |
|
|
.IP "\fB\-fimplicit\-none\fR" 4
|
276 |
|
|
.IX Item "-fimplicit-none"
|
277 |
|
|
Specify that no implicit typing is allowed, unless overridden by explicit
|
278 |
|
|
\&\f(CW\*(C`IMPLICIT\*(C'\fR statements. This is the equivalent of adding
|
279 |
|
|
\&\f(CW\*(C`implicit none\*(C'\fR to the start of every procedure.
|
280 |
|
|
.IP "\fB\-fcray\-pointer\fR" 4
|
281 |
|
|
.IX Item "-fcray-pointer"
|
282 |
|
|
Enable the Cray pointer extension, which provides C\-like pointer
|
283 |
|
|
functionality.
|
284 |
|
|
.IP "\fB\-fopenmp\fR" 4
|
285 |
|
|
.IX Item "-fopenmp"
|
286 |
|
|
Enable the OpenMP extensions. This includes OpenMP \f(CW\*(C`!$omp\*(C'\fR directives
|
287 |
|
|
in free form
|
288 |
|
|
and \f(CW\*(C`c$omp\*(C'\fR, \f(CW*$omp\fR and \f(CW\*(C`!$omp\*(C'\fR directives in fixed form,
|
289 |
|
|
\&\f(CW\*(C`!$\*(C'\fR conditional compilation sentinels in free form
|
290 |
|
|
and \f(CW\*(C`c$\*(C'\fR, \f(CW\*(C`*$\*(C'\fR and \f(CW\*(C`!$\*(C'\fR sentinels in fixed form,
|
291 |
|
|
and when linking arranges for the OpenMP runtime library to be linked
|
292 |
|
|
in.
|
293 |
|
|
.IP "\fB\-frange\-check\fR" 4
|
294 |
|
|
.IX Item "-frange-check"
|
295 |
|
|
Enable range checking on results of simplification of constant
|
296 |
|
|
expressions during compilation. For example, by default, \s-1GNU\s0 Fortran
|
297 |
|
|
will give an overflow error at compile time when simplifying \f(CW\*(C`a =
|
298 |
|
|
EXP(1000)\*(C'\fR. With \fB\-fno\-range\-check\fR, no error will be given and
|
299 |
|
|
the variable \f(CW\*(C`a\*(C'\fR will be assigned the value \f(CW\*(C`+Infinity\*(C'\fR.
|
300 |
|
|
Similarly, \f(CW\*(C`DATA i/Z'FFFFFFFF'/\*(C'\fR will result in an integer overflow
|
301 |
|
|
on most systems, but with \fB\-fno\-range\-check\fR the value will
|
302 |
|
|
\&\*(L"wrap around\*(R" and \f(CW\*(C`i\*(C'\fR will be initialized to \-1 instead.
|
303 |
|
|
.IP "\fB\-std=\fR\fIstd\fR" 4
|
304 |
|
|
.IX Item "-std=std"
|
305 |
|
|
Specify the standard to which the program is expected to conform, which
|
306 |
|
|
may be one of \fBf95\fR, \fBf2003\fR, \fBgnu\fR, or \fBlegacy\fR.
|
307 |
|
|
The default value for \fIstd\fR is \fBgnu\fR, which specifies a
|
308 |
|
|
superset of the Fortran 95 standard that includes all of the extensions
|
309 |
|
|
supported by \s-1GNU\s0 Fortran, although warnings will be given for obsolete
|
310 |
|
|
extensions not recommended for use in new code. The \fBlegacy\fR value
|
311 |
|
|
is equivalent but without the warnings for obsolete extensions, and may
|
312 |
|
|
be useful for old non-standard programs. The \fBf95\fR and
|
313 |
|
|
\&\fBf2003\fR values specify strict conformance to the Fortran 95 and
|
314 |
|
|
Fortran 2003 standards, respectively; errors are given for all
|
315 |
|
|
extensions beyond the relevant language standard, and warnings are given
|
316 |
|
|
for the Fortran 77 features that are permitted but obsolescent in later
|
317 |
|
|
standards.
|
318 |
|
|
.Sh "Options to request or suppress errors and warnings"
|
319 |
|
|
.IX Subsection "Options to request or suppress errors and warnings"
|
320 |
|
|
Errors are diagnostic messages that report that the \s-1GNU\s0 Fortran compiler
|
321 |
|
|
cannot compile the relevant piece of source code. The compiler will
|
322 |
|
|
continue to process the program in an attempt to report further errors
|
323 |
|
|
to aid in debugging, but will not produce any compiled output.
|
324 |
|
|
.PP
|
325 |
|
|
Warnings are diagnostic messages that report constructions which
|
326 |
|
|
are not inherently erroneous but which are risky or suggest there is
|
327 |
|
|
likely to be a bug in the program. Unless \fB\-Werror\fR is specified,
|
328 |
|
|
they do not prevent compilation of the program.
|
329 |
|
|
.PP
|
330 |
|
|
You can request many specific warnings with options beginning \fB\-W\fR,
|
331 |
|
|
for example \fB\-Wimplicit\fR to request warnings on implicit
|
332 |
|
|
declarations. Each of these specific warning options also has a
|
333 |
|
|
negative form beginning \fB\-Wno\-\fR to turn off warnings;
|
334 |
|
|
for example, \fB\-Wno\-implicit\fR. This manual lists only one of the
|
335 |
|
|
two forms, whichever is not the default.
|
336 |
|
|
.PP
|
337 |
|
|
These options control the amount and kinds of errors and warnings produced
|
338 |
|
|
by \s-1GNU\s0 Fortran:
|
339 |
|
|
.IP "\fB\-fmax\-errors\-\fR\fIn\fR" 4
|
340 |
|
|
.IX Item "-fmax-errors-n"
|
341 |
|
|
Limits the maximum number of error messages to \fIn\fR, at which point
|
342 |
|
|
\&\s-1GNU\s0 Fortran bails out rather than attempting to continue processing the
|
343 |
|
|
source code. If \fIn\fR is 0, there is no limit on the number of error
|
344 |
|
|
messages produced.
|
345 |
|
|
.IP "\fB\-fsyntax\-only\fR" 4
|
346 |
|
|
.IX Item "-fsyntax-only"
|
347 |
|
|
Check the code for syntax errors, but don't do anything beyond that.
|
348 |
|
|
.IP "\fB\-pedantic\fR" 4
|
349 |
|
|
.IX Item "-pedantic"
|
350 |
|
|
Issue warnings for uses of extensions to Fortran 95.
|
351 |
|
|
\&\fB\-pedantic\fR also applies to C\-language constructs where they
|
352 |
|
|
occur in \s-1GNU\s0 Fortran source files, such as use of \fB\ee\fR in a
|
353 |
|
|
character constant within a directive like \f(CW\*(C`#include\*(C'\fR.
|
354 |
|
|
.Sp
|
355 |
|
|
Valid Fortran 95 programs should compile properly with or without
|
356 |
|
|
this option.
|
357 |
|
|
However, without this option, certain \s-1GNU\s0 extensions and traditional
|
358 |
|
|
Fortran features are supported as well.
|
359 |
|
|
With this option, many of them are rejected.
|
360 |
|
|
.Sp
|
361 |
|
|
Some users try to use \fB\-pedantic\fR to check programs for conformance.
|
362 |
|
|
They soon find that it does not do quite what they want\-\-\-it finds some
|
363 |
|
|
nonstandard practices, but not all.
|
364 |
|
|
However, improvements to \s-1GNU\s0 Fortran in this area are welcome.
|
365 |
|
|
.Sp
|
366 |
|
|
This should be used in conjunction with \fB\-std=f95\fR or
|
367 |
|
|
\&\fB\-std=f2003\fR.
|
368 |
|
|
.IP "\fB\-pedantic\-errors\fR" 4
|
369 |
|
|
.IX Item "-pedantic-errors"
|
370 |
|
|
Like \fB\-pedantic\fR, except that errors are produced rather than
|
371 |
|
|
warnings.
|
372 |
|
|
.IP "\fB\-Wall\fR" 4
|
373 |
|
|
.IX Item "-Wall"
|
374 |
|
|
Enables commonly used warning options pertaining to usage that
|
375 |
|
|
we recommend avoiding and that we believe are easy to avoid.
|
376 |
|
|
This currently includes \fB\-Waliasing\fR,
|
377 |
|
|
\&\fB\-Wampersand\fR, \fB\-Wsurprising\fR, \fB\-Wnonstd\-intrinsics\fR,
|
378 |
|
|
\&\fB\-Wno\-tabs\fR, and \fB\-Wline\-truncation\fR.
|
379 |
|
|
.IP "\fB\-Waliasing\fR" 4
|
380 |
|
|
.IX Item "-Waliasing"
|
381 |
|
|
Warn about possible aliasing of dummy arguments. Specifically, it warns
|
382 |
|
|
if the same actual argument is associated with a dummy argument with
|
383 |
|
|
\&\f(CW\*(C`INTENT(IN)\*(C'\fR and a dummy argument with \f(CW\*(C`INTENT(OUT)\*(C'\fR in a call
|
384 |
|
|
with an explicit interface.
|
385 |
|
|
.Sp
|
386 |
|
|
The following example will trigger the warning.
|
387 |
|
|
.Sp
|
388 |
|
|
.Vb 7
|
389 |
|
|
\& interface
|
390 |
|
|
\& subroutine bar(a,b)
|
391 |
|
|
\& integer, intent(in) :: a
|
392 |
|
|
\& integer, intent(out) :: b
|
393 |
|
|
\& end subroutine
|
394 |
|
|
\& end interface
|
395 |
|
|
\& integer :: a
|
396 |
|
|
.Ve
|
397 |
|
|
.Sp
|
398 |
|
|
.Vb 1
|
399 |
|
|
\& call bar(a,a)
|
400 |
|
|
.Ve
|
401 |
|
|
.IP "\fB\-Wampersand\fR" 4
|
402 |
|
|
.IX Item "-Wampersand"
|
403 |
|
|
Warn about missing ampersand in continued character constants. The warning is
|
404 |
|
|
given with \fB\-Wampersand\fR, \fB\-pedantic\fR, \fB\-std=f95\fR, and
|
405 |
|
|
\&\fB\-std=f2003\fR. Note: With no ampersand given in a continued character
|
406 |
|
|
constant, \s-1GNU\s0 Fortran assumes continuation at the first non\-comment,
|
407 |
|
|
non-whitespace character after the ampersand that initiated the continuation.
|
408 |
|
|
.IP "\fB\-Wcharacter\-truncation\fR" 4
|
409 |
|
|
.IX Item "-Wcharacter-truncation"
|
410 |
|
|
Warn when a character assignment will truncate the assigned string.
|
411 |
|
|
.IP "\fB\-Wconversion\fR" 4
|
412 |
|
|
.IX Item "-Wconversion"
|
413 |
|
|
Warn about implicit conversions between different types.
|
414 |
|
|
.IP "\fB\-Wimplicit\-interface\fR" 4
|
415 |
|
|
.IX Item "-Wimplicit-interface"
|
416 |
|
|
Warn if a procedure is called without an explicit interface.
|
417 |
|
|
Note this only checks that an explicit interface is present. It does not
|
418 |
|
|
check that the declared interfaces are consistent across program units.
|
419 |
|
|
.IP "\fB\-Wnonstd\-intrinsics\fR" 4
|
420 |
|
|
.IX Item "-Wnonstd-intrinsics"
|
421 |
|
|
Warn if the user tries to use an intrinsic that does not belong to the
|
422 |
|
|
standard the user has chosen via the \fB\-std\fR option.
|
423 |
|
|
.IP "\fB\-Wsurprising\fR" 4
|
424 |
|
|
.IX Item "-Wsurprising"
|
425 |
|
|
Produce a warning when \*(L"suspicious\*(R" code constructs are encountered.
|
426 |
|
|
While technically legal these usually indicate that an error has been made.
|
427 |
|
|
.Sp
|
428 |
|
|
This currently produces a warning under the following circumstances:
|
429 |
|
|
.RS 4
|
430 |
|
|
.IP "*" 4
|
431 |
|
|
An \s-1INTEGER\s0 \s-1SELECT\s0 construct has a \s-1CASE\s0 that can never be matched as its
|
432 |
|
|
lower value is greater than its upper value.
|
433 |
|
|
.IP "*" 4
|
434 |
|
|
A \s-1LOGICAL\s0 \s-1SELECT\s0 construct has three \s-1CASE\s0 statements.
|
435 |
|
|
.RE
|
436 |
|
|
.RS 4
|
437 |
|
|
.RE
|
438 |
|
|
.IP "\fB\-Wtabs\fR" 4
|
439 |
|
|
.IX Item "-Wtabs"
|
440 |
|
|
By default, tabs are accepted as whitespace, but tabs are not members
|
441 |
|
|
of the Fortran Character Set. \fB\-Wno\-tabs\fR will cause a warning
|
442 |
|
|
to be issued if a tab is encountered. Note, \fB\-Wno\-tabs\fR is active
|
443 |
|
|
for \fB\-pedantic\fR, \fB\-std=f95\fR, \fB\-std=f2003\fR, and
|
444 |
|
|
\&\fB\-Wall\fR.
|
445 |
|
|
.IP "\fB\-Wunderflow\fR" 4
|
446 |
|
|
.IX Item "-Wunderflow"
|
447 |
|
|
Produce a warning when numerical constant expressions are
|
448 |
|
|
encountered, which yield an \s-1UNDERFLOW\s0 during compilation.
|
449 |
|
|
.IP "\fB\-Werror\fR" 4
|
450 |
|
|
.IX Item "-Werror"
|
451 |
|
|
Turns all warnings into errors.
|
452 |
|
|
.PP
|
453 |
|
|
Some of these have no effect when compiling programs written in Fortran.
|
454 |
|
|
.Sh "Options for debugging your program or \s-1GNU\s0 Fortran"
|
455 |
|
|
.IX Subsection "Options for debugging your program or GNU Fortran"
|
456 |
|
|
\&\s-1GNU\s0 Fortran has various special options that are used for debugging
|
457 |
|
|
either your program or the \s-1GNU\s0 Fortran compiler.
|
458 |
|
|
.IP "\fB\-fdump\-parse\-tree\fR" 4
|
459 |
|
|
.IX Item "-fdump-parse-tree"
|
460 |
|
|
Output the internal parse tree before starting code generation. Only
|
461 |
|
|
really useful for debugging the \s-1GNU\s0 Fortran compiler itself.
|
462 |
|
|
.IP "\fB\-ffpe\-trap=\fR\fIlist\fR" 4
|
463 |
|
|
.IX Item "-ffpe-trap=list"
|
464 |
|
|
Specify a list of \s-1IEEE\s0 exceptions when a Floating Point Exception
|
465 |
|
|
(\s-1FPE\s0) should be raised. On most systems, this will result in a \s-1SIGFPE\s0
|
466 |
|
|
signal being sent and the program being interrupted, producing a core
|
467 |
|
|
file useful for debugging. \fIlist\fR is a (possibly empty) comma-separated
|
468 |
|
|
list of the following \s-1IEEE\s0 exceptions: \fBinvalid\fR (invalid floating
|
469 |
|
|
point operation, such as \f(CW\*(C`SQRT(\-1.0)\*(C'\fR), \fBzero\fR (division by
|
470 |
|
|
zero), \fBoverflow\fR (overflow in a floating point operation),
|
471 |
|
|
\&\fBunderflow\fR (underflow in a floating point operation),
|
472 |
|
|
\&\fBprecision\fR (loss of precision during operation) and \fBdenormal\fR
|
473 |
|
|
(operation produced a denormal value).
|
474 |
|
|
.Sh "Options for directory search"
|
475 |
|
|
.IX Subsection "Options for directory search"
|
476 |
|
|
These options affect how \s-1GNU\s0 Fortran searches
|
477 |
|
|
for files specified by the \f(CW\*(C`INCLUDE\*(C'\fR directive and where it searches
|
478 |
|
|
for previously compiled modules.
|
479 |
|
|
.PP
|
480 |
|
|
It also affects the search paths used by \fBcpp\fR when used to preprocess
|
481 |
|
|
Fortran source.
|
482 |
|
|
.IP "\fB\-I\fR\fIdir\fR" 4
|
483 |
|
|
.IX Item "-Idir"
|
484 |
|
|
These affect interpretation of the \f(CW\*(C`INCLUDE\*(C'\fR directive
|
485 |
|
|
(as well as of the \f(CW\*(C`#include\*(C'\fR directive of the \fBcpp\fR
|
486 |
|
|
preprocessor).
|
487 |
|
|
.Sp
|
488 |
|
|
Also note that the general behavior of \fB\-I\fR and
|
489 |
|
|
\&\f(CW\*(C`INCLUDE\*(C'\fR is pretty much the same as of \fB\-I\fR with
|
490 |
|
|
\&\f(CW\*(C`#include\*(C'\fR in the \fBcpp\fR preprocessor, with regard to
|
491 |
|
|
looking for \fIheader.gcc\fR files and other such things.
|
492 |
|
|
.Sp
|
493 |
|
|
This path is also used to search for \fI.mod\fR files when previously
|
494 |
|
|
compiled modules are required by a \f(CW\*(C`USE\*(C'\fR statement.
|
495 |
|
|
.IP "\fB\-M\fR\fIdir\fR" 4
|
496 |
|
|
.IX Item "-Mdir"
|
497 |
|
|
.PD 0
|
498 |
|
|
.IP "\fB\-J\fR\fIdir\fR" 4
|
499 |
|
|
.IX Item "-Jdir"
|
500 |
|
|
.PD
|
501 |
|
|
This option specifies where to put \fI.mod\fR files for compiled modules.
|
502 |
|
|
It is also added to the list of directories to searched by an \f(CW\*(C`USE\*(C'\fR
|
503 |
|
|
statement.
|
504 |
|
|
.Sp
|
505 |
|
|
The default is the current directory.
|
506 |
|
|
.Sp
|
507 |
|
|
\&\fB\-J\fR is an alias for \fB\-M\fR to avoid conflicts with existing
|
508 |
|
|
\&\s-1GCC\s0 options.
|
509 |
|
|
.Sh "Influencing runtime behavior"
|
510 |
|
|
.IX Subsection "Influencing runtime behavior"
|
511 |
|
|
These options affect the runtime behavior of programs compiled with \s-1GNU\s0 Fortran.
|
512 |
|
|
.IP "\fB\-fconvert=\fR\fIconversion\fR" 4
|
513 |
|
|
.IX Item "-fconvert=conversion"
|
514 |
|
|
Specify the representation of data for unformatted files. Valid
|
515 |
|
|
values for conversion are: \fBnative\fR, the default; \fBswap\fR,
|
516 |
|
|
swap between big\- and little\-endian; \fBbig-endian\fR, use big-endian
|
517 |
|
|
representation for unformatted files; \fBlittle-endian\fR, use little-endian
|
518 |
|
|
representation for unformatted files.
|
519 |
|
|
.Sp
|
520 |
|
|
\&\fIThis option has an effect only when used in the main program.
|
521 |
|
|
The \f(CI\*(C`CONVERT\*(C'\fI specifier and the \s-1GFORTRAN_CONVERT_UNIT\s0 environment
|
522 |
|
|
variable override the default specified by \f(BI\-fconvert\fI.\fR
|
523 |
|
|
.IP "\fB\-frecord\-marker=\fR\fIlength\fR" 4
|
524 |
|
|
.IX Item "-frecord-marker=length"
|
525 |
|
|
Specify the length of record markers for unformatted files.
|
526 |
|
|
Valid values for \fIlength\fR are 4 and 8. Default is 4.
|
527 |
|
|
\&\fIThis is different from previous versions of\fR \fBgfortran\fR,
|
528 |
|
|
which specified a default record marker length of 8 on most
|
529 |
|
|
systems. If you want to read or write files compatible
|
530 |
|
|
with earlier versions of \fBgfortran\fR, use \fB\-frecord\-marker=8\fR.
|
531 |
|
|
.IP "\fB\-fmax\-subrecord\-length=\fR\fIlength\fR" 4
|
532 |
|
|
.IX Item "-fmax-subrecord-length=length"
|
533 |
|
|
Specify the maximum length for a subrecord. The maximum permitted
|
534 |
|
|
value for length is 2147483639, which is also the default. Only
|
535 |
|
|
really useful for use by the gfortran testsuite.
|
536 |
|
|
.Sh "Options for code generation conventions"
|
537 |
|
|
.IX Subsection "Options for code generation conventions"
|
538 |
|
|
These machine-independent options control the interface conventions
|
539 |
|
|
used in code generation.
|
540 |
|
|
.PP
|
541 |
|
|
Most of them have both positive and negative forms; the negative form
|
542 |
|
|
of \fB\-ffoo\fR would be \fB\-fno\-foo\fR. In the table below, only
|
543 |
|
|
one of the forms is listed\-\-\-the one which is not the default. You
|
544 |
|
|
can figure out the other form by either removing \fBno\-\fR or adding
|
545 |
|
|
it.
|
546 |
|
|
.IP "\fB\-fno\-automatic\fR" 4
|
547 |
|
|
.IX Item "-fno-automatic"
|
548 |
|
|
Treat each program unit as if the \f(CW\*(C`SAVE\*(C'\fR statement was specified for
|
549 |
|
|
every local variable and array referenced in it. Does not affect common
|
550 |
|
|
blocks. (Some Fortran compilers provide this option under the name
|
551 |
|
|
\&\fB\-static\fR.)
|
552 |
|
|
.IP "\fB\-ff2c\fR" 4
|
553 |
|
|
.IX Item "-ff2c"
|
554 |
|
|
Generate code designed to be compatible with code generated
|
555 |
|
|
by \fBg77\fR and \fBf2c\fR.
|
556 |
|
|
.Sp
|
557 |
|
|
The calling conventions used by \fBg77\fR (originally implemented
|
558 |
|
|
in \fBf2c\fR) require functions that return type
|
559 |
|
|
default \f(CW\*(C`REAL\*(C'\fR to actually return the C type \f(CW\*(C`double\*(C'\fR, and
|
560 |
|
|
functions that return type \f(CW\*(C`COMPLEX\*(C'\fR to return the values via an
|
561 |
|
|
extra argument in the calling sequence that points to where to
|
562 |
|
|
store the return value. Under the default \s-1GNU\s0 calling conventions, such
|
563 |
|
|
functions simply return their results as they would in \s-1GNU\s0
|
564 |
|
|
C\-\-\-default \f(CW\*(C`REAL\*(C'\fR functions return the C type \f(CW\*(C`float\*(C'\fR, and
|
565 |
|
|
\&\f(CW\*(C`COMPLEX\*(C'\fR functions return the \s-1GNU\s0 C type \f(CW\*(C`complex\*(C'\fR.
|
566 |
|
|
Additionally, this option implies the \fB\-fsecond\-underscore\fR
|
567 |
|
|
option, unless \fB\-fno\-second\-underscore\fR is explicitly requested.
|
568 |
|
|
.Sp
|
569 |
|
|
This does not affect the generation of code that interfaces with
|
570 |
|
|
the \fBlibgfortran\fR library.
|
571 |
|
|
.Sp
|
572 |
|
|
\&\fICaution:\fR It is not a good idea to mix Fortran code compiled with
|
573 |
|
|
\&\fB\-ff2c\fR with code compiled with the default \fB\-fno\-f2c\fR
|
574 |
|
|
calling conventions as, calling \f(CW\*(C`COMPLEX\*(C'\fR or default \f(CW\*(C`REAL\*(C'\fR
|
575 |
|
|
functions between program parts which were compiled with different
|
576 |
|
|
calling conventions will break at execution time.
|
577 |
|
|
.Sp
|
578 |
|
|
\&\fICaution:\fR This will break code which passes intrinsic functions
|
579 |
|
|
of type default \f(CW\*(C`REAL\*(C'\fR or \f(CW\*(C`COMPLEX\*(C'\fR as actual arguments, as
|
580 |
|
|
the library implementations use the \fB\-fno\-f2c\fR calling conventions.
|
581 |
|
|
.IP "\fB\-fno\-underscoring\fR" 4
|
582 |
|
|
.IX Item "-fno-underscoring"
|
583 |
|
|
Do not transform names of entities specified in the Fortran
|
584 |
|
|
source file by appending underscores to them.
|
585 |
|
|
.Sp
|
586 |
|
|
With \fB\-funderscoring\fR in effect, \s-1GNU\s0 Fortran appends one
|
587 |
|
|
underscore to external names with no underscores. This is done to ensure
|
588 |
|
|
compatibility with code produced by many \s-1UNIX\s0 Fortran compilers.
|
589 |
|
|
.Sp
|
590 |
|
|
\&\fICaution\fR: The default behavior of \s-1GNU\s0 Fortran is
|
591 |
|
|
incompatible with \fBf2c\fR and \fBg77\fR, please use the
|
592 |
|
|
\&\fB\-ff2c\fR option if you want object files compiled with
|
593 |
|
|
\&\s-1GNU\s0 Fortran to be compatible with object code created with these
|
594 |
|
|
tools.
|
595 |
|
|
.Sp
|
596 |
|
|
Use of \fB\-fno\-underscoring\fR is not recommended unless you are
|
597 |
|
|
experimenting with issues such as integration of \s-1GNU\s0 Fortran into
|
598 |
|
|
existing system environments (vis\-a\-vis existing libraries, tools, and
|
599 |
|
|
so on).
|
600 |
|
|
.Sp
|
601 |
|
|
For example, with \fB\-funderscoring\fR, and assuming other defaults like
|
602 |
|
|
\&\fB\-fcase\-lower\fR and that \f(CW\*(C`j()\*(C'\fR and \f(CW\*(C`max_count()\*(C'\fR are
|
603 |
|
|
external functions while \f(CW\*(C`my_var\*(C'\fR and \f(CW\*(C`lvar\*(C'\fR are local variables,
|
604 |
|
|
a statement like
|
605 |
|
|
.Sp
|
606 |
|
|
.Vb 1
|
607 |
|
|
\& I = J() + MAX_COUNT (MY_VAR, LVAR)
|
608 |
|
|
.Ve
|
609 |
|
|
.Sp
|
610 |
|
|
is implemented as something akin to:
|
611 |
|
|
.Sp
|
612 |
|
|
.Vb 1
|
613 |
|
|
\& i = j_() + max_count__(&my_var__, &lvar);
|
614 |
|
|
.Ve
|
615 |
|
|
.Sp
|
616 |
|
|
With \fB\-fno\-underscoring\fR, the same statement is implemented as:
|
617 |
|
|
.Sp
|
618 |
|
|
.Vb 1
|
619 |
|
|
\& i = j() + max_count(&my_var, &lvar);
|
620 |
|
|
.Ve
|
621 |
|
|
.Sp
|
622 |
|
|
Use of \fB\-fno\-underscoring\fR allows direct specification of
|
623 |
|
|
user-defined names while debugging and when interfacing \s-1GNU\s0 Fortran
|
624 |
|
|
code with other languages.
|
625 |
|
|
.Sp
|
626 |
|
|
Note that just because the names match does \fInot\fR mean that the
|
627 |
|
|
interface implemented by \s-1GNU\s0 Fortran for an external name matches the
|
628 |
|
|
interface implemented by some other language for that same name.
|
629 |
|
|
That is, getting code produced by \s-1GNU\s0 Fortran to link to code produced
|
630 |
|
|
by some other compiler using this or any other method can be only a
|
631 |
|
|
small part of the overall solution\-\-\-getting the code generated by
|
632 |
|
|
both compilers to agree on issues other than naming can require
|
633 |
|
|
significant effort, and, unlike naming disagreements, linkers normally
|
634 |
|
|
cannot detect disagreements in these other areas.
|
635 |
|
|
.Sp
|
636 |
|
|
Also, note that with \fB\-fno\-underscoring\fR, the lack of appended
|
637 |
|
|
underscores introduces the very real possibility that a user-defined
|
638 |
|
|
external name will conflict with a name in a system library, which
|
639 |
|
|
could make finding unresolved-reference bugs quite difficult in some
|
640 |
|
|
cases\-\-\-they might occur at program run time, and show up only as
|
641 |
|
|
buggy behavior at run time.
|
642 |
|
|
.Sp
|
643 |
|
|
In future versions of \s-1GNU\s0 Fortran we hope to improve naming and linking
|
644 |
|
|
issues so that debugging always involves using the names as they appear
|
645 |
|
|
in the source, even if the names as seen by the linker are mangled to
|
646 |
|
|
prevent accidental linking between procedures with incompatible
|
647 |
|
|
interfaces.
|
648 |
|
|
.IP "\fB\-fsecond\-underscore\fR" 4
|
649 |
|
|
.IX Item "-fsecond-underscore"
|
650 |
|
|
By default, \s-1GNU\s0 Fortran appends an underscore to external
|
651 |
|
|
names. If this option is used \s-1GNU\s0 Fortran appends two
|
652 |
|
|
underscores to names with underscores and one underscore to external names
|
653 |
|
|
with no underscores. \s-1GNU\s0 Fortran also appends two underscores to
|
654 |
|
|
internal names with underscores to avoid naming collisions with external
|
655 |
|
|
names.
|
656 |
|
|
.Sp
|
657 |
|
|
This option has no effect if \fB\-fno\-underscoring\fR is
|
658 |
|
|
in effect. It is implied by the \fB\-ff2c\fR option.
|
659 |
|
|
.Sp
|
660 |
|
|
Otherwise, with this option, an external name such as \f(CW\*(C`MAX_COUNT\*(C'\fR
|
661 |
|
|
is implemented as a reference to the link-time external symbol
|
662 |
|
|
\&\f(CW\*(C`max_count_\|_\*(C'\fR, instead of \f(CW\*(C`max_count_\*(C'\fR. This is required
|
663 |
|
|
for compatibility with \fBg77\fR and \fBf2c\fR, and is implied
|
664 |
|
|
by use of the \fB\-ff2c\fR option.
|
665 |
|
|
.IP "\fB\-fbounds\-check\fR" 4
|
666 |
|
|
.IX Item "-fbounds-check"
|
667 |
|
|
Enable generation of run-time checks for array subscripts
|
668 |
|
|
and against the declared minimum and maximum values. It also
|
669 |
|
|
checks array indices for assumed and deferred
|
670 |
|
|
shape arrays against the actual allocated bounds.
|
671 |
|
|
.Sp
|
672 |
|
|
In the future this may also include other forms of checking, e.g., checking
|
673 |
|
|
substring references.
|
674 |
|
|
.IP "\fB\-fmax\-stack\-var\-size=\fR\fIn\fR" 4
|
675 |
|
|
.IX Item "-fmax-stack-var-size=n"
|
676 |
|
|
This option specifies the size in bytes of the largest array that will be put
|
677 |
|
|
on the stack.
|
678 |
|
|
.Sp
|
679 |
|
|
This option currently only affects local arrays declared with constant
|
680 |
|
|
bounds, and may not apply to all character variables.
|
681 |
|
|
Future versions of \s-1GNU\s0 Fortran may improve this behavior.
|
682 |
|
|
.Sp
|
683 |
|
|
The default value for \fIn\fR is 32768.
|
684 |
|
|
.IP "\fB\-fpack\-derived\fR" 4
|
685 |
|
|
.IX Item "-fpack-derived"
|
686 |
|
|
This option tells \s-1GNU\s0 Fortran to pack derived type members as closely as
|
687 |
|
|
possible. Code compiled with this option is likely to be incompatible
|
688 |
|
|
with code compiled without this option, and may execute slower.
|
689 |
|
|
.IP "\fB\-frepack\-arrays\fR" 4
|
690 |
|
|
.IX Item "-frepack-arrays"
|
691 |
|
|
In some circumstances \s-1GNU\s0 Fortran may pass assumed shape array
|
692 |
|
|
sections via a descriptor describing a noncontiguous area of memory.
|
693 |
|
|
This option adds code to the function prologue to repack the data into
|
694 |
|
|
a contiguous block at runtime.
|
695 |
|
|
.Sp
|
696 |
|
|
This should result in faster accesses to the array. However it can introduce
|
697 |
|
|
significant overhead to the function call, especially when the passed data
|
698 |
|
|
is noncontiguous.
|
699 |
|
|
.IP "\fB\-fshort\-enums\fR" 4
|
700 |
|
|
.IX Item "-fshort-enums"
|
701 |
|
|
This option is provided for interoperability with C code that was
|
702 |
|
|
compiled with the \fB\-fshort\-enums\fR option. It will make
|
703 |
|
|
\&\s-1GNU\s0 Fortran choose the smallest \f(CW\*(C`INTEGER\*(C'\fR kind a given
|
704 |
|
|
enumerator set will fit in, and give all its enumerators this kind.
|
705 |
|
|
.SH "ENVIRONMENT"
|
706 |
|
|
.IX Header "ENVIRONMENT"
|
707 |
|
|
The \fBgfortran\fR compiler currently does not make use of any environment
|
708 |
|
|
variables to control its operation above and beyond those
|
709 |
|
|
that affect the operation of \fBgcc\fR.
|
710 |
|
|
.SH "BUGS"
|
711 |
|
|
.IX Header "BUGS"
|
712 |
|
|
For instructions on reporting bugs, see
|
713 |
|
|
<\fBhttp://gcc.gnu.org/bugs.html\fR>.
|
714 |
|
|
.SH "SEE ALSO"
|
715 |
|
|
.IX Header "SEE ALSO"
|
716 |
|
|
\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7),
|
717 |
|
|
\&\fIcpp\fR\|(1), \fIgcov\fR\|(1), \fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), \fIgdb\fR\|(1), \fIadb\fR\|(1), \fIdbx\fR\|(1), \fIsdb\fR\|(1)
|
718 |
|
|
and the Info entries for \fIgcc\fR, \fIcpp\fR, \fIgfortran\fR, \fIas\fR,
|
719 |
|
|
\&\fIld\fR, \fIbinutils\fR and \fIgdb\fR.
|
720 |
|
|
.SH "AUTHOR"
|
721 |
|
|
.IX Header "AUTHOR"
|
722 |
|
|
See the Info entry for \fBgfortran\fR for contributors to \s-1GCC\s0 and
|
723 |
|
|
\&\s-1GNU\s0 Fortran.
|
724 |
|
|
.SH "COPYRIGHT"
|
725 |
|
|
.IX Header "COPYRIGHT"
|
726 |
|
|
Copyright (c) 2004, 2005, 2006, 2007
|
727 |
|
|
Free Software Foundation, Inc.
|
728 |
|
|
.PP
|
729 |
|
|
Permission is granted to copy, distribute and/or modify this document
|
730 |
|
|
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or
|
731 |
|
|
any later version published by the Free Software Foundation; with the
|
732 |
|
|
Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R" and \*(L"Funding
|
733 |
|
|
Free Software\*(R", the Front-Cover texts being (a) (see below), and with
|
734 |
|
|
the Back-Cover Texts being (b) (see below). A copy of the license is
|
735 |
|
|
included in the \fIgfdl\fR\|(7) man page.
|
736 |
|
|
.PP
|
737 |
|
|
(a) The \s-1FSF\s0's Front-Cover Text is:
|
738 |
|
|
.PP
|
739 |
|
|
.Vb 1
|
740 |
|
|
\& A GNU Manual
|
741 |
|
|
.Ve
|
742 |
|
|
.PP
|
743 |
|
|
(b) The \s-1FSF\s0's Back-Cover Text is:
|
744 |
|
|
.PP
|
745 |
|
|
.Vb 3
|
746 |
|
|
\& You have freedom to copy and modify this GNU Manual, like GNU
|
747 |
|
|
\& software. Copies published by the Free Software Foundation raise
|
748 |
|
|
\& funds for GNU development.
|
749 |
|
|
.Ve
|