Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / gnu / usr.bin / cc34 / g77 / g77.1
1 .\" $DragonFly: src/gnu/usr.bin/cc34/g77/Attic/g77.1,v 1.1 2004/06/14 22:27:56 joerg Exp $
2 .\" Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004
3 .\" Free Software Foundation, Inc.
4 .\" See section COPYRIGHT for conditions for redistribution
5 .rn '' }`
6 ''' $RCSfile$$Revision$$Date$
7 '''
8 ''' $Log$
9 '''
10 .de Sh
11 .br
12 .if t .Sp
13 .ne 5
14 .PP
15 \fB\\$1\fR
16 .PP
17 ..
18 .de Sp
19 .if t .sp .5v
20 .if n .sp
21 ..
22 .de Ip
23 .br
24 .ie \\n(.$>=3 .ne \\$3
25 .el .ne 3
26 .IP "\\$1" \\$2
27 ..
28 .de Vb
29 .ft CW
30 .nf
31 .ne \\$1
32 ..
33 .de Ve
34 .ft R
35
36 .fi
37 ..
38 '''
39 '''
40 '''     Set up \*(-- to give an unbreakable dash;
41 '''     string Tr holds user defined translation string.
42 '''     Bell System Logo is used as a dummy character.
43 '''
44 .tr \(*W-|\(bv\*(Tr
45 .ie n \{\
46 .ds -- \(*W-
47 .ds PI pi
48 .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
49 .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
50 .ds L" ""
51 .ds R" ""
52 '''   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
53 '''   \*(L" and \*(R", except that they are used on ".xx" lines,
54 '''   such as .IP and .SH, which do another additional levels of
55 '''   double-quote interpretation
56 .ds M" """
57 .ds S" """
58 .ds N" """""
59 .ds T" """""
60 .ds L' '
61 .ds R' '
62 .ds M' '
63 .ds S' '
64 .ds N' '
65 .ds T' '
66 'br\}
67 .el\{\
68 .ds -- \(em\|
69 .tr \*(Tr
70 .ds L" ``
71 .ds R" ''
72 .ds M" ``
73 .ds S" ''
74 .ds N" ``
75 .ds T" ''
76 .ds L' `
77 .ds R' '
78 .ds M' `
79 .ds S' '
80 .ds N' `
81 .ds T' '
82 .ds PI \(*p
83 'br\}
84 .\"     If the F register is turned on, we'll generate
85 .\"     index entries out stderr for the following things:
86 .\"             TH      Title 
87 .\"             SH      Header
88 .\"             Sh      Subsection 
89 .\"             Ip      Item
90 .\"             X<>     Xref  (embedded
91 .\"     Of course, you have to process the output yourself
92 .\"     in some meaninful fashion.
93 .if \nF \{
94 .de IX
95 .tm Index:\\$1\t\\n%\t"\\$2"
96 ..
97 .nr % 0
98 .rr F
99 .\}
100 .TH G77 1 "gcc-3.4.1" "10/Jun/2004" "GNU"
101 .UC
102 .if n .hy 0
103 .if n .na
104 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
105 .de CQ          \" put $1 in typewriter font
106 .ft CW
107 'if n "\c
108 'if t \\&\\$1\c
109 'if n \\&\\$1\c
110 'if n \&"
111 \\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
112 '.ft R
113 ..
114 .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
115 .       \" AM - accent mark definitions
116 .bd B 3
117 .       \" fudge factors for nroff and troff
118 .if n \{\
119 .       ds #H 0
120 .       ds #V .8m
121 .       ds #F .3m
122 .       ds #[ \f1
123 .       ds #] \fP
124 .\}
125 .if t \{\
126 .       ds #H ((1u-(\\\\n(.fu%2u))*.13m)
127 .       ds #V .6m
128 .       ds #F 0
129 .       ds #[ \&
130 .       ds #] \&
131 .\}
132 .       \" simple accents for nroff and troff
133 .if n \{\
134 .       ds ' \&
135 .       ds ` \&
136 .       ds ^ \&
137 .       ds , \&
138 .       ds ~ ~
139 .       ds ? ?
140 .       ds ! !
141 .       ds /
142 .       ds q
143 .\}
144 .if t \{\
145 .       ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
146 .       ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
147 .       ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
148 .       ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
149 .       ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
150 .       ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
151 .       ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
152 .       ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
153 .       ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
154 .\}
155 .       \" troff and (daisy-wheel) nroff accents
156 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
157 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
158 .ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
159 .ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
160 .ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
161 .ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
162 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
163 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
164 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
165 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
166 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
167 .ds ae a\h'-(\w'a'u*4/10)'e
168 .ds Ae A\h'-(\w'A'u*4/10)'E
169 .ds oe o\h'-(\w'o'u*4/10)'e
170 .ds Oe O\h'-(\w'O'u*4/10)'E
171 .       \" corrections for vroff
172 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
173 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
174 .       \" for low resolution devices (crt and lpr)
175 .if \n(.H>23 .if \n(.V>19 \
176 \{\
177 .       ds : e
178 .       ds 8 ss
179 .       ds v \h'-1'\o'\(aa\(ga'
180 .       ds _ \h'-1'^
181 .       ds . \h'-1'.
182 .       ds 3 3
183 .       ds o a
184 .       ds d- d\h'-1'\(ga
185 .       ds D- D\h'-1'\(hy
186 .       ds th \o'bp'
187 .       ds Th \o'LP'
188 .       ds ae ae
189 .       ds Ae AE
190 .       ds oe oe
191 .       ds Oe OE
192 .\}
193 .rm #[ #] #H #V #F C
194 .SH "NAME"
195 g77 \- GNU project Fortran 77 compiler
196 .SH "SYNOPSIS"
197 g77 [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR]
198     [\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR]
199     [\fB\-W\fR\fIwarn\fR...] [\fB\-pedantic\fR]
200     [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...]
201     [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
202     [\fB\-f\fR\fIoption\fR...] [\fB\-m\fR\fImachine-option\fR...]
203     [\fB\-o\fR \fIoutfile\fR] \fIinfile\fR...
204 .PP
205 Only the most useful options are listed here; see below for the
206 remainder.
207 .SH "DESCRIPTION"
208 The \fBg77\fR command supports all the options supported by the
209 \fBgcc\fR command.
210 .PP
211 All \fBgcc\fR and \fBg77\fR options
212 are accepted both by \fBg77\fR and by \fBgcc\fR
213 (as well as any other drivers built at the same time,
214 such as \fBg++\fR),
215 since adding \fBg77\fR to the \fBgcc\fR distribution
216 enables acceptance of \fBg77\fR options
217 by all of the relevant drivers.
218 .PP
219 In some cases, options have positive and negative forms;
220 the negative form of \fB\-ffoo\fR would be \fB\-fno-foo\fR.
221 This manual documents only one of these two forms, whichever
222 one is not the default.
223 .SH "OPTIONS"
224 Here is a summary of all the options specific to GNU Fortran, grouped
225 by type.  Explanations are in the following sections.
226 .Ip "\fIOverall Options\fR" 4
227 \fB\-fversion  \-fset-g77-defaults  \-fno-silent\fR
228 .Ip "\fIShorthand Options\fR" 4
229 \fB\-ff66  \-fno-f66  \-ff77  \-fno-f77  \-fno-ugly\fR
230 .Ip "\fIFortran Language Options\fR" 4
231 \fB\-ffree-form  \-fno-fixed-form  \-ff90 
232 \-fvxt  \-fdollar-ok  \-fno-backslash 
233 \-fno-ugly-args  \-fno-ugly-assign  \-fno-ugly-assumed 
234 \-fugly-comma  \-fugly-complex  \-fugly-init  \-fugly-logint 
235 \-fonetrip  \-ftypeless-boz 
236 \-fintrin-case-initcap  \-fintrin-case-upper 
237 \-fintrin-case-lower  \-fintrin-case-any 
238 \-fmatch-case-initcap  \-fmatch-case-upper 
239 \-fmatch-case-lower  \-fmatch-case-any 
240 \-fsource-case-upper  \-fsource-case-lower 
241 \-fsource-case-preserve 
242 \-fsymbol-case-initcap  \-fsymbol-case-upper 
243 \-fsymbol-case-lower  \-fsymbol-case-any 
244 \-fcase-strict-upper  \-fcase-strict-lower 
245 \-fcase-initcap  \-fcase-upper  \-fcase-lower  \-fcase-preserve 
246 \-ff2c-intrinsics-delete  \-ff2c-intrinsics-hide 
247 \-ff2c-intrinsics-disable  \-ff2c-intrinsics-enable 
248 \-fbadu77-intrinsics-delete  \-fbadu77-intrinsics-hide 
249 \-fbadu77-intrinsics-disable  \-fbadu77-intrinsics-enable 
250 \-ff90-intrinsics-delete  \-ff90-intrinsics-hide 
251 \-ff90-intrinsics-disable  \-ff90-intrinsics-enable 
252 \-fgnu-intrinsics-delete  \-fgnu-intrinsics-hide 
253 \-fgnu-intrinsics-disable  \-fgnu-intrinsics-enable 
254 \-fmil-intrinsics-delete  \-fmil-intrinsics-hide 
255 \-fmil-intrinsics-disable  \-fmil-intrinsics-enable 
256 \-funix-intrinsics-delete  \-funix-intrinsics-hide 
257 \-funix-intrinsics-disable  \-funix-intrinsics-enable 
258 \-fvxt-intrinsics-delete  \-fvxt-intrinsics-hide 
259 \-fvxt-intrinsics-disable  \-fvxt-intrinsics-enable 
260 \-ffixed-line-length-\fR\fIn\fR  \fB\-ffixed-line-length-none\fR
261 .Ip "\fIWarning Options\fR" 4
262 \fB\-fsyntax-only  \-pedantic  \-pedantic-errors  \-fpedantic 
263 \-w  \-Wno-globals  \-Wimplicit  \-Wunused  \-Wuninitialized 
264 \-Wall  \-Wsurprising 
265 \-Werror  \-W\fR
266 .Ip "\fIDebugging Options\fR" 4
267 \fB\-g\fR
268 .Ip "\fIOptimization Options\fR" 4
269 \fB\-malign-double 
270 \-ffloat-store  \-fforce-mem  \-fforce-addr  \-fno-inline 
271 \-ffast-math  \-fstrength-reduce  \-frerun-cse-after-loop 
272 \-funsafe-math-optimizations \-ffinite-math-only \-fno-trapping-math 
273 \-fexpensive-optimizations  \-fdelayed-branch 
274 \-fschedule-insns  \-fschedule-insn2  \-fcaller-saves 
275 \-funroll-loops  \-funroll-all-loops 
276 \-fno-move-all-movables  \-fno-reduce-all-givs 
277 \-fno-rerun-loop-opt\fR
278 .Ip "\fIDirectory Options\fR" 4
279 \fB\-I\fR\fIdir\fR  \fB\-I-\fR
280 .Ip "\fICode Generation Options\fR" 4
281 \fB\-fno-automatic  \-finit-local-zero  \-fno-f2c 
282 \-ff2c-library  \-fno-underscoring  \-fno-ident 
283 \-fpcc-struct-return  \-freg-struct-return 
284 \-fshort-double  \-fno-common  \-fpack-struct 
285 \-fzeros  \-fno-second-underscore 
286 \-femulate-complex 
287 \-falias-check  \-fargument-alias 
288 \-fargument-noalias  \-fno-argument-noalias-global 
289 \-fno-globals  \-fflatten-arrays 
290 \-fbounds-check  \-ffortran-bounds-check\fR
291 .PP
292 Compilation can involve as many as four stages: preprocessing, code
293 generation (often what is really meant by the term ``compilation''),
294 assembly, and linking, always in that order.  The first three
295 stages apply to an individual source file, and end by producing an
296 object file; linking combines all the object files (those newly
297 compiled, and those specified as input) into an executable file.
298 .PP
299 For any given input file, the file name suffix determines what kind of
300 program is contained in the file---that is, the language in which the
301 program is written is generally indicated by the suffix.
302 Suffixes specific to \s-1GNU\s0 Fortran are listed below.
303 .Ip "\fIfile\fR\fB.f\fR" 4
304 .Ip "\fIfile\fR\fB.for\fR" 4
305 .Ip "\fIfile\fR\fB.\s-1FOR\s0\fR" 4
306 Fortran source code that should not be preprocessed.
307 .Sp
308 Such source code cannot contain any preprocessor directives, such
309 as \f(CW#include\fR, \f(CW#define\fR, \f(CW#if\fR, and so on.
310 .Sp
311 You can force \fB.f\fR files to be preprocessed by \fBcpp\fR by using
312 \fB\-x f77-cpp-input\fR.
313 .Ip "\fIfile\fR\fB.F\fR" 4
314 .Ip "\fIfile\fR\fB.fpp\fR" 4
315 .Ip "\fIfile\fR\fB.\s-1FPP\s0\fR" 4
316 Fortran source code that must be preprocessed (by the C preprocessor
317 \fBcpp\fR, which is part of \s-1GCC\s0).
318 .Sp
319 Note that preprocessing is not extended to the contents of
320 files included by the \f(CWINCLUDE\fR directive---the \f(CW#include\fR
321 preprocessor directive must be used instead.
322 .Ip "\fIfile\fR\fB.r\fR" 4
323 Ratfor source code, which must be preprocessed by the \fBratfor\fR
324 command, which is available separately (as it is not yet part of the \s-1GNU\s0
325 Fortran distribution).
326 A public domain version in C is at
327 <\fBhttp://sepwww.stanford.edu/sep/prof/ratfor.shar.2\fR>.
328 .PP
329 \s-1UNIX\s0 users typically use the \fI\fIfile\fR.f\fR and \fI\fIfile\fR.F\fR
330 nomenclature.
331 Users of other operating systems, especially those that cannot
332 distinguish upper-case
333 letters from lower-case letters in their file names, typically use
334 the \fI\fIfile\fR.for\fR and \fI\fIfile\fR.fpp\fR nomenclature.
335 .PP
336 Use of the preprocessor \fBcpp\fR allows use of C\-like
337 constructs such as \f(CW#define\fR and \f(CW#include\fR, but can
338 lead to unexpected, even mistaken, results due to Fortran's source file
339 format.
340 It is recommended that use of the C preprocessor
341 be limited to \f(CW#include\fR and, in
342 conjunction with \f(CW#define\fR, only \f(CW#if\fR and related directives,
343 thus avoiding in-line macro expansion entirely.
344 This recommendation applies especially
345 when using the traditional fixed source form.
346 With free source form,
347 fewer unexpected transformations are likely to happen, but use of
348 constructs such as Hollerith and character constants can nevertheless
349 present problems, especially when these are continued across multiple
350 source lines.
351 These problems result, primarily, from differences between the way
352 such constants are interpreted by the C preprocessor and by a Fortran
353 compiler.
354 .PP
355 Another example of a problem that results from using the C preprocessor
356 is that a Fortran comment line that happens to contain any
357 characters ``interesting'\*(R' to the C preprocessor,
358 such as a backslash at the end of the line,
359 is not recognized by the preprocessor as a comment line,
360 so instead of being passed through ``raw'\*(R',
361 the line is edited according to the rules for the preprocessor.
362 For example, the backslash at the end of the line is removed,
363 along with the subsequent newline, resulting in the next
364 line being effectively commented out---unfortunate if that
365 line is a non-comment line of important code!
366 .PP
367 \fINote:\fR The \fB\-traditional\fR and \fB\-undef\fR flags are supplied
368 to \fBcpp\fR by default, to help avoid unpleasant surprises.
369 .PP
370 This means that \s-1ANSI\s0 C preprocessor features (such as the \fB#\fR
371 operator) aren't available, and only variables in the C reserved
372 namespace (generally, names with a leading underscore) are liable to
373 substitution by C predefines.
374 Thus, if you want to do system-specific
375 tests, use, for example, \fB#ifdef _\|_linux_\|_\fR rather than \fB#ifdef linux\fR.
376 Use the \fB\-v\fR option to see exactly how the preprocessor is invoked.
377 .PP
378 Unfortunately, the \fB\-traditional\fR flag will not avoid an error from
379 anything that \fBcpp\fR sees as an unterminated C comment, such as:
380         
381         C Some Fortran compilers accept /* as starting
382         C an inline comment.
383 .PP
384 The following options that affect overall processing are recognized
385 by the \fBg77\fR and \fBgcc\fR commands in a \s-1GNU\s0 Fortran installation:
386 .Ip "\fB\-fversion\fR" 4
387 Ensure that the \fBg77\fR version of the compiler phase is reported,
388 if run,
389 and, starting in \f(CWegcs\fR version 1.1,
390 that internal consistency checks in the \fIf771\fR program are run.
391 .Sp
392 This option is supplied automatically when \fB\-v\fR or \fB--verbose\fR
393 is specified as a command-line option for \fBg77\fR or \fBgcc\fR
394 and when the resulting commands compile Fortran source files.
395 .Sp
396 In \s-1GCC\s0 3.1, this is changed back to the behavior \fBgcc\fR displays
397 for \fB.c\fR files.
398 .Ip "\fB\-fset-g77-defaults\fR" 4
399 \fIVersion info:\fR
400 This option was obsolete as of \f(CWegcs\fR
401 version 1.1.
402 The effect is instead achieved
403 by the \f(CWlang_init_options\fR routine
404 in \fIgcc/gcc/f/com.c\fR.
405 .Sp
406 Set up whatever \fBgcc\fR options are to apply to Fortran
407 compilations, and avoid running internal consistency checks
408 that might take some time.
409 .Sp
410 This option is supplied automatically when compiling Fortran code
411 via the \fBg77\fR or \fBgcc\fR command.
412 The description of this option is provided so that users seeing
413 it in the output of, say, \fBg77 \-v\fR understand why it is
414 there.
415 .Sp
416 Also, developers who run \f(CWf771\fR directly might want to specify it
417 by hand to get the same defaults as they would running \f(CWf771\fR
418 via \fBg77\fR or \fBgcc\fR
419 However, such developers should, after linking a new \f(CWf771\fR
420 executable, invoke it without this option once,
421 e.g. via \f(CW./f771 -quiet < /dev/null\fR,
422 to ensure that they have not introduced any
423 internal inconsistencies (such as in the table of
424 intrinsics) before proceeding---\fBg77\fR will crash
425 with a diagnostic if it detects an inconsistency.
426 .Ip "\fB\-fno-silent\fR" 4
427 Print (to \f(CWstderr\fR) the names of the program units as
428 they are compiled, in a form similar to that used by popular
429 \s-1UNIX\s0 \fBf77\fR implementations and \fBf2c\fR
430 .Sh "Shorthand Options"
431 The following options serve as ``shorthand'\*(R'
432 for other options accepted by the compiler:
433 .Ip "\fB\-fugly\fR" 4
434 \fINote:\fR This option is no longer supported.
435 The information, below, is provided to aid
436 in the conversion of old scripts.
437 .Sp
438 Specify that certain ``ugly'\*(R' constructs are to be quietly accepted.
439 Same as:
440 .Sp
441 .Vb 4
442 \&        
443 \&        -fugly-args -fugly-assign -fugly-assumed
444 \&        -fugly-comma -fugly-complex -fugly-init
445 \&        -fugly-logint
446 .Ve
447 These constructs are considered inappropriate to use in new
448 or well-maintained portable Fortran code, but widely used
449 in old code.
450 .Ip "\fB\-fno-ugly\fR" 4
451 Specify that all ``ugly'\*(R' constructs are to be noisily rejected.
452 Same as:
453 .Sp
454 .Vb 4
455 \&        
456 \&        -fno-ugly-args -fno-ugly-assign -fno-ugly-assumed
457 \&        -fno-ugly-comma -fno-ugly-complex -fno-ugly-init
458 \&        -fno-ugly-logint
459 .Ve
460 .Ip "\fB\-ff66\fR" 4
461 Specify that the program is written in idiomatic \s-1FORTRAN\s0 66.
462 Same as \fB\-fonetrip \-fugly-assumed\fR.
463 .Sp
464 The \fB\-fno-f66\fR option is the inverse of \fB\-ff66\fR.
465 As such, it is the same as \fB\-fno-onetrip \-fno-ugly-assumed\fR.
466 .Sp
467 The meaning of this option is likely to be refined as future
468 versions of \fBg77\fR provide more compatibility with other
469 existing and obsolete Fortran implementations.
470 .Ip "\fB\-ff77\fR" 4
471 Specify that the program is written in idiomatic \s-1UNIX\s0 \s-1FORTRAN\s0 77
472 and/or the dialect accepted by the \fBf2c\fR product.
473 Same as \fB\-fbackslash \-fno-typeless-boz\fR.
474 .Sp
475 The meaning of this option is likely to be refined as future
476 versions of \fBg77\fR provide more compatibility with other
477 existing and obsolete Fortran implementations.
478 .Ip "\fB\-fno-f77\fR" 4
479 The \fB\-fno-f77\fR option is \fInot\fR the inverse
480 of \fB\-ff77\fR.
481 It specifies that the program is not written in idiomatic \s-1UNIX\s0
482 \s-1FORTRAN\s0 77 or \fBf2c\fR but in a more widely portable dialect.
483 \fB\-fno-f77\fR is the same as \fB\-fno-backslash\fR.
484 .Sp
485 The meaning of this option is likely to be refined as future
486 versions of \fBg77\fR provide more compatibility with other
487 existing and obsolete Fortran implementations.
488 .Sh "Options Controlling Fortran Dialect"
489 The following options control the dialect of Fortran
490 that the compiler accepts:
491 .Ip "\fB\-ffree-form\fR" 4
492 .Ip "\fB\-fno-fixed-form\fR" 4
493 Specify that the source file is written in free form
494 (introduced in Fortran 90) instead of the more-traditional fixed form.
495 .Ip "\fB\-ff90\fR" 4
496 Allow certain Fortran-90 constructs.
497 .Sp
498 This option controls whether certain
499 Fortran 90 constructs are recognized.
500 (Other Fortran 90 constructs
501 might or might not be recognized depending on other options such as
502 \fB\-fvxt\fR, \fB\-ff90-intrinsics-enable\fR, and the
503 current level of support for Fortran 90.)
504 .Ip "\fB\-fvxt\fR" 4
505 Specify the treatment of certain constructs that have different
506 meanings depending on whether the code is written in
507 \s-1GNU\s0 Fortran (based on \s-1FORTRAN\s0 77 and akin to Fortran 90)
508 or \s-1VXT\s0 Fortran (more like \s-1VAX\s0 \s-1FORTRAN\s0).
509 .Sp
510 The default is \fB\-fno-vxt\fR.
511 \fB\-fvxt\fR specifies that the \s-1VXT\s0 Fortran interpretations
512 for those constructs are to be chosen.
513 .Ip "\fB\-fdollar-ok\fR" 4
514 Allow \fB$\fR as a valid character in a symbol name.
515 .Ip "\fB\-fno-backslash\fR" 4
516 Specify that \fB\e\fR is not to be specially interpreted in character
517 and Hollerith constants a la C and many \s-1UNIX\s0 Fortran compilers.
518 .Sp
519 For example, with \fB\-fbackslash\fR in effect, \fBA\enB\fR specifies
520 three characters, with the second one being newline.
521 With \fB\-fno-backslash\fR, it specifies four characters,
522 \fBA\fR, \fB\e\fR, \fBn\fR, and \fBB\fR.
523 .Sp
524 Note that \fBg77\fR implements a fairly general form of backslash
525 processing that is incompatible with the narrower forms supported
526 by some other compilers.
527 For example, \fB'A\e003B\*(R'\fR is a three-character string in \fBg77\fR
528 whereas other compilers that support backslash might not support
529 the three-octal-digit form, and thus treat that string as longer
530 than three characters.
531 .Ip "\fB\-fno-ugly-args\fR" 4
532 Disallow passing Hollerith and typeless constants as actual
533 arguments (for example, \fB\s-1CALL\s0 \s-1FOO\s0(4HABCD)\fR).
534 .Ip "\fB\-fugly-assign\fR" 4
535 Use the same storage for a given variable regardless of
536 whether it is used to hold an assigned-statement label
537 (as in \fB\s-1ASSIGN\s0 10 \s-1TO\s0 I\fR) or used to hold numeric data
538 (as in \fBI = 3\fR).
539 .Ip "\fB\-fugly-assumed\fR" 4
540 Assume any dummy array with a final dimension specified as \fB1\fR
541 is really an assumed-size array, as if \fB*\fR had been specified
542 for the final dimension instead of \fB1\fR.
543 .Sp
544 For example, \fB\s-1DIMENSION\s0 X(1)\fR is treated as if it
545 had read \fB\s-1DIMENSION\s0 X(*)\fR.
546 .Ip "\fB\-fugly-comma\fR" 4
547 In an external-procedure invocation,
548 treat a trailing comma in the argument list
549 as specification of a trailing null argument,
550 and treat an empty argument list
551 as specification of a single null argument.
552 .Sp
553 For example, \fB\s-1CALL\s0 \s-1FOO\s0(,)\fR is treated as
554 \fB\s-1CALL\s0 \s-1FOO\s0(%\s-1VAL\s0(0), %\s-1VAL\s0(0))\fR.
555 That is, \fItwo\fR null arguments are specified
556 by the procedure call when \fB\-fugly-comma\fR is in force.
557 And \fBF = \s-1FUNC\s0()\fR is treated as \fBF = \s-1FUNC\s0(%\s-1VAL\s0(0))\fR.
558 .Sp
559 The default behavior, \fB\-fno-ugly-comma\fR, is to ignore
560 a single trailing comma in an argument list.
561 So, by default, \fB\s-1CALL\s0 \s-1FOO\s0(X,)\fR is treated
562 exactly the same as \fB\s-1CALL\s0 \s-1FOO\s0(X)\fR.
563 .Ip "\fB\-fugly-complex\fR" 4
564 Do not complain about \fB\s-1REAL\s0(\fR\fIexpr\fR\fB)\fR or
565 \fB\s-1AIMAG\s0(\fR\fIexpr\fR\fB)\fR when \fIexpr\fR is a \f(CWCOMPLEX\fR
566 type other than \f(CWCOMPLEX(KIND=1)\fR---usually
567 this is used to permit \f(CWCOMPLEX(KIND=2)\fR
568 (\f(CWDOUBLE COMPLEX\fR) operands.
569 .Sp
570 The \fB\-ff90\fR option controls the interpretation
571 of this construct.
572 .Ip "\fB\-fno-ugly-init\fR" 4
573 Disallow use of Hollerith and typeless constants as initial
574 values (in \f(CWPARAMETER\fR and \f(CWDATA\fR statements), and
575 use of character constants to
576 initialize numeric types and vice versa.
577 .Sp
578 For example, \fB\s-1DATA\s0 I/'F'/, \s-1CHRVAR/65\s0/, J/4HABCD/\fR is disallowed by
579 \fB\-fno-ugly-init\fR.
580 .Ip "\fB\-fugly-logint\fR" 4
581 Treat \f(CWINTEGER\fR and \f(CWLOGICAL\fR variables and
582 expressions as potential stand-ins for each other.
583 .Sp
584 For example, automatic conversion between \f(CWINTEGER\fR and
585 \f(CWLOGICAL\fR is enabled, for many contexts, via this option.
586 .Ip "\fB\-fonetrip\fR" 4
587 Executable iterative \f(CWDO\fR loops are to be executed at
588 least once each time they are reached.
589 .Sp
590 \s-1ANSI\s0 \s-1FORTRAN\s0 77 and more recent versions of the Fortran standard
591 specify that the body of an iterative \f(CWDO\fR loop is not executed
592 if the number of iterations calculated from the parameters of the
593 loop is less than 1.
594 (For example, \fB\s-1DO\s0 10 I = 1, 0\fR.)
595 Such a loop is called a \fIzero-trip loop\fR.
596 .Sp
597 Prior to \s-1ANSI\s0 \s-1FORTRAN\s0 77, many compilers implemented \f(CWDO\fR loops
598 such that the body of a loop would be executed at least once, even
599 if the iteration count was zero.
600 Fortran code written assuming this behavior is said to require
601 \fIone-trip loops\fR.
602 For example, some code written to the \s-1FORTRAN\s0 66 standard
603 expects this behavior from its \f(CWDO\fR loops, although that
604 standard did not specify this behavior.
605 .Sp
606 The \fB\-fonetrip\fR option specifies that the source \fIfile\fR\|(s) being
607 compiled require one-trip loops.
608 .Sp
609 This option affects only those loops specified by the (iterative) \f(CWDO\fR
610 statement and by implied-\f(CWDO\fR lists in I/O statements.
611 Loops specified by implied-\f(CWDO\fR lists in \f(CWDATA\fR and
612 specification (non-executable) statements are not affected.
613 .Ip "\fB\-ftypeless-boz\fR" 4
614 Specifies that prefix-radix non-decimal constants, such as
615 \fBZ'\s-1ABCD\s0\*(R'\fR, are typeless instead of \f(CWINTEGER(KIND=1)\fR.
616 .Sp
617 You can test for yourself whether a particular compiler treats
618 the prefix form as \f(CWINTEGER(KIND=1)\fR or typeless by running the
619 following program:
620 .Sp
621 .Vb 7
622 \&        
623 \&        EQUIVALENCE (I, R)
624 \&        R = Z'ABCD1234'
625 \&        J = Z'ABCD1234'
626 \&        IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS'
627 \&        IF (J .NE. I) PRINT *, 'Prefix form is INTEGER'
628 \&        END
629 .Ve
630 Reports indicate that many compilers process this form as
631 \f(CWINTEGER(KIND=1)\fR, though a few as typeless, and at least one
632 based on a command-line option specifying some kind of
633 compatibility.
634 .Ip "\fB\-fintrin-case-initcap\fR" 4
635 .Ip "\fB\-fintrin-case-upper\fR" 4
636 .Ip "\fB\-fintrin-case-lower\fR" 4
637 .Ip "\fB\-fintrin-case-any\fR" 4
638 Specify expected case for intrinsic names.
639 \fB\-fintrin-case-lower\fR is the default.
640 .Ip "\fB\-fmatch-case-initcap\fR" 4
641 .Ip "\fB\-fmatch-case-upper\fR" 4
642 .Ip "\fB\-fmatch-case-lower\fR" 4
643 .Ip "\fB\-fmatch-case-any\fR" 4
644 Specify expected case for keywords.
645 \fB\-fmatch-case-lower\fR is the default.
646 .Ip "\fB\-fsource-case-upper\fR" 4
647 .Ip "\fB\-fsource-case-lower\fR" 4
648 .Ip "\fB\-fsource-case-preserve\fR" 4
649 Specify whether source text other than character and Hollerith constants
650 is to be translated to uppercase, to lowercase, or preserved as is.
651 \fB\-fsource-case-lower\fR is the default.
652 .Ip "\fB\-fsymbol-case-initcap\fR" 4
653 .Ip "\fB\-fsymbol-case-upper\fR" 4
654 .Ip "\fB\-fsymbol-case-lower\fR" 4
655 .Ip "\fB\-fsymbol-case-any\fR" 4
656 Specify valid cases for user-defined symbol names.
657 \fB\-fsymbol-case-any\fR is the default.
658 .Ip "\fB\-fcase-strict-upper\fR" 4
659 Same as \fB\-fintrin-case-upper \-fmatch-case-upper \-fsource-case-preserve
660 \-fsymbol-case-upper\fR.
661 (Requires all pertinent source to be in uppercase.)
662 .Ip "\fB\-fcase-strict-lower\fR" 4
663 Same as \fB\-fintrin-case-lower \-fmatch-case-lower \-fsource-case-preserve
664 \-fsymbol-case-lower\fR.
665 (Requires all pertinent source to be in lowercase.)
666 .Ip "\fB\-fcase-initcap\fR" 4
667 Same as \fB\-fintrin-case-initcap \-fmatch-case-initcap \-fsource-case-preserve
668 \-fsymbol-case-initcap\fR.
669 (Requires all pertinent source to be in initial capitals,
670 as in \fBPrint *,SqRt(Value)\fR.)
671 .Ip "\fB\-fcase-upper\fR" 4
672 Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-upper
673 \-fsymbol-case-any\fR.
674 (Maps all pertinent source to uppercase.)
675 .Ip "\fB\-fcase-lower\fR" 4
676 Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-lower
677 \-fsymbol-case-any\fR.
678 (Maps all pertinent source to lowercase.)
679 .Ip "\fB\-fcase-preserve\fR" 4
680 Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-preserve
681 \-fsymbol-case-any\fR.
682 (Preserves all case in user-defined symbols,
683 while allowing any-case matching of intrinsics and keywords.
684 For example, \fBcall Foo(i,I)\fR would pass two \fIdifferent\fR
685 variables named \fBi\fR and \fBI\fR to a procedure named \fBFoo\fR.)
686 .Ip "\fB\-fbadu77-intrinsics-delete\fR" 4
687 .Ip "\fB\-fbadu77-intrinsics-hide\fR" 4
688 .Ip "\fB\-fbadu77-intrinsics-disable\fR" 4
689 .Ip "\fB\-fbadu77-intrinsics-enable\fR" 4
690 Specify status of \s-1UNIX\s0 intrinsics having inappropriate forms.
691 \fB\-fbadu77-intrinsics-enable\fR is the default.
692 .Ip "\fB\-ff2c-intrinsics-delete\fR" 4
693 .Ip "\fB\-ff2c-intrinsics-hide\fR" 4
694 .Ip "\fB\-ff2c-intrinsics-disable\fR" 4
695 .Ip "\fB\-ff2c-intrinsics-enable\fR" 4
696 Specify status of f2c-specific intrinsics.
697 \fB\-ff2c-intrinsics-enable\fR is the default.
698 .Ip "\fB\-ff90-intrinsics-delete\fR" 4
699 .Ip "\fB\-ff90-intrinsics-hide\fR" 4
700 .Ip "\fB\-ff90-intrinsics-disable\fR" 4
701 .Ip "\fB\-ff90-intrinsics-enable\fR" 4
702 Specify status of F90-specific intrinsics.
703 \fB\-ff90-intrinsics-enable\fR is the default.
704 .Ip "\fB\-fgnu-intrinsics-delete\fR" 4
705 .Ip "\fB\-fgnu-intrinsics-hide\fR" 4
706 .Ip "\fB\-fgnu-intrinsics-disable\fR" 4
707 .Ip "\fB\-fgnu-intrinsics-enable\fR" 4
708 Specify status of Digital's \s-1COMPLEX\s0\-related intrinsics.
709 \fB\-fgnu-intrinsics-enable\fR is the default.
710 .Ip "\fB\-fmil-intrinsics-delete\fR" 4
711 .Ip "\fB\-fmil-intrinsics-hide\fR" 4
712 .Ip "\fB\-fmil-intrinsics-disable\fR" 4
713 .Ip "\fB\-fmil-intrinsics-enable\fR" 4
714 Specify status of \s-1MIL\s0\-\s-1STD\s0\-1753-specific intrinsics.
715 \fB\-fmil-intrinsics-enable\fR is the default.
716 .Ip "\fB\-funix-intrinsics-delete\fR" 4
717 .Ip "\fB\-funix-intrinsics-hide\fR" 4
718 .Ip "\fB\-funix-intrinsics-disable\fR" 4
719 .Ip "\fB\-funix-intrinsics-enable\fR" 4
720 Specify status of \s-1UNIX\s0 intrinsics.
721 \fB\-funix-intrinsics-enable\fR is the default.
722 .Ip "\fB\-fvxt-intrinsics-delete\fR" 4
723 .Ip "\fB\-fvxt-intrinsics-hide\fR" 4
724 .Ip "\fB\-fvxt-intrinsics-disable\fR" 4
725 .Ip "\fB\-fvxt-intrinsics-enable\fR" 4
726 Specify status of \s-1VXT\s0 intrinsics.
727 \fB\-fvxt-intrinsics-enable\fR is the default.
728 .Ip "\fB\-ffixed-line-length-\fR\fIn\fR" 4
729 Set column after which characters are ignored in typical fixed-form
730 lines in the source file, and through which spaces are assumed (as
731 if padded to that length) after the ends of short fixed-form lines.
732 .Sp
733 Popular values for \fIn\fR include 72 (the
734 standard and the default), 80 (card image), and 132 (corresponds
735 to ``extended-source'\*(R' options in some popular compilers).
736 \fIn\fR may be \fBnone\fR, meaning that the entire line is meaningful
737 and that continued character constants never have implicit spaces appended
738 to them to fill out the line.
739 \fB\-ffixed-line-length-0\fR means the same thing as
740 \fB\-ffixed-line-length-none\fR.
741 .Sh "Options to Request or Suppress Warnings"
742 Warnings are diagnostic messages that report constructions which
743 are not inherently erroneous but which are risky or suggest there
744 might have been an error.
745 .PP
746 You can request many specific warnings with options beginning \fB\-W\fR,
747 for example \fB\-Wimplicit\fR to request warnings on implicit
748 declarations.  Each of these specific warning options also has a
749 negative form beginning \fB\-Wno-\fR to turn off warnings;
750 for example, \fB\-Wno-implicit\fR.  This manual lists only one of the
751 two forms, whichever is not the default.
752 .PP
753 These options control the amount and kinds of warnings produced by \s-1GNU\s0
754 Fortran:
755 .Ip "\fB\-fsyntax-only\fR" 4
756 Check the code for syntax errors, but don't do anything beyond that.
757 .Ip "\fB\-pedantic\fR" 4
758 Issue warnings for uses of extensions to \s-1ANSI\s0 \s-1FORTRAN\s0 77.
759 \fB\-pedantic\fR also applies to C\-language constructs where they
760 occur in \s-1GNU\s0 Fortran source files, such as use of \fB\ee\fR in a
761 character constant within a directive like \fB#include\fR.
762 .Sp
763 Valid \s-1ANSI\s0 \s-1FORTRAN\s0 77 programs should compile properly with or without
764 this option.
765 However, without this option, certain \s-1GNU\s0 extensions and traditional
766 Fortran features are supported as well.
767 With this option, many of them are rejected.
768 .Sp
769 Some users try to use \fB\-pedantic\fR to check programs for strict \s-1ANSI\s0
770 conformance.
771 They soon find that it does not do quite what they want---it finds some
772 non-\s-1ANSI\s0 practices, but not all.
773 However, improvements to \fBg77\fR in this area are welcome.
774 .Ip "\fB\-pedantic-errors\fR" 4
775 Like \fB\-pedantic\fR, except that errors are produced rather than
776 warnings.
777 .Ip "\fB\-fpedantic\fR" 4
778 Like \fB\-pedantic\fR, but applies only to Fortran constructs.
779 .Ip "\fB\-w\fR" 4
780 Inhibit all warning messages.
781 .Ip "\fB\-Wno-globals\fR" 4
782 Inhibit warnings about use of a name as both a global name
783 (a subroutine, function, or block data program unit, or a
784 common block) and implicitly as the name of an intrinsic
785 in a source file.
786 .Sp
787 Also inhibit warnings about inconsistent invocations and/or
788 definitions of global procedures (function and subroutines).
789 Such inconsistencies include different numbers of arguments
790 and different types of arguments.
791 .Ip "\fB\-Wimplicit\fR" 4
792 Warn whenever a variable, array, or function is implicitly
793 declared.
794 Has an effect similar to using the \f(CWIMPLICIT NONE\fR statement
795 in every program unit.
796 (Some Fortran compilers provide this feature by an option
797 named \fB\-u\fR or \fB/\s-1WARNINGS\s0=\s-1DECLARATIONS\s0\fR.)
798 .Ip "\fB\-Wunused\fR" 4
799 Warn whenever a variable is unused aside from its declaration.
800 .Ip "\fB\-Wuninitialized\fR" 4
801 Warn whenever an automatic variable is used without first being initialized.
802 .Sp
803 These warnings are possible only in optimizing compilation,
804 because they require data-flow information that is computed only
805 when optimizing.  If you don't specify \fB\-O\fR, you simply won't
806 get these warnings.
807 .Sp
808 These warnings occur only for variables that are candidates for
809 register allocation.  Therefore, they do not occur for a variable
810 whose address is taken, or whose size
811 is other than 1, 2, 4 or 8 bytes.  Also, they do not occur for
812 arrays, even when they are in registers.
813 .Sp
814 Note that there might be no warning about a variable that is used only
815 to compute a value that itself is never used, because such
816 computations may be deleted by data-flow analysis before the warnings
817 are printed.
818 .Sp
819 These warnings are made optional because \s-1GNU\s0 Fortran is not smart
820 enough to see all the reasons why the code might be correct
821 despite appearing to have an error.  Here is one example of how
822 this can happen:
823 .Sp
824 .Vb 7
825 \&        
826 \&        SUBROUTINE DISPAT(J)
827 \&        IF (J.EQ.1) I=1
828 \&        IF (J.EQ.2) I=4
829 \&        IF (J.EQ.3) I=5
830 \&        CALL FOO(I)
831 \&        END
832 .Ve
833 If the value of \f(CWJ\fR is always 1, 2 or 3, then \f(CWI\fR is
834 always initialized, but \s-1GNU\s0 Fortran doesn't know this.  Here is
835 another common case:
836 .Sp
837 .Vb 7
838 \&        
839 \&        SUBROUTINE MAYBE(FLAG)
840 \&        LOGICAL FLAG
841 \&        IF (FLAG) VALUE = 9.4
842 \&        ...
843 \&        IF (FLAG) PRINT *, VALUE
844 \&        END
845 .Ve
846 This has no bug because \f(CWVALUE\fR is used only if it is set.
847 .Ip "\fB\-Wall\fR" 4
848 The \fB\-Wunused\fR and \fB\-Wuninitialized\fR options combined.
849 These are all the
850 options which pertain to usage that we recommend avoiding and that we
851 believe is easy to avoid.
852 (As more warnings are added to \fBg77\fR some might
853 be added to the list enabled by \fB\-Wall\fR.)
854 .PP
855 The remaining \fB\-W...\fR options are not implied by \fB\-Wall\fR
856 because they warn about constructions that we consider reasonable to
857 use, on occasion, in clean programs.
858 .Ip "\fB\-Wsurprising\fR" 4
859 Warn about ``suspicious'\*(R' constructs that are interpreted
860 by the compiler in a way that might well be surprising to
861 someone reading the code.
862 These differences can result in subtle, compiler-dependent
863 (even machine-dependent) behavioral differences.
864 The constructs warned about include:
865 .Ip "\(bu" 8
866 Expressions having two arithmetic operators in a row, such
867 as \fBX*\-Y\fR.
868 Such a construct is nonstandard, and can produce
869 unexpected results in more complicated situations such
870 as \fBX**\-Y*Z\fR.
871 \fBg77\fR along with many other compilers, interprets
872 this example differently than many programmers, and a few
873 other compilers.
874 Specifically, \fBg77\fR interprets \fBX**\-Y*Z\fR as
875 \fB(X**(\-Y))*Z\fR, while others might think it should
876 be interpreted as \fBX**(\-(Y*Z))\fR.
877 .Sp
878 A revealing example is the constant expression \fB2**\-2*1.\fR,
879 which \fBg77\fR evaluates to .25, while others might evaluate
880 it to 0., the difference resulting from the way precedence affects
881 type promotion.
882 .Sp
883 (The \fB\-fpedantic\fR option also warns about expressions
884 having two arithmetic operators in a row.)
885 .Ip "\(bu" 8
886 Expressions with a unary minus followed by an operand and then
887 a binary operator other than plus or minus.
888 For example, \fB\-2**2\fR produces a warning, because
889 the precedence is \fB\-(2**2)\fR, yielding \-4, not
890 \fB(\-2)**2\fR, which yields 4, and which might represent
891 what a programmer expects.
892 .Sp
893 An example of an expression producing different results
894 in a surprising way is \fB\-I*S\fR, where \fII\fR holds
895 the value \fB\-2147483648\fR and \fIS\fR holds \fB0.5\fR.
896 On many systems, negating \fII\fR results in the same
897 value, not a positive number, because it is already the
898 lower bound of what an \f(CWINTEGER(KIND=1)\fR variable can hold.
899 So, the expression evaluates to a positive number, while
900 the ``expected'\*(R' interpretation, \fB(\-I)*S\fR, would
901 evaluate to a negative number.
902 .Sp
903 Even cases such as \fB\-I*J\fR produce warnings,
904 even though, in most configurations and situations,
905 there is no computational difference between the
906 results of the two interpretations---the purpose
907 of this warning is to warn about differing interpretations
908 and encourage a better style of coding, not to identify
909 only those places where bugs might exist in the user's
910 code.
911 .Ip "\(bu" 8
912 \f(CWDO\fR loops with \f(CWDO\fR variables that are not
913 of integral type---that is, using \f(CWREAL\fR
914 variables as loop control variables.
915 Although such loops can be written to work in the
916 ``obvious'\*(R' way, the way \fBg77\fR is required by the
917 Fortran standard to interpret such code is likely to
918 be quite different from the way many programmers expect.
919 (This is true of all \f(CWDO\fR loops, but the differences
920 are pronounced for non-integral loop control variables.)
921 .Ip "\fB\-Werror\fR" 4
922 Make all warnings into errors.
923 .Ip "\fB\-W\fR" 4
924 Turns on ``extra warnings'\*(R' and, if optimization is specified
925 via \fB\-O\fR, the \fB\-Wuninitialized\fR option.
926 (This might change in future versions of \fBg77\fR
927 .Sp
928 ``Extra warnings'\*(R' are issued for:
929 .Ip "\(bu" 8
930 Unused parameters to a procedure (when \fB\-Wunused\fR also is
931 specified).
932 .Ip "\(bu" 8
933 Overflows involving floating-point constants (not available
934 for certain configurations).
935 .PP
936 Some of these have no effect when compiling programs written in Fortran:
937 .Ip "\fB\-Wcomment\fR" 4
938 .Ip "\fB\-Wformat\fR" 4
939 .Ip "\fB\-Wparentheses\fR" 4
940 .Ip "\fB\-Wswitch\fR" 4
941 .Ip "\fB\-Wswitch-default\fR" 4
942 .Ip "\fB\-Wswitch-enum\fR" 4
943 .Ip "\fB\-Wtraditional\fR" 4
944 .Ip "\fB\-Wshadow\fR" 4
945 .Ip "\fB\-Wid-clash-\fR\fIlen\fR" 4
946 .Ip "\fB\-Wlarger-than-\fR\fIlen\fR" 4
947 .Ip "\fB\-Wconversion\fR" 4
948 .Ip "\fB\-Waggregate-return\fR" 4
949 .Ip "\fB\-Wredundant-decls\fR" 4
950 These options all could have some relevant meaning for
951 \s-1GNU\s0 Fortran programs, but are not yet supported.
952 .Sh "Options for Debugging Your Program or \s-1GNU\s0 Fortran"
953 \s-1GNU\s0 Fortran has various special options that are used for debugging
954 either your program or \fBg77\fR
955 .Ip "\fB\-g\fR" 4
956 Produce debugging information in the operating system's native format
957 (stabs, \s-1COFF\s0, \s-1XCOFF\s0, or \s-1DWARF\s0).  \s-1GDB\s0 can work with this debugging
958 information.
959 .Sp
960 A sample debugging session looks like this (note the use of the breakpoint):
961         
962         $ cat gdb.f
963               \s-1PROGRAM\s0 \s-1PROG\s0
964               \s-1DIMENSION\s0 \fIA\fR\|(10)
965               \s-1DATA\s0 A /1.,2.,3.,4.,5.,6.,7.,8.,9.,10./
966               \fIA\fR\|(5) = 4.
967               \s-1PRINT\s0*,A
968               \s-1END\s0
969         $ g77 \-g \-O gdb.f
970         $ gdb a.out
971         ...
972         (gdb) break \s-1MAIN_\s0\|_ 
973         Breakpoint 1 at 0x8048e96: file gdb.f, line 4.
974         (gdb) run
975         Starting program: /home/toon/g77-bugs/./a.out 
976         Breakpoint 1, \s-1MAIN_\s0\|_ () at gdb.f:4
977         4             \fIA\fR\|(5) = 4.
978         Current language:  auto; currently fortran
979         (gdb) print \fIa\fR\|(5)
980         \f(CW$1\fR = 5
981         (gdb) step 
982         5             \s-1PRINT\s0*,A
983         (gdb) print \fIa\fR\|(5)
984         \f(CW$2\fR = 4
985         ...
986 .Sp
987 One could also add the setting of the breakpoint and the first run command
988 to the file \fI.gdbinit\fR in the current directory, to simplify the debugging
989 session.
990 .Sh "Options That Control Optimization"
991 Most Fortran users will want to use no optimization when
992 developing and testing programs, and use \fB\-O\fR or \fB\-O2\fR when
993 compiling programs for late-cycle testing and for production use.
994 However, note that certain diagnostics---such as for uninitialized
995 variables---depend on the flow analysis done by \fB\-O\fR, i.e. you
996 must use \fB\-O\fR or \fB\-O2\fR to get such diagnostics.
997 .PP
998 The following flags have particular applicability when
999 compiling Fortran programs:
1000 .Ip "\fB\-malign-double\fR" 4
1001 (Intel x86 architecture only.)
1002 .Sp
1003 Noticeably improves performance of \fBg77\fR programs making
1004 heavy use of \f(CWREAL(KIND=2)\fR (\f(CWDOUBLE PRECISION\fR) data
1005 on some systems.
1006 In particular, systems using Pentium, Pentium Pro, 586, and
1007 686 implementations
1008 of the i386 architecture execute programs faster when
1009 \f(CWREAL(KIND=2)\fR (\f(CWDOUBLE PRECISION\fR) data are
1010 aligned on 64-bit boundaries
1011 in memory.
1012 .Sp
1013 This option can, at least, make benchmark results more consistent
1014 across various system configurations, versions of the program,
1015 and data sets.
1016 .Sp
1017 \fINote:\fR The warning in the \fBgcc\fR documentation about
1018 this option does not apply, generally speaking, to Fortran
1019 code compiled by \fBg77\fR
1020 .Sp
1021 \fIAlso also note:\fR The negative form of \fB\-malign-double\fR
1022 is \fB\-mno-align-double\fR, not \fB\-benign-double\fR.
1023 .Ip "\fB\-ffloat-store\fR" 4
1024 Might help a Fortran program that depends on exact \s-1IEEE\s0 conformance on
1025 some machines, but might slow down a program that doesn't.
1026 .Sp
1027 This option is effective when the floating-point unit is set to work in
1028 \s-1IEEE\s0 854 `extended precision\*(R'---as it typically is on x86 and m68k \s-1GNU\s0
1029 systems---rather than \s-1IEEE\s0 754 double precision.  \fB\-ffloat-store\fR
1030 tries to remove the extra precision by spilling data from floating-point
1031 registers into memory and this typically involves a big performance
1032 hit.  However, it doesn't affect intermediate results, so that it is
1033 only partially effective.  `Excess precision\*(R' is avoided in code like:
1034         
1035         a = b + c
1036         d = a * e
1037 .Sp
1038 but not in code like:
1039         
1040               d = (b + c) * e
1041 .Sp
1042 For another, potentially better, way of controlling the precision,
1043 see \f(CW@ref\fR{Floating-point precision}.
1044 .Ip "\fB\-fforce-mem\fR" 4
1045 .Ip "\fB\-fforce-addr\fR" 4
1046 Might improve optimization of loops.
1047 .Ip "\fB\-fno-inline\fR" 4
1048 Don't compile statement functions inline.
1049 Might reduce the size of a program unit---which might be at
1050 expense of some speed (though it should compile faster).
1051 Note that if you are not optimizing, no functions can be expanded inline.
1052 .Ip "\fB\-ffast-math\fR" 4
1053 Might allow some programs designed to not be too dependent
1054 on \s-1IEEE\s0 behavior for floating-point to run faster, or die trying.
1055 Sets \fB\-funsafe-math-optimizations\fR, \fB\-ffinite-math-only\fR,
1056 and \fB\-fno-trapping-math\fR.
1057 .Ip "\fB\-funsafe-math-optimizations\fR" 4
1058 Allow optimizations that may be give incorrect results
1059 for certain \s-1IEEE\s0 inputs.
1060 .Ip "\fB\-ffinite-math-only\fR" 4
1061 Allow optimizations for floating-point arithmetic that assume
1062 that arguments and results are not NaNs or +\-Infs.
1063 .Sp
1064 This option should never be turned on by any \fB\-O\fR option since
1065 it can result in incorrect output for programs which depend on
1066 an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications.
1067 .Sp
1068 The default is \fB\-fno-finite-math-only\fR.
1069 .Ip "\fB\-fno-trapping-math\fR" 4
1070 Allow the compiler to assume that floating-point arithmetic
1071 will not generate traps on any inputs.  This is useful, for
1072 example, when running a program using \s-1IEEE\s0 \*(L"non-stop\*(R"
1073 floating-point arithmetic.
1074 .Ip "\fB\-fstrength-reduce\fR" 4
1075 Might make some loops run faster.
1076 .Ip "\fB\-frerun-cse-after-loop\fR" 4
1077 .Ip "\fB\-fexpensive-optimizations\fR" 4
1078 .Ip "\fB\-fdelayed-branch\fR" 4
1079 .Ip "\fB\-fschedule-insns\fR" 4
1080 .Ip "\fB\-fschedule-insns2\fR" 4
1081 .Ip "\fB\-fcaller-saves\fR" 4
1082 Might improve performance on some code.
1083 .Ip "\fB\-funroll-loops\fR" 4
1084 Typically improves performance on code using iterative \f(CWDO\fR loops by
1085 unrolling them and is probably generally appropriate for Fortran, though
1086 it is not turned on at any optimization level.
1087 Note that outer loop unrolling isn't done specifically; decisions about
1088 whether to unroll a loop are made on the basis of its instruction count.
1089 .Sp
1090 Also, no `loop discovery'[1] is done, so only loops written with \f(CWDO\fR
1091 benefit from loop optimizations, including---but not limited
1092 to---unrolling.  Loops written with \f(CWIF\fR and \f(CWGOTO\fR are not
1093 currently recognized as such.  This option unrolls only iterative
1094 \f(CWDO\fR loops, not \f(CWDO WHILE\fR loops.
1095 .Ip "\fB\-funroll-all-loops\fR" 4
1096 Probably improves performance on code using \f(CWDO WHILE\fR loops by
1097 unrolling them in addition to iterative \f(CWDO\fR loops.  In the absence
1098 of \f(CWDO WHILE\fR, this option is equivalent to \fB\-funroll-loops\fR
1099 but possibly slower.
1100 .Ip "\fB\-fno-move-all-movables\fR" 4
1101 .Ip "\fB\-fno-reduce-all-givs\fR" 4
1102 .Ip "\fB\-fno-rerun-loop-opt\fR" 4
1103 In general, the optimizations enabled with these options will lead to
1104 faster code being generated by \s-1GNU\s0 Fortran; hence they are enabled by default
1105 when issuing the \fBg77\fR command.
1106 .Sp
1107 \fB\-fmove-all-movables\fR and \fB\-freduce-all-givs\fR will enable
1108 loop optimization to move all loop-invariant index computations in nested
1109 loops over multi-rank array dummy arguments out of these loops.
1110 .Sp
1111 \fB\-frerun-loop-opt\fR will move offset calculations resulting
1112 from the fact that Fortran arrays by default have a lower bound of 1
1113 out of the loops.
1114 .Sp
1115 These three options are intended to be removed someday, once
1116 loop optimization is sufficiently advanced to perform all those
1117 transformations without help from these options.
1118 .Sh "Options Controlling the Preprocessor"
1119 These options control the C preprocessor, which is run on each C source
1120 file before actual compilation.
1121 .PP
1122 Some of these options also affect how \fBg77\fR processes the
1123 \f(CWINCLUDE\fR directive.
1124 Since this directive is processed even when preprocessing
1125 is not requested, it is not described in this section.
1126 .PP
1127 However, the \f(CWINCLUDE\fR directive does not apply
1128 preprocessing to the contents of the included file itself.
1129 .PP
1130 Therefore, any file that contains preprocessor directives
1131 (such as \f(CW#include\fR, \f(CW#define\fR, and \f(CW#if\fR)
1132 must be included via the \f(CW#include\fR directive, not
1133 via the \f(CWINCLUDE\fR directive.
1134 Therefore, any file containing preprocessor directives,
1135 if included, is necessarily included by a file that itself
1136 contains preprocessor directives.
1137 .Sh "Options for Directory Search"
1138 These options affect how the \fBcpp\fR preprocessor searches
1139 for files specified via the \f(CW#include\fR directive.
1140 Therefore, when compiling Fortran programs, they are meaningful
1141 when the preprocessor is used.
1142 .PP
1143 Some of these options also affect how \fBg77\fR searches
1144 for files specified via the \f(CWINCLUDE\fR directive,
1145 although files included by that directive are not,
1146 themselves, preprocessed.
1147 These options are:
1148 .Ip "\fB\-I-\fR" 4
1149 .Ip "\fB\-I\fR\fIdir\fR" 4
1150 These affect interpretation of the \f(CWINCLUDE\fR directive
1151 (as well as of the \f(CW#include\fR directive of the \fBcpp\fR
1152 preprocessor).
1153 .Sp
1154 Note that \fB\-I\fR\fIdir\fR must be specified \fIwithout\fR any
1155 spaces between \fB\-I\fR and the directory name---that is,
1156 \fB\-Ifoo/bar\fR is valid, but \fB\-I foo/bar\fR
1157 is rejected by the \fBg77\fR compiler (though the preprocessor supports
1158 the latter form).
1159 Also note that the general behavior of \fB\-I\fR and
1160 \f(CWINCLUDE\fR is pretty much the same as of \fB\-I\fR with
1161 \f(CW#include\fR in the \fBcpp\fR preprocessor, with regard to
1162 looking for \fIheader.gcc\fR files and other such things.
1163 .Sh "Options for Code Generation Conventions"
1164 These machine-independent options control the interface conventions
1165 used in code generation.
1166 .PP
1167 Most of them have both positive and negative forms; the negative form
1168 of \fB\-ffoo\fR would be \fB\-fno-foo\fR.  In the table below, only
1169 one of the forms is listed---the one which is not the default.  You
1170 can figure out the other form by either removing \fBno-\fR or adding
1171 it.
1172 .Ip "\fB\-fno-automatic\fR" 4
1173 Treat each program unit as if the \f(CWSAVE\fR statement was specified
1174 for every local variable and array referenced in it.
1175 Does not affect common blocks.
1176 (Some Fortran compilers provide this option under
1177 the name \fB\-static\fR.)
1178 .Ip "\fB\-finit-local-zero\fR" 4
1179 Specify that variables and arrays that are local to a program unit
1180 (not in a common block and not passed as an argument) are to be initialized
1181 to binary zeros.
1182 .Sp
1183 Since there is a run-time penalty for initialization of variables
1184 that are not given the \f(CWSAVE\fR attribute, it might be a
1185 good idea to also use \fB\-fno-automatic\fR with \fB\-finit-local-zero\fR.
1186 .Ip "\fB\-fno-f2c\fR" 4
1187 Do not generate code designed to be compatible with code generated
1188 by \fBf2c\fR use the \s-1GNU\s0 calling conventions instead.
1189 .Sp
1190 The \fBf2c\fR calling conventions require functions that return
1191 type \f(CWREAL(KIND=1)\fR to actually return the C type \f(CWdouble\fR,
1192 and functions that return type \f(CWCOMPLEX\fR to return the
1193 values via an extra argument in the calling sequence that points
1194 to where to store the return value.
1195 Under the \s-1GNU\s0 calling conventions, such functions simply return
1196 their results as they would in \s-1GNU\s0 C---\f(CWREAL(KIND=1)\fR functions
1197 return the C type \f(CWfloat\fR, and \f(CWCOMPLEX\fR functions
1198 return the \s-1GNU\s0 C type \f(CWcomplex\fR (or its \f(CWstruct\fR
1199 equivalent).
1200 .Sp
1201 This does not affect the generation of code that interfaces with the
1202 \f(CWlibg2c\fR library.
1203 .Sp
1204 However, because the \f(CWlibg2c\fR library uses \fBf2c\fR
1205 calling conventions, \fBg77\fR rejects attempts to pass
1206 intrinsics implemented by routines in this library as actual
1207 arguments when \fB\-fno-f2c\fR is used, to avoid bugs when
1208 they are actually called by code expecting the \s-1GNU\s0 calling
1209 conventions to work.
1210 .Sp
1211 For example, \fB\s-1INTRINSIC\s0 \s-1ABS\s0;\s-1CALL\s0 \s-1FOO\s0(\s-1ABS\s0)\fR is
1212 rejected when \fB\-fno-f2c\fR is in force.
1213 (Future versions of the \fBg77\fR run-time library might
1214 offer routines that provide \s-1GNU\s0\-callable versions of the
1215 routines that implement the \fBf2c\fR intrinsics
1216 that may be passed as actual arguments, so that
1217 valid programs need not be rejected when \fB\-fno-f2c\fR
1218 is used.)
1219 .Sp
1220 \fBCaution:\fR If \fB\-fno-f2c\fR is used when compiling any
1221 source file used in a program, it must be used when compiling
1222 \fIall\fR Fortran source files used in that program.
1223 .Ip "\fB\-ff2c-library\fR" 4
1224 Specify that use of \f(CWlibg2c\fR (or the original \f(CWlibf2c\fR)
1225 is required.
1226 This is the default for the current version of \fBg77\fR
1227 .Sp
1228 Currently it is not
1229 valid to specify \fB\-fno-f2c-library\fR.
1230 This option is provided so users can specify it in shell
1231 scripts that build programs and libraries that require the
1232 \f(CWlibf2c\fR library, even when being compiled by future
1233 versions of \fBg77\fR that might otherwise default to
1234 generating code for an incompatible library.
1235 .Ip "\fB\-fno-underscoring\fR" 4
1236 Do not transform names of entities specified in the Fortran
1237 source file by appending underscores to them.
1238 .Sp
1239 With \fB\-funderscoring\fR in effect, \fBg77\fR appends two underscores
1240 to names with underscores and one underscore to external names with
1241 no underscores.  (\fBg77\fR also appends two underscores to internal
1242 names with underscores to avoid naming collisions with external names.
1243 The \fB\-fno-second-underscore\fR option disables appending of the
1244 second underscore in all cases.)
1245 .Sp
1246 This is done to ensure compatibility with code produced by many
1247 \s-1UNIX\s0 Fortran compilers, including \fBf2c\fR which perform the
1248 same transformations.
1249 .Sp
1250 Use of \fB\-fno-underscoring\fR is not recommended unless you are
1251 experimenting with issues such as integration of (\s-1GNU\s0) Fortran into
1252 existing system environments (vis-a-vis existing libraries, tools, and
1253 so on).
1254 .Sp
1255 For example, with \fB\-funderscoring\fR, and assuming other defaults like
1256 \fB\-fcase-lower\fR and that \fBj()\fR and \fBmax_count()\fR are
1257 external functions while \fBmy_var\fR and \fBlvar\fR are local variables,
1258 a statement like
1259 .Sp
1260 .Vb 2
1261 \&        
1262 \&        I = J() + MAX_COUNT (MY_VAR, LVAR)
1263 .Ve
1264 is implemented as something akin to:
1265 .Sp
1266 .Vb 2
1267 \&        
1268 \&        i = j_() + max_count__(&my_var__, &lvar);
1269 .Ve
1270 With \fB\-fno-underscoring\fR, the same statement is implemented as:
1271 .Sp
1272 .Vb 2
1273 \&        
1274 \&        i = j() + max_count(&my_var, &lvar);
1275 .Ve
1276 Use of \fB\-fno-underscoring\fR allows direct specification of
1277 user-defined names while debugging and when interfacing \fBg77\fR
1278 code with other languages.
1279 .Sp
1280 Note that just because the names match does \fInot\fR mean that the
1281 interface implemented by \fBg77\fR for an external name matches the
1282 interface implemented by some other language for that same name.
1283 That is, getting code produced by \fBg77\fR to link to code produced
1284 by some other compiler using this or any other method can be only a
1285 small part of the overall solution---getting the code generated by
1286 both compilers to agree on issues other than naming can require
1287 significant effort, and, unlike naming disagreements, linkers normally
1288 cannot detect disagreements in these other areas.
1289 .Sp
1290 Also, note that with \fB\-fno-underscoring\fR, the lack of appended
1291 underscores introduces the very real possibility that a user-defined
1292 external name will conflict with a name in a system library, which
1293 could make finding unresolved-reference bugs quite difficult in some
1294 cases---they might occur at program run time, and show up only as
1295 buggy behavior at run time.
1296 .Sp
1297 In future versions of \fBg77\fR we hope to improve naming and linking
1298 issues so that debugging always involves using the names as they appear
1299 in the source, even if the names as seen by the linker are mangled to
1300 prevent accidental linking between procedures with incompatible
1301 interfaces.
1302 .Ip "\fB\-fno-second-underscore\fR" 4
1303 Do not append a second underscore to names of entities specified
1304 in the Fortran source file.
1305 .Sp
1306 This option has no effect if \fB\-fno-underscoring\fR is
1307 in effect.
1308 .Sp
1309 Otherwise, with this option, an external name such as \fB\s-1MAX_COUNT\s0\fR
1310 is implemented as a reference to the link-time external symbol
1311 \fBmax_count_\fR, instead of \fBmax_count_\|_\fR.
1312 .Ip "\fB\-fno-ident\fR" 4
1313 Ignore the \fB#ident\fR directive.
1314 .Ip "\fB\-fzeros\fR" 4
1315 Treat initial values of zero as if they were any other value.
1316 .Sp
1317 As of version 0.5.18, \fBg77\fR normally treats \f(CWDATA\fR and
1318 other statements that are used to specify initial values of zero
1319 for variables and arrays as if no values were actually specified,
1320 in the sense that no diagnostics regarding multiple initializations
1321 are produced.
1322 .Sp
1323 This is done to speed up compiling of programs that initialize
1324 large arrays to zeros.
1325 .Sp
1326 Use \fB\-fzeros\fR to revert to the simpler, slower behavior
1327 that can catch multiple initializations by keeping track of
1328 all initializations, zero or otherwise.
1329 .Sp
1330 \fICaution:\fR Future versions of \fBg77\fR might disregard this option
1331 (and its negative form, the default) or interpret it somewhat
1332 differently.
1333 The interpretation changes will affect only non-standard
1334 programs; standard-conforming programs should not be affected.
1335 .Ip "\fB\-femulate-complex\fR" 4
1336 Implement \f(CWCOMPLEX\fR arithmetic via emulation,
1337 instead of using the facilities of
1338 the \fBgcc\fR back end that provide direct support of
1339 \f(CWcomplex\fR arithmetic.
1340 .Sp
1341 (\fBgcc\fR had some bugs in its back-end support
1342 for \f(CWcomplex\fR arithmetic, due primarily to the support not being
1343 completed as of version 2.8.1 and \f(CWegcs\fR 1.1.2.)
1344 .Sp
1345 Use \fB\-femulate-complex\fR if you suspect code-generation bugs,
1346 or experience compiler crashes,
1347 that might result from \fBg77\fR using the \f(CWCOMPLEX\fR support
1348 in the \fBgcc\fR back end.
1349 If using that option fixes the bugs or crashes you are seeing,
1350 that indicates a likely \fBg77\fR bugs
1351 (though, all compiler crashes are considered bugs),
1352 so, please report it.
1353 (Note that the known bugs, now believed fixed, produced compiler crashes
1354 rather than causing the generation of incorrect code.)
1355 .Sp
1356 Use of this option should not affect how Fortran code compiled
1357 by \fBg77\fR works in terms of its interfaces to other code,
1358 e.g. that compiled by \fBf2c\fR
1359 .Sp
1360 As of \s-1GCC\s0 version 3.0, this option is not necessary anymore.
1361 .Sp
1362 \fICaution:\fR Future versions of \fBg77\fR might ignore both forms
1363 of this option.
1364 .Ip "\fB\-falias-check\fR" 4
1365 .Ip "\fB\-fargument-alias\fR" 4
1366 .Ip "\fB\-fargument-noalias\fR" 4
1367 .Ip "\fB\-fno-argument-noalias-global\fR" 4
1368 \fIVersion info:\fR
1369 These options are not supported by
1370 versions of \fBg77\fR based on \fBgcc\fR version 2.8.
1371 .Sp
1372 These options specify to what degree aliasing
1373 (overlap)
1374 is permitted between
1375 arguments (passed as pointers) and \f(CWCOMMON\fR (external, or
1376 public) storage.
1377 .Sp
1378 The default for Fortran code, as mandated by the \s-1FORTRAN\s0 77 and
1379 Fortran 90 standards, is \fB\-fargument-noalias-global\fR.
1380 The default for code written in the C language family is
1381 \fB\-fargument-alias\fR.
1382 .Sp
1383 Note that, on some systems, compiling with \fB\-fforce-addr\fR in
1384 effect can produce more optimal code when the default aliasing
1385 options are in effect (and when optimization is enabled).
1386 .Ip "\fB\-fno-globals\fR" 4
1387 Disable diagnostics about inter-procedural
1388 analysis problems, such as disagreements about the
1389 type of a function or a procedure's argument,
1390 that might cause a compiler crash when attempting
1391 to inline a reference to a procedure within a
1392 program unit.
1393 (The diagnostics themselves are still produced, but
1394 as warnings, unless \fB\-Wno-globals\fR is specified,
1395 in which case no relevant diagnostics are produced.)
1396 .Sp
1397 Further, this option disables such inlining, to
1398 avoid compiler crashes resulting from incorrect
1399 code that would otherwise be diagnosed.
1400 .Sp
1401 As such, this option might be quite useful when
1402 compiling existing, ``working'\*(R' code that happens
1403 to have a few bugs that do not generally show themselves,
1404 but which \fBg77\fR diagnoses.
1405 .Sp
1406 Use of this option therefore has the effect of
1407 instructing \fBg77\fR to behave more like it did
1408 up through version 0.5.19.1, when it paid little or
1409 no attention to disagreements between program units
1410 about a procedure's type and argument information,
1411 and when it performed no inlining of procedures
1412 (except statement functions).
1413 .Sp
1414 Without this option, \fBg77\fR defaults to performing
1415 the potentially inlining procedures as it started doing
1416 in version 0.5.20, but as of version 0.5.21, it also
1417 diagnoses disagreements that might cause such inlining
1418 to crash the compiler as (fatal) errors,
1419 and warns about similar disagreements
1420 that are currently believed to not
1421 likely to result in the compiler later crashing
1422 or producing incorrect code.
1423 .Ip "\fB\-fflatten-arrays\fR" 4
1424 Use back end's C\-like constructs
1425 (pointer plus offset)
1426 instead of its \f(CWARRAY_REF\fR construct
1427 to handle all array references.
1428 .Sp
1429 \fINote:\fR This option is not supported.
1430 It is intended for use only by \fBg77\fR developers,
1431 to evaluate code-generation issues.
1432 It might be removed at any time.
1433 .Ip "\fB\-fbounds-check\fR" 4
1434 .Ip "\fB\-ffortran-bounds-check\fR" 4
1435 Enable generation of run-time checks for array subscripts
1436 and substring start and end points
1437 against the (locally) declared minimum and maximum values.
1438 .Sp
1439 The current implementation uses the \f(CWlibf2c\fR
1440 library routine \f(CWs_rnge\fR to print the diagnostic.
1441 .Sp
1442 However, whereas \fBf2c\fR generates a single check per
1443 reference for a multi-dimensional array, of the computed
1444 offset against the valid offset range (0 through the size of the array),
1445 \fBg77\fR generates a single check per \fIsubscript\fR expression.
1446 This catches some cases of potential bugs that \fBf2c\fR does not,
1447 such as references to below the beginning of an assumed-size array.
1448 .Sp
1449 \fBg77\fR also generates checks for \f(CWCHARACTER\fR substring references,
1450 something \fBf2c\fR currently does not do.
1451 .Sp
1452 Use the new \fB\-ffortran-bounds-check\fR option
1453 to specify bounds-checking for only the Fortran code you are compiling,
1454 not necessarily for code written in other languages.
1455 .Sp
1456 \fINote:\fR To provide more detailed information on the offending subscript,
1457 \fBg77\fR provides the \f(CWlibg2c\fR run-time library routine \f(CWs_rnge\fR
1458 with somewhat differently-formatted information.
1459 Here's a sample diagnostic:
1460 .Sp
1461 .Vb 4
1462 \&        
1463 \&        Subscript out of range on file line 4, procedure rnge.f/bf.
1464 \&        Attempt to access the -6-th element of variable b[subscript-2-of-2].
1465 \&        Aborted
1466 .Ve
1467 The above message indicates that the offending source line is
1468 line 4 of the file \fIrnge.f\fR,
1469 within the program unit (or statement function) named \fBbf\fR.
1470 The offended array is named \fBb\fR.
1471 The offended array dimension is the second for a two-dimensional array,
1472 and the offending, computed subscript expression was \fB\-6\fR.
1473 .Sp
1474 For a \f(CWCHARACTER\fR substring reference, the second line has
1475 this appearance:
1476 .Sp
1477 .Vb 2
1478 \&        
1479 \&        Attempt to access the 11-th element of variable a[start-substring].
1480 .Ve
1481 This indicates that the offended \f(CWCHARACTER\fR variable or array
1482 is named \fBa\fR,
1483 the offended substring position is the starting (leftmost) position,
1484 and the offending substring expression is \fB11\fR.
1485 .Sp
1486 (Though the verbage of \f(CWs_rnge\fR is not ideal
1487 for the purpose of the \fBg77\fR compiler,
1488 the above information should provide adequate diagnostic abilities
1489 to it users.)
1490 .PP
1491 Some of these do \fInot\fR work when compiling programs written in Fortran:
1492 .Ip "\fB\-fpcc-struct-return\fR" 4
1493 .Ip "\fB\-freg-struct-return\fR" 4
1494 You should not use these except strictly the same way as you
1495 used them to build the version of \f(CWlibg2c\fR with which
1496 you will be linking all code compiled by \fBg77\fR with the
1497 same option.
1498 .Ip "\fB\-fshort-double\fR" 4
1499 This probably either has no effect on Fortran programs, or
1500 makes them act loopy.
1501 .Ip "\fB\-fno-common\fR" 4
1502 Do not use this when compiling Fortran programs,
1503 or there will be Trouble.
1504 .Ip "\fB\-fpack-struct\fR" 4
1505 This probably will break any calls to the \f(CWlibg2c\fR library,
1506 at the very least, even if it is built with the same option.
1507 .SH "ENVIRONMENT"
1508 GNU Fortran currently does not make use of any environment
1509 variables to control its operation above and beyond those
1510 that affect the operation of \fBgcc\fR.
1511 .SH "BUGS"
1512 For instructions on reporting bugs, see
1513 <\fBhttp://gcc.gnu.org/bugs.html\fR>.  Use of the \fBgccbug\fR  
1514 script to report bugs is recommended.
1515 .SH "FOOTNOTES"
1516 .Ip "1." 4
1517 \fIloop discovery\fR refers to the
1518 process by which a compiler, or indeed any reader of a program,
1519 determines which portions of the program are more likely to be executed
1520 repeatedly as it is being run.  Such discovery typically is done early
1521 when compiling using optimization techniques, so the ``discovered'\*(R'
1522 loops get more attention---and more run-time resources, such as
1523 registers---from the compiler.  It is easy to ``discover'\*(R' loops that are
1524 constructed out of looping constructs in the language
1525 (such as Fortran's \f(CWDO\fR).  For some programs, ``discovering'\*(R' loops
1526 constructed out of lower-level constructs (such as \f(CWIF\fR and
1527 \f(CWGOTO\fR) can lead to generation of more optimal code
1528 than otherwise.
1529 .SH "SEE ALSO"
1530 \fIgpl\fR\|(7), \fIgfdl\fR\|(7), fsf-\fIfunding\fR\|(7),
1531 \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)
1532 and the Info entries for \fIgcc\fR, \fIcpp\fR, \fIg77\fR, \fIas\fR,
1533 \fIld\fR, \fIbinutils\fR and \fIgdb\fR.
1534 .SH "AUTHOR"
1535 See the Info entry for \fBg77\fR for contributors to GCC and G77.
1536 .SH "COPYRIGHT"
1537 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004
1538 Free Software Foundation, Inc.
1539 .PP
1540 Permission is granted to copy, distribute and/or modify this document
1541 under the terms of the GNU Free Documentation License, Version 1.2 or
1542 any later version published by the Free Software Foundation; with the
1543 Invariant Sections being ``GNU General Public License'\*(R' and ``Funding
1544 Free Software'\*(R', the Front-Cover texts being (a) (see below), and with
1545 the Back-Cover Texts being (b) (see below).  A copy of the license is
1546 included in the \fIgfdl\fR\|(7) man page.
1547  
1548 (a) The FSF's Front-Cover Text is:
1549 .PP
1550 .Vb 1
1551 \&     A GNU Manual
1552 .Ve
1553 (b) The FSF's Back-Cover Text is:
1554 .PP
1555 .Vb 3
1556 \&     You have freedom to copy and modify this GNU Manual, like GNU
1557 \&     software.  Copies published by the Free Software Foundation raise
1558 \&     funds for GNU development.
1559 .Ve
1560
1561 .rn }` ''
1562 .IX Title "G77 1"
1563 .IX Name "g77 - GNU project Fortran 77 compiler"
1564
1565 .IX Header "NAME"
1566
1567 .IX Header "SYNOPSIS"
1568
1569 .IX Header "DESCRIPTION"
1570
1571 .IX Header "OPTIONS"
1572
1573 .IX Item "\fIOverall Options\fR"
1574
1575 .IX Item "\fIShorthand Options\fR"
1576
1577 .IX Item "\fIFortran Language Options\fR"
1578
1579 .IX Item "\fIWarning Options\fR"
1580
1581 .IX Item "\fIDebugging Options\fR"
1582
1583 .IX Item "\fIOptimization Options\fR"
1584
1585 .IX Item "\fIDirectory Options\fR"
1586
1587 .IX Item "\fICode Generation Options\fR"
1588
1589 .IX Item "\fIfile\fR\fB.f\fR"
1590
1591 .IX Item "\fIfile\fR\fB.for\fR"
1592
1593 .IX Item "\fIfile\fR\fB.\s-1FOR\s0\fR"
1594
1595 .IX Item "\fIfile\fR\fB.F\fR"
1596
1597 .IX Item "\fIfile\fR\fB.fpp\fR"
1598
1599 .IX Item "\fIfile\fR\fB.\s-1FPP\s0\fR"
1600
1601 .IX Item "\fIfile\fR\fB.r\fR"
1602
1603 .IX Item "\fB\-fversion\fR"
1604
1605 .IX Item "\fB\-fset-g77-defaults\fR"
1606
1607 .IX Item "\fB\-fno-silent\fR"
1608
1609 .IX Subsection "Shorthand Options"
1610
1611 .IX Item "\fB\-fugly\fR"
1612
1613 .IX Item "\fB\-fno-ugly\fR"
1614
1615 .IX Item "\fB\-ff66\fR"
1616
1617 .IX Item "\fB\-ff77\fR"
1618
1619 .IX Item "\fB\-fno-f77\fR"
1620
1621 .IX Subsection "Options Controlling Fortran Dialect"
1622
1623 .IX Item "\fB\-ffree-form\fR"
1624
1625 .IX Item "\fB\-fno-fixed-form\fR"
1626
1627 .IX Item "\fB\-ff90\fR"
1628
1629 .IX Item "\fB\-fvxt\fR"
1630
1631 .IX Item "\fB\-fdollar-ok\fR"
1632
1633 .IX Item "\fB\-fno-backslash\fR"
1634
1635 .IX Item "\fB\-fno-ugly-args\fR"
1636
1637 .IX Item "\fB\-fugly-assign\fR"
1638
1639 .IX Item "\fB\-fugly-assumed\fR"
1640
1641 .IX Item "\fB\-fugly-comma\fR"
1642
1643 .IX Item "\fB\-fugly-complex\fR"
1644
1645 .IX Item "\fB\-fno-ugly-init\fR"
1646
1647 .IX Item "\fB\-fugly-logint\fR"
1648
1649 .IX Item "\fB\-fonetrip\fR"
1650
1651 .IX Item "\fB\-ftypeless-boz\fR"
1652
1653 .IX Item "\fB\-fintrin-case-initcap\fR"
1654
1655 .IX Item "\fB\-fintrin-case-upper\fR"
1656
1657 .IX Item "\fB\-fintrin-case-lower\fR"
1658
1659 .IX Item "\fB\-fintrin-case-any\fR"
1660
1661 .IX Item "\fB\-fmatch-case-initcap\fR"
1662
1663 .IX Item "\fB\-fmatch-case-upper\fR"
1664
1665 .IX Item "\fB\-fmatch-case-lower\fR"
1666
1667 .IX Item "\fB\-fmatch-case-any\fR"
1668
1669 .IX Item "\fB\-fsource-case-upper\fR"
1670
1671 .IX Item "\fB\-fsource-case-lower\fR"
1672
1673 .IX Item "\fB\-fsource-case-preserve\fR"
1674
1675 .IX Item "\fB\-fsymbol-case-initcap\fR"
1676
1677 .IX Item "\fB\-fsymbol-case-upper\fR"
1678
1679 .IX Item "\fB\-fsymbol-case-lower\fR"
1680
1681 .IX Item "\fB\-fsymbol-case-any\fR"
1682
1683 .IX Item "\fB\-fcase-strict-upper\fR"
1684
1685 .IX Item "\fB\-fcase-strict-lower\fR"
1686
1687 .IX Item "\fB\-fcase-initcap\fR"
1688
1689 .IX Item "\fB\-fcase-upper\fR"
1690
1691 .IX Item "\fB\-fcase-lower\fR"
1692
1693 .IX Item "\fB\-fcase-preserve\fR"
1694
1695 .IX Item "\fB\-fbadu77-intrinsics-delete\fR"
1696
1697 .IX Item "\fB\-fbadu77-intrinsics-hide\fR"
1698
1699 .IX Item "\fB\-fbadu77-intrinsics-disable\fR"
1700
1701 .IX Item "\fB\-fbadu77-intrinsics-enable\fR"
1702
1703 .IX Item "\fB\-ff2c-intrinsics-delete\fR"
1704
1705 .IX Item "\fB\-ff2c-intrinsics-hide\fR"
1706
1707 .IX Item "\fB\-ff2c-intrinsics-disable\fR"
1708
1709 .IX Item "\fB\-ff2c-intrinsics-enable\fR"
1710
1711 .IX Item "\fB\-ff90-intrinsics-delete\fR"
1712
1713 .IX Item "\fB\-ff90-intrinsics-hide\fR"
1714
1715 .IX Item "\fB\-ff90-intrinsics-disable\fR"
1716
1717 .IX Item "\fB\-ff90-intrinsics-enable\fR"
1718
1719 .IX Item "\fB\-fgnu-intrinsics-delete\fR"
1720
1721 .IX Item "\fB\-fgnu-intrinsics-hide\fR"
1722
1723 .IX Item "\fB\-fgnu-intrinsics-disable\fR"
1724
1725 .IX Item "\fB\-fgnu-intrinsics-enable\fR"
1726
1727 .IX Item "\fB\-fmil-intrinsics-delete\fR"
1728
1729 .IX Item "\fB\-fmil-intrinsics-hide\fR"
1730
1731 .IX Item "\fB\-fmil-intrinsics-disable\fR"
1732
1733 .IX Item "\fB\-fmil-intrinsics-enable\fR"
1734
1735 .IX Item "\fB\-funix-intrinsics-delete\fR"
1736
1737 .IX Item "\fB\-funix-intrinsics-hide\fR"
1738
1739 .IX Item "\fB\-funix-intrinsics-disable\fR"
1740
1741 .IX Item "\fB\-funix-intrinsics-enable\fR"
1742
1743 .IX Item "\fB\-fvxt-intrinsics-delete\fR"
1744
1745 .IX Item "\fB\-fvxt-intrinsics-hide\fR"
1746
1747 .IX Item "\fB\-fvxt-intrinsics-disable\fR"
1748
1749 .IX Item "\fB\-fvxt-intrinsics-enable\fR"
1750
1751 .IX Item "\fB\-ffixed-line-length-\fR\fIn\fR"
1752
1753 .IX Subsection "Options to Request or Suppress Warnings"
1754
1755 .IX Item "\fB\-fsyntax-only\fR"
1756
1757 .IX Item "\fB\-pedantic\fR"
1758
1759 .IX Item "\fB\-pedantic-errors\fR"
1760
1761 .IX Item "\fB\-fpedantic\fR"
1762
1763 .IX Item "\fB\-w\fR"
1764
1765 .IX Item "\fB\-Wno-globals\fR"
1766
1767 .IX Item "\fB\-Wimplicit\fR"
1768
1769 .IX Item "\fB\-Wunused\fR"
1770
1771 .IX Item "\fB\-Wuninitialized\fR"
1772
1773 .IX Item "\fB\-Wall\fR"
1774
1775 .IX Item "\fB\-Wsurprising\fR"
1776
1777 .IX Item "\(bu"
1778
1779 .IX Item "\(bu"
1780
1781 .IX Item "\(bu"
1782
1783 .IX Item "\fB\-Werror\fR"
1784
1785 .IX Item "\fB\-W\fR"
1786
1787 .IX Item "\(bu"
1788
1789 .IX Item "\(bu"
1790
1791 .IX Item "\fB\-Wcomment\fR"
1792
1793 .IX Item "\fB\-Wformat\fR"
1794
1795 .IX Item "\fB\-Wparentheses\fR"
1796
1797 .IX Item "\fB\-Wswitch\fR"
1798
1799 .IX Item "\fB\-Wswitch-default\fR"
1800
1801 .IX Item "\fB\-Wswitch-enum\fR"
1802
1803 .IX Item "\fB\-Wtraditional\fR"
1804
1805 .IX Item "\fB\-Wshadow\fR"
1806
1807 .IX Item "\fB\-Wid-clash-\fR\fIlen\fR"
1808
1809 .IX Item "\fB\-Wlarger-than-\fR\fIlen\fR"
1810
1811 .IX Item "\fB\-Wconversion\fR"
1812
1813 .IX Item "\fB\-Waggregate-return\fR"
1814
1815 .IX Item "\fB\-Wredundant-decls\fR"
1816
1817 .IX Subsection "Options for Debugging Your Program or \s-1GNU\s0 Fortran"
1818
1819 .IX Item "\fB\-g\fR"
1820
1821 .IX Subsection "Options That Control Optimization"
1822
1823 .IX Item "\fB\-malign-double\fR"
1824
1825 .IX Item "\fB\-ffloat-store\fR"
1826
1827 .IX Item "\fB\-fforce-mem\fR"
1828
1829 .IX Item "\fB\-fforce-addr\fR"
1830
1831 .IX Item "\fB\-fno-inline\fR"
1832
1833 .IX Item "\fB\-ffast-math\fR"
1834
1835 .IX Item "\fB\-funsafe-math-optimizations\fR"
1836
1837 .IX Item "\fB\-ffinite-math-only\fR"
1838
1839 .IX Item "\fB\-fno-trapping-math\fR"
1840
1841 .IX Item "\fB\-fstrength-reduce\fR"
1842
1843 .IX Item "\fB\-frerun-cse-after-loop\fR"
1844
1845 .IX Item "\fB\-fexpensive-optimizations\fR"
1846
1847 .IX Item "\fB\-fdelayed-branch\fR"
1848
1849 .IX Item "\fB\-fschedule-insns\fR"
1850
1851 .IX Item "\fB\-fschedule-insns2\fR"
1852
1853 .IX Item "\fB\-fcaller-saves\fR"
1854
1855 .IX Item "\fB\-funroll-loops\fR"
1856
1857 .IX Item "\fB\-funroll-all-loops\fR"
1858
1859 .IX Item "\fB\-fno-move-all-movables\fR"
1860
1861 .IX Item "\fB\-fno-reduce-all-givs\fR"
1862
1863 .IX Item "\fB\-fno-rerun-loop-opt\fR"
1864
1865 .IX Subsection "Options Controlling the Preprocessor"
1866
1867 .IX Subsection "Options for Directory Search"
1868
1869 .IX Item "\fB\-I-\fR"
1870
1871 .IX Item "\fB\-I\fR\fIdir\fR"
1872
1873 .IX Subsection "Options for Code Generation Conventions"
1874
1875 .IX Item "\fB\-fno-automatic\fR"
1876
1877 .IX Item "\fB\-finit-local-zero\fR"
1878
1879 .IX Item "\fB\-fno-f2c\fR"
1880
1881 .IX Item "\fB\-ff2c-library\fR"
1882
1883 .IX Item "\fB\-fno-underscoring\fR"
1884
1885 .IX Item "\fB\-fno-second-underscore\fR"
1886
1887 .IX Item "\fB\-fno-ident\fR"
1888
1889 .IX Item "\fB\-fzeros\fR"
1890
1891 .IX Item "\fB\-femulate-complex\fR"
1892
1893 .IX Item "\fB\-falias-check\fR"
1894
1895 .IX Item "\fB\-fargument-alias\fR"
1896
1897 .IX Item "\fB\-fargument-noalias\fR"
1898
1899 .IX Item "\fB\-fno-argument-noalias-global\fR"
1900
1901 .IX Item "\fB\-fno-globals\fR"
1902
1903 .IX Item "\fB\-fflatten-arrays\fR"
1904
1905 .IX Item "\fB\-fbounds-check\fR"
1906
1907 .IX Item "\fB\-ffortran-bounds-check\fR"
1908
1909 .IX Item "\fB\-fpcc-struct-return\fR"
1910
1911 .IX Item "\fB\-freg-struct-return\fR"
1912
1913 .IX Item "\fB\-fshort-double\fR"
1914
1915 .IX Item "\fB\-fno-common\fR"
1916
1917 .IX Item "\fB\-fpack-struct\fR"
1918
1919 .IX Header "ENVIRONMENT"
1920
1921 .IX Header "BUGS"
1922
1923 .IX Header "FOOTNOTES"
1924
1925 .IX Item "1."
1926
1927 .IX Header "SEE ALSO"
1928
1929 .IX Header "AUTHOR"
1930
1931 .IX Header "COPYRIGHT"
1932