aarch64-none-linux-gnu-gfortran.1 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744
  1. .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .if !\nF .nr F 0
  58. .if \nF>0 \{\
  59. . de IX
  60. . tm Index:\\$1\t\\n%\t"\\$2"
  61. ..
  62. . if !\nF==2 \{\
  63. . nr % 0
  64. . nr F 2
  65. . \}
  66. .\}
  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 "2021-06-21" "gcc-10.3.1" "GNU"
  133. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  134. .\" way too many mistakes in technical documents.
  135. .if n .ad l
  136. .nh
  137. .SH "NAME"
  138. gfortran \- GNU Fortran compiler
  139. .SH "SYNOPSIS"
  140. .IX Header "SYNOPSIS"
  141. gfortran [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR]
  142. [\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR]
  143. [\fB\-W\fR\fIwarn\fR...] [\fB\-pedantic\fR]
  144. [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...]
  145. [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
  146. [\fB\-f\fR\fIoption\fR...]
  147. [\fB\-m\fR\fImachine-option\fR...]
  148. [\fB\-o\fR \fIoutfile\fR] \fIinfile\fR...
  149. .PP
  150. Only the most useful options are listed here; see below for the
  151. remainder.
  152. .SH "DESCRIPTION"
  153. .IX Header "DESCRIPTION"
  154. The \fBgfortran\fR command supports all the options supported by the
  155. \&\fBgcc\fR command. Only options specific to \s-1GNU\s0 Fortran are documented
  156. here.
  157. .PP
  158. All \s-1GCC\s0 and \s-1GNU\s0 Fortran options
  159. are accepted both by \fBgfortran\fR and by \fBgcc\fR
  160. (as well as any other drivers built at the same time,
  161. such as \fBg++\fR),
  162. since adding \s-1GNU\s0 Fortran to the \s-1GCC\s0 distribution
  163. enables acceptance of \s-1GNU\s0 Fortran options
  164. by all of the relevant drivers.
  165. .PP
  166. In some cases, options have positive and negative forms;
  167. the negative form of \fB\-ffoo\fR would be \fB\-fno\-foo\fR.
  168. This manual documents only one of these two forms, whichever
  169. one is not the default.
  170. .SH "OPTIONS"
  171. .IX Header "OPTIONS"
  172. Here is a summary of all the options specific to \s-1GNU\s0 Fortran, grouped
  173. by type. Explanations are in the following sections.
  174. .IP "\fIFortran Language Options\fR" 4
  175. .IX Item "Fortran Language Options"
  176. \&\fB\-fall\-intrinsics \-fallow\-argument\-mismatch \-fallow\-invalid\-boz
  177. \&\-fbackslash \-fcray\-pointer \-fd\-lines\-as\-code \-fd\-lines\-as\-comments
  178. \&\-fdec \-fdec\-char\-conversions \-fdec\-structure \-fdec\-intrinsic\-ints
  179. \&\-fdec\-static \-fdec\-math \-fdec\-include \-fdec\-format\-defaults
  180. \&\-fdec\-blank\-format\-item \-fdefault\-double\-8 \-fdefault\-integer\-8
  181. \&\-fdefault\-real\-8 \-fdefault\-real\-10 \-fdefault\-real\-16 \-fdollar\-ok
  182. \&\-ffixed\-line\-length\-\fR\fIn\fR \fB\-ffixed\-line\-length\-none \-fpad\-source
  183. \&\-ffree\-form \-ffree\-line\-length\-\fR\fIn\fR \fB\-ffree\-line\-length\-none
  184. \&\-fimplicit\-none \-finteger\-4\-integer\-8 \-fmax\-identifier\-length
  185. \&\-fmodule\-private \-ffixed\-form \-fno\-range\-check \-fopenacc \-fopenmp
  186. \&\-freal\-4\-real\-10 \-freal\-4\-real\-16 \-freal\-4\-real\-8 \-freal\-8\-real\-10
  187. \&\-freal\-8\-real\-16 \-freal\-8\-real\-4 \-std=\fR\fIstd\fR \fB\-ftest\-forall\-temp\fR
  188. .IP "\fIPreprocessing Options\fR" 4
  189. .IX Item "Preprocessing Options"
  190. \&\fB\-A\-\fR\fIquestion\fR[\fB=\fR\fIanswer\fR]
  191. \&\fB\-A\fR\fIquestion\fR\fB=\fR\fIanswer\fR \fB\-C \-CC \-D\fR\fImacro\fR[\fB=\fR\fIdefn\fR]
  192. \&\fB\-H \-P
  193. \&\-U\fR\fImacro\fR \fB\-cpp \-dD \-dI \-dM \-dN \-dU \-fworking\-directory
  194. \&\-imultilib\fR \fIdir\fR
  195. \&\fB\-iprefix\fR \fIfile\fR \fB\-iquote \-isysroot\fR \fIdir\fR \fB\-isystem\fR \fIdir\fR \fB\-nocpp
  196. \&\-nostdinc
  197. \&\-undef\fR
  198. .IP "\fIError and Warning Options\fR" 4
  199. .IX Item "Error and Warning Options"
  200. \&\fB\-Waliasing \-Wall \-Wampersand \-Warray\-bounds
  201. \&\-Wc\-binding\-type \-Wcharacter\-truncation \-Wconversion
  202. \&\-Wdo\-subscript \-Wfunction\-elimination \-Wimplicit\-interface
  203. \&\-Wimplicit\-procedure \-Wintrinsic\-shadow \-Wuse\-without\-only
  204. \&\-Wintrinsics\-std \-Wline\-truncation \-Wno\-align\-commons
  205. \&\-Wno\-overwrite\-recursive \-Wno\-tabs \-Wreal\-q\-constant \-Wsurprising
  206. \&\-Wunderflow \-Wunused\-parameter \-Wrealloc\-lhs \-Wrealloc\-lhs\-all
  207. \&\-Wfrontend\-loop\-interchange \-Wtarget\-lifetime \-fmax\-errors=\fR\fIn\fR
  208. \&\fB\-fsyntax\-only \-pedantic
  209. \&\-pedantic\-errors\fR
  210. .IP "\fIDebugging Options\fR" 4
  211. .IX Item "Debugging Options"
  212. \&\fB\-fbacktrace \-fdump\-fortran\-optimized \-fdump\-fortran\-original
  213. \&\-fdump\-fortran\-global \-fdump\-parse\-tree \-ffpe\-trap=\fR\fIlist\fR
  214. \&\fB\-ffpe\-summary=\fR\fIlist\fR\fB \fR
  215. .IP "\fIDirectory Options\fR" 4
  216. .IX Item "Directory Options"
  217. \&\fB\-I\fR\fIdir\fR \fB\-J\fR\fIdir\fR \fB\-fintrinsic\-modules\-path\fR \fIdir\fR
  218. .IP "\fILink Options\fR" 4
  219. .IX Item "Link Options"
  220. \&\fB\-static\-libgfortran\fR
  221. .IP "\fIRuntime Options\fR" 4
  222. .IX Item "Runtime Options"
  223. \&\fB\-fconvert=\fR\fIconversion\fR \fB\-fmax\-subrecord\-length=\fR\fIlength\fR
  224. \&\fB\-frecord\-marker=\fR\fIlength\fR \fB\-fsign\-zero\fR
  225. .IP "\fIInteroperability Options\fR" 4
  226. .IX Item "Interoperability Options"
  227. \&\fB\-fc\-prototypes \-fc\-prototypes\-external\fR
  228. .IP "\fICode Generation Options\fR" 4
  229. .IX Item "Code Generation Options"
  230. \&\fB\-faggressive\-function\-elimination \-fblas\-matmul\-limit=\fR\fIn\fR
  231. \&\fB\-fbounds\-check \-ftail\-call\-workaround \-ftail\-call\-workaround=\fR\fIn\fR
  232. \&\fB\-fcheck\-array\-temporaries
  233. \&\-fcheck=\fR\fI<all|array\-temps|bits|bounds|do|mem|pointer|recursion>\fR
  234. \&\fB\-fcoarray=\fR\fI<none|single|lib>\fR \fB\-fexternal\-blas \-ff2c
  235. \&\-ffrontend\-loop\-interchange \-ffrontend\-optimize
  236. \&\-finit\-character=\fR\fIn\fR \fB\-finit\-integer=\fR\fIn\fR \fB\-finit\-local\-zero
  237. \&\-finit\-derived \-finit\-logical=\fR\fI<true|false>\fR
  238. \&\fB\-finit\-real=\fR\fI<zero|inf|\-inf|nan|snan>\fR
  239. \&\fB\-finline\-matmul\-limit=\fR\fIn\fR
  240. \&\fB\-finline\-arg\-packing \-fmax\-array\-constructor=\fR\fIn\fR
  241. \&\fB\-fmax\-stack\-var\-size=\fR\fIn\fR \fB\-fno\-align\-commons \-fno\-automatic
  242. \&\-fno\-protect\-parens \-fno\-underscoring \-fsecond\-underscore
  243. \&\-fpack\-derived \-frealloc\-lhs \-frecursive \-frepack\-arrays
  244. \&\-fshort\-enums \-fstack\-arrays\fR
  245. .SS "Options controlling Fortran dialect"
  246. .IX Subsection "Options controlling Fortran dialect"
  247. The following options control the details of the Fortran dialect
  248. accepted by the compiler:
  249. .IP "\fB\-ffree\-form\fR" 4
  250. .IX Item "-ffree-form"
  251. .PD 0
  252. .IP "\fB\-ffixed\-form\fR" 4
  253. .IX Item "-ffixed-form"
  254. .PD
  255. Specify the layout used by the source file. The free form layout
  256. was introduced in Fortran 90. Fixed form was traditionally used in
  257. older Fortran programs. When neither option is specified, the source
  258. form is determined by the file extension.
  259. .IP "\fB\-fall\-intrinsics\fR" 4
  260. .IX Item "-fall-intrinsics"
  261. This option causes all intrinsic procedures (including the GNU-specific
  262. extensions) to be accepted. This can be useful with \fB\-std=f95\fR to
  263. force standard-compliance but get access to the full range of intrinsics
  264. available with \fBgfortran\fR. As a consequence, \fB\-Wintrinsics\-std\fR
  265. will be ignored and no user-defined procedure with the same name as any
  266. intrinsic will be called except when it is explicitly declared \f(CW\*(C`EXTERNAL\*(C'\fR.
  267. .IP "\fB\-fallow\-argument\-mismatch\fR" 4
  268. .IX Item "-fallow-argument-mismatch"
  269. Some code contains calls to external procedures whith mismatches
  270. between the calls and the procedure definition, or with mismatches
  271. between different calls. Such code is non-conforming, and will usually
  272. be flagged wi1th an error. This options degrades the error to a
  273. warning, which can only be disabled by disabling all warnings vial
  274. \&\fB\-w\fR. Only a single occurrence per argument is flagged by this
  275. warning. \fB\-fallow\-argument\-mismatch\fR is implied by
  276. \&\fB\-std=legacy\fR.
  277. .Sp
  278. Using this option is \fIstrongly\fR discouraged. It is possible to
  279. provide standard-conforming code which allows different types of
  280. arguments by using an explicit interface and \f(CWTYPE(*)\fR.
  281. .IP "\fB\-fallow\-invalid\-boz\fR" 4
  282. .IX Item "-fallow-invalid-boz"
  283. A \s-1BOZ\s0 literal constant can occur in a limited number of contexts in
  284. standard conforming Fortran. This option degrades an error condition
  285. to a warning, and allows a \s-1BOZ\s0 literal constant to appear where the
  286. Fortran standard would otherwise prohibit its use.
  287. .IP "\fB\-fd\-lines\-as\-code\fR" 4
  288. .IX Item "-fd-lines-as-code"
  289. .PD 0
  290. .IP "\fB\-fd\-lines\-as\-comments\fR" 4
  291. .IX Item "-fd-lines-as-comments"
  292. .PD
  293. Enable special treatment for lines beginning with \f(CW\*(C`d\*(C'\fR or \f(CW\*(C`D\*(C'\fR
  294. in fixed form sources. If the \fB\-fd\-lines\-as\-code\fR option is
  295. given they are treated as if the first column contained a blank. If the
  296. \&\fB\-fd\-lines\-as\-comments\fR option is given, they are treated as
  297. comment lines.
  298. .IP "\fB\-fdec\fR" 4
  299. .IX Item "-fdec"
  300. \&\s-1DEC\s0 compatibility mode. Enables extensions and other features that mimic
  301. the default behavior of older compilers (such as \s-1DEC\s0).
  302. These features are non-standard and should be avoided at all costs.
  303. For details on \s-1GNU\s0 Fortran's implementation of these extensions see the
  304. full documentation.
  305. .Sp
  306. Other flags enabled by this switch are:
  307. \&\fB\-fdollar\-ok\fR \fB\-fcray\-pointer\fR \fB\-fdec\-char\-conversions\fR
  308. \&\fB\-fdec\-structure\fR \fB\-fdec\-intrinsic\-ints\fR \fB\-fdec\-static\fR
  309. \&\fB\-fdec\-math\fR \fB\-fdec\-include\fR \fB\-fdec\-blank\-format\-item\fR
  310. \&\fB\-fdec\-format\-defaults\fR
  311. .Sp
  312. If \fB\-fd\-lines\-as\-code\fR/\fB\-fd\-lines\-as\-comments\fR are unset, then
  313. \&\fB\-fdec\fR also sets \fB\-fd\-lines\-as\-comments\fR.
  314. .IP "\fB\-fdec\-char\-conversions\fR" 4
  315. .IX Item "-fdec-char-conversions"
  316. Enable the use of character literals in assignments and \f(CW\*(C`DATA\*(C'\fR statements
  317. for non-character variables.
  318. .IP "\fB\-fdec\-structure\fR" 4
  319. .IX Item "-fdec-structure"
  320. Enable \s-1DEC\s0 \f(CW\*(C`STRUCTURE\*(C'\fR and \f(CW\*(C`RECORD\*(C'\fR as well as \f(CW\*(C`UNION\*(C'\fR,
  321. \&\f(CW\*(C`MAP\*(C'\fR, and dot ('.') as a member separator (in addition to '%'). This is
  322. provided for compatibility only; Fortran 90 derived types should be used
  323. instead where possible.
  324. .IP "\fB\-fdec\-intrinsic\-ints\fR" 4
  325. .IX Item "-fdec-intrinsic-ints"
  326. Enable B/I/J/K kind variants of existing integer functions (e.g. \s-1BIAND, IIAND,
  327. JIAND,\s0 etc...). For a complete list of intrinsics see the full documentation.
  328. .IP "\fB\-fdec\-math\fR" 4
  329. .IX Item "-fdec-math"
  330. Enable legacy math intrinsics such as \s-1COTAN\s0 and degree-valued trigonometric
  331. functions (e.g. \s-1TAND, ATAND,\s0 etc...) for compatability with older code.
  332. .IP "\fB\-fdec\-static\fR" 4
  333. .IX Item "-fdec-static"
  334. Enable DEC-style \s-1STATIC\s0 and \s-1AUTOMATIC\s0 attributes to explicitly specify
  335. the storage of variables and other objects.
  336. .IP "\fB\-fdec\-include\fR" 4
  337. .IX Item "-fdec-include"
  338. Enable parsing of \s-1INCLUDE\s0 as a statement in addition to parsing it as
  339. \&\s-1INCLUDE\s0 line. When parsed as \s-1INCLUDE\s0 statement, \s-1INCLUDE\s0 does not have to
  340. be on a single line and can use line continuations.
  341. .IP "\fB\-fdec\-format\-defaults\fR" 4
  342. .IX Item "-fdec-format-defaults"
  343. Enable format specifiers F, G and I to be used without width specifiers,
  344. default widths will be used instead.
  345. .IP "\fB\-fdec\-blank\-format\-item\fR" 4
  346. .IX Item "-fdec-blank-format-item"
  347. Enable a blank format item at the end of a format specification i.e. nothing
  348. following the final comma.
  349. .IP "\fB\-fdollar\-ok\fR" 4
  350. .IX Item "-fdollar-ok"
  351. Allow \fB$\fR as a valid non-first character in a symbol name. Symbols
  352. that start with \fB$\fR are rejected since it is unclear which rules to
  353. apply to implicit typing as different vendors implement different rules.
  354. Using \fB$\fR in \f(CW\*(C`IMPLICIT\*(C'\fR statements is also rejected.
  355. .IP "\fB\-fbackslash\fR" 4
  356. .IX Item "-fbackslash"
  357. Change the interpretation of backslashes in string literals from a single
  358. backslash character to \*(L"C\-style\*(R" escape characters. The following
  359. combinations are expanded \f(CW\*(C`\ea\*(C'\fR, \f(CW\*(C`\eb\*(C'\fR, \f(CW\*(C`\ef\*(C'\fR, \f(CW\*(C`\en\*(C'\fR,
  360. \&\f(CW\*(C`\er\*(C'\fR, \f(CW\*(C`\et\*(C'\fR, \f(CW\*(C`\ev\*(C'\fR, \f(CW\*(C`\e\e\*(C'\fR, and \f(CW\*(C`\e0\*(C'\fR to the \s-1ASCII\s0
  361. characters alert, backspace, form feed, newline, carriage return,
  362. horizontal tab, vertical tab, backslash, and \s-1NUL,\s0 respectively.
  363. Additionally, \f(CW\*(C`\ex\*(C'\fR\fInn\fR, \f(CW\*(C`\eu\*(C'\fR\fInnnn\fR and
  364. \&\f(CW\*(C`\eU\*(C'\fR\fInnnnnnnn\fR (where each \fIn\fR is a hexadecimal digit) are
  365. translated into the Unicode characters corresponding to the specified code
  366. points. All other combinations of a character preceded by \e are
  367. unexpanded.
  368. .IP "\fB\-fmodule\-private\fR" 4
  369. .IX Item "-fmodule-private"
  370. Set the default accessibility of module entities to \f(CW\*(C`PRIVATE\*(C'\fR.
  371. Use-associated entities will not be accessible unless they are explicitly
  372. declared as \f(CW\*(C`PUBLIC\*(C'\fR.
  373. .IP "\fB\-ffixed\-line\-length\-\fR\fIn\fR" 4
  374. .IX Item "-ffixed-line-length-n"
  375. Set column after which characters are ignored in typical fixed-form
  376. lines in the source file, and, unless \f(CW\*(C`\-fno\-pad\-source\*(C'\fR, through which
  377. spaces are assumed (as if padded to that length) after the ends of short
  378. fixed-form lines.
  379. .Sp
  380. Popular values for \fIn\fR include 72 (the
  381. standard and the default), 80 (card image), and 132 (corresponding
  382. to \*(L"extended-source\*(R" options in some popular compilers).
  383. \&\fIn\fR may also be \fBnone\fR, meaning that the entire line is meaningful
  384. and that continued character constants never have implicit spaces appended
  385. to them to fill out the line.
  386. \&\fB\-ffixed\-line\-length\-0\fR means the same thing as
  387. \&\fB\-ffixed\-line\-length\-none\fR.
  388. .IP "\fB\-fno\-pad\-source\fR" 4
  389. .IX Item "-fno-pad-source"
  390. By default fixed-form lines have spaces assumed (as if padded to that length)
  391. after the ends of short fixed-form lines. This is not done either if
  392. \&\fB\-ffixed\-line\-length\-0\fR, \fB\-ffixed\-line\-length\-none\fR or
  393. if \fB\-fno\-pad\-source\fR option is used. With any of those options
  394. continued character constants never have implicit spaces appended
  395. to them to fill out the line.
  396. .IP "\fB\-ffree\-line\-length\-\fR\fIn\fR" 4
  397. .IX Item "-ffree-line-length-n"
  398. Set column after which characters are ignored in typical free-form
  399. lines in the source file. The default value is 132.
  400. \&\fIn\fR may be \fBnone\fR, meaning that the entire line is meaningful.
  401. \&\fB\-ffree\-line\-length\-0\fR means the same thing as
  402. \&\fB\-ffree\-line\-length\-none\fR.
  403. .IP "\fB\-fmax\-identifier\-length=\fR\fIn\fR" 4
  404. .IX Item "-fmax-identifier-length=n"
  405. Specify the maximum allowed identifier length. Typical values are
  406. 31 (Fortran 95) and 63 (Fortran 2003 and Fortran 2008).
  407. .IP "\fB\-fimplicit\-none\fR" 4
  408. .IX Item "-fimplicit-none"
  409. Specify that no implicit typing is allowed, unless overridden by explicit
  410. \&\f(CW\*(C`IMPLICIT\*(C'\fR statements. This is the equivalent of adding
  411. \&\f(CW\*(C`implicit none\*(C'\fR to the start of every procedure.
  412. .IP "\fB\-fcray\-pointer\fR" 4
  413. .IX Item "-fcray-pointer"
  414. Enable the Cray pointer extension, which provides C\-like pointer
  415. functionality.
  416. .IP "\fB\-fopenacc\fR" 4
  417. .IX Item "-fopenacc"
  418. Enable the OpenACC extensions. This includes OpenACC \f(CW\*(C`!$acc\*(C'\fR
  419. directives in free form and \f(CW\*(C`c$acc\*(C'\fR, \f(CW*$acc\fR and
  420. \&\f(CW\*(C`!$acc\*(C'\fR directives in fixed form, \f(CW\*(C`!$\*(C'\fR conditional
  421. compilation sentinels in free form and \f(CW\*(C`c$\*(C'\fR, \f(CW\*(C`*$\*(C'\fR and
  422. \&\f(CW\*(C`!$\*(C'\fR sentinels in fixed form, and when linking arranges for the
  423. OpenACC runtime library to be linked in.
  424. .IP "\fB\-fopenmp\fR" 4
  425. .IX Item "-fopenmp"
  426. Enable the OpenMP extensions. This includes OpenMP \f(CW\*(C`!$omp\*(C'\fR directives
  427. in free form
  428. and \f(CW\*(C`c$omp\*(C'\fR, \f(CW*$omp\fR and \f(CW\*(C`!$omp\*(C'\fR directives in fixed form,
  429. \&\f(CW\*(C`!$\*(C'\fR conditional compilation sentinels in free form
  430. and \f(CW\*(C`c$\*(C'\fR, \f(CW\*(C`*$\*(C'\fR and \f(CW\*(C`!$\*(C'\fR sentinels in fixed form,
  431. and when linking arranges for the OpenMP runtime library to be linked
  432. in. The option \fB\-fopenmp\fR implies \fB\-frecursive\fR.
  433. .IP "\fB\-fno\-range\-check\fR" 4
  434. .IX Item "-fno-range-check"
  435. Disable range checking on results of simplification of constant
  436. expressions during compilation. For example, \s-1GNU\s0 Fortran will give
  437. an error at compile time when simplifying \f(CW\*(C`a = 1. / 0\*(C'\fR.
  438. With this option, no error will be given and \f(CW\*(C`a\*(C'\fR will be assigned
  439. the value \f(CW\*(C`+Infinity\*(C'\fR. If an expression evaluates to a value
  440. outside of the relevant range of [\f(CW\*(C`\-HUGE()\*(C'\fR:\f(CW\*(C`HUGE()\*(C'\fR],
  441. then the expression will be replaced by \f(CW\*(C`\-Inf\*(C'\fR or \f(CW\*(C`+Inf\*(C'\fR
  442. as appropriate.
  443. Similarly, \f(CW\*(C`DATA i/Z\*(AqFFFFFFFF\*(Aq/\*(C'\fR will result in an integer overflow
  444. on most systems, but with \fB\-fno\-range\-check\fR the value will
  445. \&\*(L"wrap around\*(R" and \f(CW\*(C`i\*(C'\fR will be initialized to \-1 instead.
  446. .IP "\fB\-fdefault\-integer\-8\fR" 4
  447. .IX Item "-fdefault-integer-8"
  448. Set the default integer and logical types to an 8 byte wide type. This option
  449. also affects the kind of integer constants like \f(CW42\fR. Unlike
  450. \&\fB\-finteger\-4\-integer\-8\fR, it does not promote variables with explicit
  451. kind declaration.
  452. .IP "\fB\-fdefault\-real\-8\fR" 4
  453. .IX Item "-fdefault-real-8"
  454. Set the default real type to an 8 byte wide type. This option also affects
  455. the kind of non-double real constants like \f(CW1.0\fR. This option promotes
  456. the default width of \f(CW\*(C`DOUBLE PRECISION\*(C'\fR and double real constants
  457. like \f(CW\*(C`1.d0\*(C'\fR to 16 bytes if possible. If \f(CW\*(C`\-fdefault\-double\-8\*(C'\fR
  458. is given along with \f(CW\*(C`fdefault\-real\-8\*(C'\fR, \f(CW\*(C`DOUBLE PRECISION\*(C'\fR
  459. and double real constants are not promoted. Unlike \fB\-freal\-4\-real\-8\fR,
  460. \&\f(CW\*(C`fdefault\-real\-8\*(C'\fR does not promote variables with explicit kind
  461. declarations.
  462. .IP "\fB\-fdefault\-real\-10\fR" 4
  463. .IX Item "-fdefault-real-10"
  464. Set the default real type to an 10 byte wide type. This option also affects
  465. the kind of non-double real constants like \f(CW1.0\fR. This option promotes
  466. the default width of \f(CW\*(C`DOUBLE PRECISION\*(C'\fR and double real constants
  467. like \f(CW\*(C`1.d0\*(C'\fR to 16 bytes if possible. If \f(CW\*(C`\-fdefault\-double\-8\*(C'\fR
  468. is given along with \f(CW\*(C`fdefault\-real\-10\*(C'\fR, \f(CW\*(C`DOUBLE PRECISION\*(C'\fR
  469. and double real constants are not promoted. Unlike \fB\-freal\-4\-real\-10\fR,
  470. \&\f(CW\*(C`fdefault\-real\-10\*(C'\fR does not promote variables with explicit kind
  471. declarations.
  472. .IP "\fB\-fdefault\-real\-16\fR" 4
  473. .IX Item "-fdefault-real-16"
  474. Set the default real type to an 16 byte wide type. This option also affects
  475. the kind of non-double real constants like \f(CW1.0\fR. This option promotes
  476. the default width of \f(CW\*(C`DOUBLE PRECISION\*(C'\fR and double real constants
  477. like \f(CW\*(C`1.d0\*(C'\fR to 16 bytes if possible. If \f(CW\*(C`\-fdefault\-double\-8\*(C'\fR
  478. is given along with \f(CW\*(C`fdefault\-real\-16\*(C'\fR, \f(CW\*(C`DOUBLE PRECISION\*(C'\fR
  479. and double real constants are not promoted. Unlike \fB\-freal\-4\-real\-16\fR,
  480. \&\f(CW\*(C`fdefault\-real\-16\*(C'\fR does not promote variables with explicit kind
  481. declarations.
  482. .IP "\fB\-fdefault\-double\-8\fR" 4
  483. .IX Item "-fdefault-double-8"
  484. Set the \f(CW\*(C`DOUBLE PRECISION\*(C'\fR type and double real constants
  485. like \f(CW\*(C`1.d0\*(C'\fR to an 8 byte wide type. Do nothing if this
  486. is already the default. This option prevents \fB\-fdefault\-real\-8\fR,
  487. \&\fB\-fdefault\-real\-10\fR, and \fB\-fdefault\-real\-16\fR,
  488. from promoting \f(CW\*(C`DOUBLE PRECISION\*(C'\fR and double real constants like
  489. \&\f(CW\*(C`1.d0\*(C'\fR to 16 bytes.
  490. .IP "\fB\-finteger\-4\-integer\-8\fR" 4
  491. .IX Item "-finteger-4-integer-8"
  492. Promote all \f(CW\*(C`INTEGER(KIND=4)\*(C'\fR entities to an \f(CW\*(C`INTEGER(KIND=8)\*(C'\fR
  493. entities. If \f(CW\*(C`KIND=8\*(C'\fR is unavailable, then an error will be issued.
  494. This option should be used with care and may not be suitable for your codes.
  495. Areas of possible concern include calls to external procedures,
  496. alignment in \f(CW\*(C`EQUIVALENCE\*(C'\fR and/or \f(CW\*(C`COMMON\*(C'\fR, generic interfaces,
  497. \&\s-1BOZ\s0 literal constant conversion, and I/O. Inspection of the intermediate
  498. representation of the translated Fortran code, produced by
  499. \&\fB\-fdump\-tree\-original\fR, is suggested.
  500. .IP "\fB\-freal\-4\-real\-8\fR" 4
  501. .IX Item "-freal-4-real-8"
  502. .PD 0
  503. .IP "\fB\-freal\-4\-real\-10\fR" 4
  504. .IX Item "-freal-4-real-10"
  505. .IP "\fB\-freal\-4\-real\-16\fR" 4
  506. .IX Item "-freal-4-real-16"
  507. .IP "\fB\-freal\-8\-real\-4\fR" 4
  508. .IX Item "-freal-8-real-4"
  509. .IP "\fB\-freal\-8\-real\-10\fR" 4
  510. .IX Item "-freal-8-real-10"
  511. .IP "\fB\-freal\-8\-real\-16\fR" 4
  512. .IX Item "-freal-8-real-16"
  513. .PD
  514. Promote all \f(CW\*(C`REAL(KIND=M)\*(C'\fR entities to \f(CW\*(C`REAL(KIND=N)\*(C'\fR entities.
  515. If \f(CW\*(C`REAL(KIND=N)\*(C'\fR is unavailable, then an error will be issued.
  516. All other real kind types are unaffected by this option.
  517. These options should be used with care and may not be suitable for your
  518. codes. Areas of possible concern include calls to external procedures,
  519. alignment in \f(CW\*(C`EQUIVALENCE\*(C'\fR and/or \f(CW\*(C`COMMON\*(C'\fR, generic interfaces,
  520. \&\s-1BOZ\s0 literal constant conversion, and I/O. Inspection of the intermediate
  521. representation of the translated Fortran code, produced by
  522. \&\fB\-fdump\-tree\-original\fR, is suggested.
  523. .IP "\fB\-std=\fR\fIstd\fR" 4
  524. .IX Item "-std=std"
  525. Specify the standard to which the program is expected to conform,
  526. which may be one of \fBf95\fR, \fBf2003\fR, \fBf2008\fR,
  527. \&\fBf2018\fR, \fBgnu\fR, or \fBlegacy\fR. The default value for
  528. \&\fIstd\fR is \fBgnu\fR, which specifies a superset of the latest
  529. Fortran standard that includes all of the extensions supported by \s-1GNU\s0
  530. Fortran, although warnings will be given for obsolete extensions not
  531. recommended for use in new code. The \fBlegacy\fR value is
  532. equivalent but without the warnings for obsolete extensions, and may
  533. be useful for old non-standard programs. The \fBf95\fR,
  534. \&\fBf2003\fR, \fBf2008\fR, and \fBf2018\fR values specify strict
  535. conformance to the Fortran 95, Fortran 2003, Fortran 2008 and Fortran
  536. 2018 standards, respectively; errors are given for all extensions
  537. beyond the relevant language standard, and warnings are given for the
  538. Fortran 77 features that are permitted but obsolescent in later
  539. standards. The deprecated option \fB\-std=f2008ts\fR acts as an alias for
  540. \&\fB\-std=f2018\fR. It is only present for backwards compatibility with
  541. earlier gfortran versions and should not be used any more.
  542. .IP "\fB\-ftest\-forall\-temp\fR" 4
  543. .IX Item "-ftest-forall-temp"
  544. Enhance test coverage by forcing most forall assignments to use temporary.
  545. .SS "Enable and customize preprocessing"
  546. .IX Subsection "Enable and customize preprocessing"
  547. Preprocessor related options. See section
  548. \&\fBPreprocessing and conditional compilation\fR for more detailed
  549. information on preprocessing in \fBgfortran\fR.
  550. .IP "\fB\-cpp\fR" 4
  551. .IX Item "-cpp"
  552. .PD 0
  553. .IP "\fB\-nocpp\fR" 4
  554. .IX Item "-nocpp"
  555. .PD
  556. Enable preprocessing. The preprocessor is automatically invoked if
  557. the file extension is \fI.fpp\fR, \fI.FPP\fR, \fI.F\fR, \fI.FOR\fR,
  558. \&\fI.FTN\fR, \fI.F90\fR, \fI.F95\fR, \fI.F03\fR or \fI.F08\fR. Use
  559. this option to manually enable preprocessing of any kind of Fortran file.
  560. .Sp
  561. To disable preprocessing of files with any of the above listed extensions,
  562. use the negative form: \fB\-nocpp\fR.
  563. .Sp
  564. The preprocessor is run in traditional mode. Any restrictions of the
  565. file-format, especially the limits on line length, apply for
  566. preprocessed output as well, so it might be advisable to use the
  567. \&\fB\-ffree\-line\-length\-none\fR or \fB\-ffixed\-line\-length\-none\fR
  568. options.
  569. .IP "\fB\-dM\fR" 4
  570. .IX Item "-dM"
  571. Instead of the normal output, generate a list of \f(CW\*(Aq#define\*(Aq\fR
  572. directives for all the macros defined during the execution of the
  573. preprocessor, including predefined macros. This gives you a way
  574. of finding out what is predefined in your version of the preprocessor.
  575. Assuming you have no file \fIfoo.f90\fR, the command
  576. .Sp
  577. .Vb 1
  578. \& touch foo.f90; gfortran \-cpp \-E \-dM foo.f90
  579. .Ve
  580. .Sp
  581. will show all the predefined macros.
  582. .IP "\fB\-dD\fR" 4
  583. .IX Item "-dD"
  584. Like \fB\-dM\fR except in two respects: it does not include the
  585. predefined macros, and it outputs both the \f(CW\*(C`#define\*(C'\fR directives
  586. and the result of preprocessing. Both kinds of output go to the
  587. standard output file.
  588. .IP "\fB\-dN\fR" 4
  589. .IX Item "-dN"
  590. Like \fB\-dD\fR, but emit only the macro names, not their expansions.
  591. .IP "\fB\-dU\fR" 4
  592. .IX Item "-dU"
  593. Like \fBdD\fR except that only macros that are expanded, or whose
  594. definedness is tested in preprocessor directives, are output; the
  595. output is delayed until the use or test of the macro; and \f(CW\*(Aq#undef\*(Aq\fR
  596. directives are also output for macros tested but undefined at the time.
  597. .IP "\fB\-dI\fR" 4
  598. .IX Item "-dI"
  599. Output \f(CW\*(Aq#include\*(Aq\fR directives in addition to the result
  600. of preprocessing.
  601. .IP "\fB\-fworking\-directory\fR" 4
  602. .IX Item "-fworking-directory"
  603. Enable generation of linemarkers in the preprocessor output that will
  604. let the compiler know the current working directory at the time of
  605. preprocessing. When this option is enabled, the preprocessor will emit,
  606. after the initial linemarker, a second linemarker with the current
  607. working directory followed by two slashes. \s-1GCC\s0 will use this directory,
  608. when it is present in the preprocessed input, as the directory emitted
  609. as the current working directory in some debugging information formats.
  610. This option is implicitly enabled if debugging information is enabled,
  611. but this can be inhibited with the negated form
  612. \&\fB\-fno\-working\-directory\fR. If the \fB\-P\fR flag is present
  613. in the command line, this option has no effect, since no \f(CW\*(C`#line\*(C'\fR
  614. directives are emitted whatsoever.
  615. .IP "\fB\-idirafter\fR \fIdir\fR" 4
  616. .IX Item "-idirafter dir"
  617. Search \fIdir\fR for include files, but do it after all directories
  618. specified with \fB\-I\fR and the standard system directories have
  619. been exhausted. \fIdir\fR is treated as a system include directory.
  620. If dir begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced by
  621. the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
  622. .IP "\fB\-imultilib\fR \fIdir\fR" 4
  623. .IX Item "-imultilib dir"
  624. Use \fIdir\fR as a subdirectory of the directory containing target-specific
  625. \&\*(C+ headers.
  626. .IP "\fB\-iprefix\fR \fIprefix\fR" 4
  627. .IX Item "-iprefix prefix"
  628. Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR
  629. options. If the \fIprefix\fR represents a directory, you should include
  630. the final \f(CW\*(Aq/\*(Aq\fR.
  631. .IP "\fB\-isysroot\fR \fIdir\fR" 4
  632. .IX Item "-isysroot dir"
  633. This option is like the \fB\-\-sysroot\fR option, but applies only to
  634. header files. See the \fB\-\-sysroot\fR option for more information.
  635. .IP "\fB\-iquote\fR \fIdir\fR" 4
  636. .IX Item "-iquote dir"
  637. Search \fIdir\fR only for header files requested with \f(CW\*(C`#include "file"\*(C'\fR;
  638. they are not searched for \f(CW\*(C`#include <file>\*(C'\fR, before all directories
  639. specified by \fB\-I\fR and before the standard system directories. If
  640. \&\fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced by the
  641. sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
  642. .IP "\fB\-isystem\fR \fIdir\fR" 4
  643. .IX Item "-isystem dir"
  644. Search \fIdir\fR for header files, after all directories specified by
  645. \&\fB\-I\fR but before the standard system directories. Mark it as a
  646. system directory, so that it gets the same special treatment as is
  647. applied to the standard system directories. If \fIdir\fR begins with
  648. \&\f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced by the sysroot prefix;
  649. see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
  650. .IP "\fB\-nostdinc\fR" 4
  651. .IX Item "-nostdinc"
  652. Do not search the standard system directories for header files. Only
  653. the directories you have specified with \fB\-I\fR options (and the
  654. directory of the current file, if appropriate) are searched.
  655. .IP "\fB\-undef\fR" 4
  656. .IX Item "-undef"
  657. Do not predefine any system-specific or GCC-specific macros.
  658. The standard predefined macros remain defined.
  659. .IP "\fB\-A\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4
  660. .IX Item "-Apredicate=answer"
  661. Make an assertion with the predicate \fIpredicate\fR and answer \fIanswer\fR.
  662. This form is preferred to the older form \-A predicate(answer), which is still
  663. supported, because it does not use shell special characters.
  664. .IP "\fB\-A\-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4
  665. .IX Item "-A-predicate=answer"
  666. Cancel an assertion with the predicate \fIpredicate\fR and answer \fIanswer\fR.
  667. .IP "\fB\-C\fR" 4
  668. .IX Item "-C"
  669. Do not discard comments. All comments are passed through to the output
  670. file, except for comments in processed directives, which are deleted
  671. along with the directive.
  672. .Sp
  673. You should be prepared for side effects when using \fB\-C\fR; it causes
  674. the preprocessor to treat comments as tokens in their own right. For example,
  675. comments appearing at the start of what would be a directive line have the
  676. effect of turning that line into an ordinary source line, since the first
  677. token on the line is no longer a \f(CW\*(Aq#\*(Aq\fR.
  678. .Sp
  679. Warning: this currently handles C\-Style comments only. The preprocessor
  680. does not yet recognize Fortran-style comments.
  681. .IP "\fB\-CC\fR" 4
  682. .IX Item "-CC"
  683. Do not discard comments, including during macro expansion. This is like
  684. \&\fB\-C\fR, except that comments contained within macros are also passed
  685. through to the output file where the macro is expanded.
  686. .Sp
  687. In addition to the side-effects of the \fB\-C\fR option, the \fB\-CC\fR
  688. option causes all \*(C+\-style comments inside a macro to be converted to C\-style
  689. comments. This is to prevent later use of that macro from inadvertently
  690. commenting out the remainder of the source line. The \fB\-CC\fR option
  691. is generally used to support lint comments.
  692. .Sp
  693. Warning: this currently handles C\- and \*(C+\-Style comments only. The
  694. preprocessor does not yet recognize Fortran-style comments.
  695. .IP "\fB\-D\fR\fIname\fR" 4
  696. .IX Item "-Dname"
  697. Predefine name as a macro, with definition \f(CW1\fR.
  698. .IP "\fB\-D\fR\fIname\fR\fB=\fR\fIdefinition\fR" 4
  699. .IX Item "-Dname=definition"
  700. The contents of \fIdefinition\fR are tokenized and processed as if they
  701. appeared during translation phase three in a \f(CW\*(Aq#define\*(Aq\fR directive.
  702. In particular, the definition will be truncated by embedded newline
  703. characters.
  704. .Sp
  705. If you are invoking the preprocessor from a shell or shell-like program
  706. you may need to use the shell's quoting syntax to protect characters such
  707. as spaces that have a meaning in the shell syntax.
  708. .Sp
  709. If you wish to define a function-like macro on the command line, write
  710. its argument list with surrounding parentheses before the equals sign
  711. (if any). Parentheses are meaningful to most shells, so you will need
  712. to quote the option. With sh and csh, \f(CW\*(C`\-D\*(Aqname(args...)=definition\*(Aq\*(C'\fR
  713. works.
  714. .Sp
  715. \&\fB\-D\fR and \fB\-U\fR options are processed in the order they are
  716. given on the command line. All \-imacros file and \-include file options
  717. are processed after all \-D and \-U options.
  718. .IP "\fB\-H\fR" 4
  719. .IX Item "-H"
  720. Print the name of each header file used, in addition to other normal
  721. activities. Each name is indented to show how deep in the \f(CW\*(Aq#include\*(Aq\fR
  722. stack it is.
  723. .IP "\fB\-P\fR" 4
  724. .IX Item "-P"
  725. Inhibit generation of linemarkers in the output from the preprocessor.
  726. This might be useful when running the preprocessor on something that
  727. is not C code, and will be sent to a program which might be confused
  728. by the linemarkers.
  729. .IP "\fB\-U\fR\fIname\fR" 4
  730. .IX Item "-Uname"
  731. Cancel any previous definition of \fIname\fR, either built in or provided
  732. with a \fB\-D\fR option.
  733. .SS "Options to request or suppress errors and warnings"
  734. .IX Subsection "Options to request or suppress errors and warnings"
  735. Errors are diagnostic messages that report that the \s-1GNU\s0 Fortran compiler
  736. cannot compile the relevant piece of source code. The compiler will
  737. continue to process the program in an attempt to report further errors
  738. to aid in debugging, but will not produce any compiled output.
  739. .PP
  740. Warnings are diagnostic messages that report constructions which
  741. are not inherently erroneous but which are risky or suggest there is
  742. likely to be a bug in the program. Unless \fB\-Werror\fR is specified,
  743. they do not prevent compilation of the program.
  744. .PP
  745. You can request many specific warnings with options beginning \fB\-W\fR,
  746. for example \fB\-Wimplicit\fR to request warnings on implicit
  747. declarations. Each of these specific warning options also has a
  748. negative form beginning \fB\-Wno\-\fR to turn off warnings;
  749. for example, \fB\-Wno\-implicit\fR. This manual lists only one of the
  750. two forms, whichever is not the default.
  751. .PP
  752. These options control the amount and kinds of errors and warnings produced
  753. by \s-1GNU\s0 Fortran:
  754. .IP "\fB\-fmax\-errors=\fR\fIn\fR" 4
  755. .IX Item "-fmax-errors=n"
  756. Limits the maximum number of error messages to \fIn\fR, at which point
  757. \&\s-1GNU\s0 Fortran bails out rather than attempting to continue processing the
  758. source code. If \fIn\fR is 0, there is no limit on the number of error
  759. messages produced.
  760. .IP "\fB\-fsyntax\-only\fR" 4
  761. .IX Item "-fsyntax-only"
  762. Check the code for syntax errors, but do not actually compile it. This
  763. will generate module files for each module present in the code, but no
  764. other output file.
  765. .IP "\fB\-Wpedantic\fR" 4
  766. .IX Item "-Wpedantic"
  767. .PD 0
  768. .IP "\fB\-pedantic\fR" 4
  769. .IX Item "-pedantic"
  770. .PD
  771. Issue warnings for uses of extensions to Fortran.
  772. \&\fB\-pedantic\fR also applies to C\-language constructs where they
  773. occur in \s-1GNU\s0 Fortran source files, such as use of \fB\ee\fR in a
  774. character constant within a directive like \f(CW\*(C`#include\*(C'\fR.
  775. .Sp
  776. Valid Fortran programs should compile properly with or without
  777. this option.
  778. However, without this option, certain \s-1GNU\s0 extensions and traditional
  779. Fortran features are supported as well.
  780. With this option, many of them are rejected.
  781. .Sp
  782. Some users try to use \fB\-pedantic\fR to check programs for conformance.
  783. They soon find that it does not do quite what they want\-\-\-it finds some
  784. nonstandard practices, but not all.
  785. However, improvements to \s-1GNU\s0 Fortran in this area are welcome.
  786. .Sp
  787. This should be used in conjunction with \fB\-std=f95\fR,
  788. \&\fB\-std=f2003\fR, \fB\-std=f2008\fR or \fB\-std=f2018\fR.
  789. .IP "\fB\-pedantic\-errors\fR" 4
  790. .IX Item "-pedantic-errors"
  791. Like \fB\-pedantic\fR, except that errors are produced rather than
  792. warnings.
  793. .IP "\fB\-Wall\fR" 4
  794. .IX Item "-Wall"
  795. Enables commonly used warning options pertaining to usage that
  796. we recommend avoiding and that we believe are easy to avoid.
  797. This currently includes \fB\-Waliasing\fR, \fB\-Wampersand\fR,
  798. \&\fB\-Wconversion\fR, \fB\-Wsurprising\fR, \fB\-Wc\-binding\-type\fR,
  799. \&\fB\-Wintrinsics\-std\fR, \fB\-Wtabs\fR, \fB\-Wintrinsic\-shadow\fR,
  800. \&\fB\-Wline\-truncation\fR, \fB\-Wtarget\-lifetime\fR,
  801. \&\fB\-Winteger\-division\fR, \fB\-Wreal\-q\-constant\fR, \fB\-Wunused\fR
  802. and \fB\-Wundefined\-do\-loop\fR.
  803. .IP "\fB\-Waliasing\fR" 4
  804. .IX Item "-Waliasing"
  805. Warn about possible aliasing of dummy arguments. Specifically, it warns
  806. if the same actual argument is associated with a dummy argument with
  807. \&\f(CW\*(C`INTENT(IN)\*(C'\fR and a dummy argument with \f(CW\*(C`INTENT(OUT)\*(C'\fR in a call
  808. with an explicit interface.
  809. .Sp
  810. The following example will trigger the warning.
  811. .Sp
  812. .Vb 7
  813. \& interface
  814. \& subroutine bar(a,b)
  815. \& integer, intent(in) :: a
  816. \& integer, intent(out) :: b
  817. \& end subroutine
  818. \& end interface
  819. \& integer :: a
  820. \&
  821. \& call bar(a,a)
  822. .Ve
  823. .IP "\fB\-Wampersand\fR" 4
  824. .IX Item "-Wampersand"
  825. Warn about missing ampersand in continued character constants. The
  826. warning is given with \fB\-Wampersand\fR, \fB\-pedantic\fR,
  827. \&\fB\-std=f95\fR, \fB\-std=f2003\fR, \fB\-std=f2008\fR and
  828. \&\fB\-std=f2018\fR. Note: With no ampersand given in a continued
  829. character constant, \s-1GNU\s0 Fortran assumes continuation at the first
  830. non-comment, non-whitespace character after the ampersand that
  831. initiated the continuation.
  832. .IP "\fB\-Warray\-temporaries\fR" 4
  833. .IX Item "-Warray-temporaries"
  834. Warn about array temporaries generated by the compiler. The information
  835. generated by this warning is sometimes useful in optimization, in order to
  836. avoid such temporaries.
  837. .IP "\fB\-Wc\-binding\-type\fR" 4
  838. .IX Item "-Wc-binding-type"
  839. Warn if the a variable might not be C interoperable. In particular, warn if
  840. the variable has been declared using an intrinsic type with default kind
  841. instead of using a kind parameter defined for C interoperability in the
  842. intrinsic \f(CW\*(C`ISO_C_Binding\*(C'\fR module. This option is implied by
  843. \&\fB\-Wall\fR.
  844. .IP "\fB\-Wcharacter\-truncation\fR" 4
  845. .IX Item "-Wcharacter-truncation"
  846. Warn when a character assignment will truncate the assigned string.
  847. .IP "\fB\-Wline\-truncation\fR" 4
  848. .IX Item "-Wline-truncation"
  849. Warn when a source code line will be truncated. This option is
  850. implied by \fB\-Wall\fR. For free-form source code, the default is
  851. \&\fB\-Werror=line\-truncation\fR such that truncations are reported as
  852. error.
  853. .IP "\fB\-Wconversion\fR" 4
  854. .IX Item "-Wconversion"
  855. Warn about implicit conversions that are likely to change the value of
  856. the expression after conversion. Implied by \fB\-Wall\fR.
  857. .IP "\fB\-Wconversion\-extra\fR" 4
  858. .IX Item "-Wconversion-extra"
  859. Warn about implicit conversions between different types and kinds. This
  860. option does \fInot\fR imply \fB\-Wconversion\fR.
  861. .IP "\fB\-Wextra\fR" 4
  862. .IX Item "-Wextra"
  863. Enables some warning options for usages of language features which
  864. may be problematic. This currently includes \fB\-Wcompare\-reals\fR,
  865. \&\fB\-Wunused\-parameter\fR and \fB\-Wdo\-subscript\fR.
  866. .IP "\fB\-Wfrontend\-loop\-interchange\fR" 4
  867. .IX Item "-Wfrontend-loop-interchange"
  868. Warn when using \fB\-ffrontend\-loop\-interchange\fR for performing loop
  869. interchanges.
  870. .IP "\fB\-Wimplicit\-interface\fR" 4
  871. .IX Item "-Wimplicit-interface"
  872. Warn if a procedure is called without an explicit interface.
  873. Note this only checks that an explicit interface is present. It does not
  874. check that the declared interfaces are consistent across program units.
  875. .IP "\fB\-Wimplicit\-procedure\fR" 4
  876. .IX Item "-Wimplicit-procedure"
  877. Warn if a procedure is called that has neither an explicit interface
  878. nor has been declared as \f(CW\*(C`EXTERNAL\*(C'\fR.
  879. .IP "\fB\-Winteger\-division\fR" 4
  880. .IX Item "-Winteger-division"
  881. Warn if a constant integer division truncates its result.
  882. As an example, 3/5 evaluates to 0.
  883. .IP "\fB\-Wintrinsics\-std\fR" 4
  884. .IX Item "-Wintrinsics-std"
  885. Warn if \fBgfortran\fR finds a procedure named like an intrinsic not
  886. available in the currently selected standard (with \fB\-std\fR) and treats
  887. it as \f(CW\*(C`EXTERNAL\*(C'\fR procedure because of this. \fB\-fall\-intrinsics\fR can
  888. be used to never trigger this behavior and always link to the intrinsic
  889. regardless of the selected standard.
  890. .IP "\fB\-Wno\-overwrite\-recursive\fR" 4
  891. .IX Item "-Wno-overwrite-recursive"
  892. Do not warn when \fB\-fno\-automatic\fR is used with \fB\-frecursive\fR. Recursion
  893. will be broken if the relevant local variables do not have the attribute
  894. \&\f(CW\*(C`AUTOMATIC\*(C'\fR explicitly declared. This option can be used to suppress the warning
  895. when it is known that recursion is not broken. Useful for build environments that use
  896. \&\fB\-Werror\fR.
  897. .IP "\fB\-Wreal\-q\-constant\fR" 4
  898. .IX Item "-Wreal-q-constant"
  899. Produce a warning if a real-literal-constant contains a \f(CW\*(C`q\*(C'\fR
  900. exponent-letter.
  901. .IP "\fB\-Wsurprising\fR" 4
  902. .IX Item "-Wsurprising"
  903. Produce a warning when \*(L"suspicious\*(R" code constructs are encountered.
  904. While technically legal these usually indicate that an error has been made.
  905. .Sp
  906. This currently produces a warning under the following circumstances:
  907. .RS 4
  908. .IP "*" 4
  909. An \s-1INTEGER SELECT\s0 construct has a \s-1CASE\s0 that can never be matched as its
  910. lower value is greater than its upper value.
  911. .IP "*" 4
  912. A \s-1LOGICAL SELECT\s0 construct has three \s-1CASE\s0 statements.
  913. .IP "*" 4
  914. A \s-1TRANSFER\s0 specifies a source that is shorter than the destination.
  915. .IP "*" 4
  916. The type of a function result is declared more than once with the same type. If
  917. \&\fB\-pedantic\fR or standard-conforming mode is enabled, this is an error.
  918. .IP "*" 4
  919. A \f(CW\*(C`CHARACTER\*(C'\fR variable is declared with negative length.
  920. .RE
  921. .RS 4
  922. .RE
  923. .IP "\fB\-Wtabs\fR" 4
  924. .IX Item "-Wtabs"
  925. By default, tabs are accepted as whitespace, but tabs are not members
  926. of the Fortran Character Set. For continuation lines, a tab followed
  927. by a digit between 1 and 9 is supported. \fB\-Wtabs\fR will cause a
  928. warning to be issued if a tab is encountered. Note, \fB\-Wtabs\fR is
  929. active for \fB\-pedantic\fR, \fB\-std=f95\fR, \fB\-std=f2003\fR,
  930. \&\fB\-std=f2008\fR, \fB\-std=f2018\fR and
  931. \&\fB\-Wall\fR.
  932. .IP "\fB\-Wundefined\-do\-loop\fR" 4
  933. .IX Item "-Wundefined-do-loop"
  934. Warn if a \s-1DO\s0 loop with step either 1 or \-1 yields an underflow or an overflow
  935. during iteration of an induction variable of the loop.
  936. This option is implied by \fB\-Wall\fR.
  937. .IP "\fB\-Wunderflow\fR" 4
  938. .IX Item "-Wunderflow"
  939. Produce a warning when numerical constant expressions are
  940. encountered, which yield an \s-1UNDERFLOW\s0 during compilation. Enabled by default.
  941. .IP "\fB\-Wintrinsic\-shadow\fR" 4
  942. .IX Item "-Wintrinsic-shadow"
  943. Warn if a user-defined procedure or module procedure has the same name as an
  944. intrinsic; in this case, an explicit interface or \f(CW\*(C`EXTERNAL\*(C'\fR or
  945. \&\f(CW\*(C`INTRINSIC\*(C'\fR declaration might be needed to get calls later resolved to
  946. the desired intrinsic/procedure. This option is implied by \fB\-Wall\fR.
  947. .IP "\fB\-Wuse\-without\-only\fR" 4
  948. .IX Item "-Wuse-without-only"
  949. Warn if a \f(CW\*(C`USE\*(C'\fR statement has no \f(CW\*(C`ONLY\*(C'\fR qualifier and
  950. thus implicitly imports all public entities of the used module.
  951. .IP "\fB\-Wunused\-dummy\-argument\fR" 4
  952. .IX Item "-Wunused-dummy-argument"
  953. Warn about unused dummy arguments. This option is implied by \fB\-Wall\fR.
  954. .IP "\fB\-Wunused\-parameter\fR" 4
  955. .IX Item "-Wunused-parameter"
  956. Contrary to \fBgcc\fR's meaning of \fB\-Wunused\-parameter\fR,
  957. \&\fBgfortran\fR's implementation of this option does not warn
  958. about unused dummy arguments (see \fB\-Wunused\-dummy\-argument\fR),
  959. but about unused \f(CW\*(C`PARAMETER\*(C'\fR values. \fB\-Wunused\-parameter\fR
  960. is implied by \fB\-Wextra\fR if also \fB\-Wunused\fR or
  961. \&\fB\-Wall\fR is used.
  962. .IP "\fB\-Walign\-commons\fR" 4
  963. .IX Item "-Walign-commons"
  964. By default, \fBgfortran\fR warns about any occasion of variables being
  965. padded for proper alignment inside a \f(CW\*(C`COMMON\*(C'\fR block. This warning can be turned
  966. off via \fB\-Wno\-align\-commons\fR. See also \fB\-falign\-commons\fR.
  967. .IP "\fB\-Wfunction\-elimination\fR" 4
  968. .IX Item "-Wfunction-elimination"
  969. Warn if any calls to impure functions are eliminated by the optimizations
  970. enabled by the \fB\-ffrontend\-optimize\fR option.
  971. This option is implied by \fB\-Wextra\fR.
  972. .IP "\fB\-Wrealloc\-lhs\fR" 4
  973. .IX Item "-Wrealloc-lhs"
  974. Warn when the compiler might insert code to for allocation or reallocation of
  975. an allocatable array variable of intrinsic type in intrinsic assignments. In
  976. hot loops, the Fortran 2003 reallocation feature may reduce the performance.
  977. If the array is already allocated with the correct shape, consider using a
  978. whole-array array-spec (e.g. \f(CW\*(C`(:,:,:)\*(C'\fR) for the variable on the left-hand
  979. side to prevent the reallocation check. Note that in some cases the warning
  980. is shown, even if the compiler will optimize reallocation checks away. For
  981. instance, when the right-hand side contains the same variable multiplied by
  982. a scalar. See also \fB\-frealloc\-lhs\fR.
  983. .IP "\fB\-Wrealloc\-lhs\-all\fR" 4
  984. .IX Item "-Wrealloc-lhs-all"
  985. Warn when the compiler inserts code to for allocation or reallocation of an
  986. allocatable variable; this includes scalars and derived types.
  987. .IP "\fB\-Wcompare\-reals\fR" 4
  988. .IX Item "-Wcompare-reals"
  989. Warn when comparing real or complex types for equality or inequality.
  990. This option is implied by \fB\-Wextra\fR.
  991. .IP "\fB\-Wtarget\-lifetime\fR" 4
  992. .IX Item "-Wtarget-lifetime"
  993. Warn if the pointer in a pointer assignment might be longer than the its
  994. target. This option is implied by \fB\-Wall\fR.
  995. .IP "\fB\-Wzerotrip\fR" 4
  996. .IX Item "-Wzerotrip"
  997. Warn if a \f(CW\*(C`DO\*(C'\fR loop is known to execute zero times at compile
  998. time. This option is implied by \fB\-Wall\fR.
  999. .IP "\fB\-Wdo\-subscript\fR" 4
  1000. .IX Item "-Wdo-subscript"
  1001. Warn if an array subscript inside a \s-1DO\s0 loop could lead to an
  1002. out-of-bounds access even if the compiler cannot prove that the
  1003. statement is actually executed, in cases like
  1004. .Sp
  1005. .Vb 6
  1006. \& real a(3)
  1007. \& do i=1,4
  1008. \& if (condition(i)) then
  1009. \& a(i) = 1.2
  1010. \& end if
  1011. \& end do
  1012. .Ve
  1013. .Sp
  1014. This option is implied by \fB\-Wextra\fR.
  1015. .IP "\fB\-Werror\fR" 4
  1016. .IX Item "-Werror"
  1017. Turns all warnings into errors.
  1018. .PP
  1019. Some of these have no effect when compiling programs written in Fortran.
  1020. .SS "Options for debugging your program or \s-1GNU\s0 Fortran"
  1021. .IX Subsection "Options for debugging your program or GNU Fortran"
  1022. \&\s-1GNU\s0 Fortran has various special options that are used for debugging
  1023. either your program or the \s-1GNU\s0 Fortran compiler.
  1024. .IP "\fB\-fdump\-fortran\-original\fR" 4
  1025. .IX Item "-fdump-fortran-original"
  1026. Output the internal parse tree after translating the source program
  1027. into internal representation. This option is mostly useful for
  1028. debugging the \s-1GNU\s0 Fortran compiler itself. The output generated by
  1029. this option might change between releases. This option may also
  1030. generate internal compiler errors for features which have only
  1031. recently been added.
  1032. .IP "\fB\-fdump\-fortran\-optimized\fR" 4
  1033. .IX Item "-fdump-fortran-optimized"
  1034. Output the parse tree after front-end optimization. Mostly useful for
  1035. debugging the \s-1GNU\s0 Fortran compiler itself. The output generated by
  1036. this option might change between releases. This option may also
  1037. generate internal compiler errors for features which have only
  1038. recently been added.
  1039. .IP "\fB\-fdump\-parse\-tree\fR" 4
  1040. .IX Item "-fdump-parse-tree"
  1041. Output the internal parse tree after translating the source program
  1042. into internal representation. Mostly useful for debugging the \s-1GNU\s0
  1043. Fortran compiler itself. The output generated by this option might
  1044. change between releases. This option may also generate internal
  1045. compiler errors for features which have only recently been added. This
  1046. option is deprecated; use \f(CW\*(C`\-fdump\-fortran\-original\*(C'\fR instead.
  1047. .IP "\fB\-fdump\-fortran\-global\fR" 4
  1048. .IX Item "-fdump-fortran-global"
  1049. Output a list of the global identifiers after translating into
  1050. middle-end representation. Mostly useful for debugging the \s-1GNU\s0 Fortran
  1051. compiler itself. The output generated by this option might change
  1052. between releases. This option may also generate internal compiler
  1053. errors for features which have only recently been added.
  1054. .IP "\fB\-ffpe\-trap=\fR\fIlist\fR" 4
  1055. .IX Item "-ffpe-trap=list"
  1056. Specify a list of floating point exception traps to enable. On most
  1057. systems, if a floating point exception occurs and the trap for that
  1058. exception is enabled, a \s-1SIGFPE\s0 signal will be sent and the program
  1059. being aborted, producing a core file useful for debugging. \fIlist\fR
  1060. is a (possibly empty) comma-separated list of the following
  1061. exceptions: \fBinvalid\fR (invalid floating point operation, such as
  1062. \&\f(CW\*(C`SQRT(\-1.0)\*(C'\fR), \fBzero\fR (division by zero), \fBoverflow\fR
  1063. (overflow in a floating point operation), \fBunderflow\fR (underflow
  1064. in a floating point operation), \fBinexact\fR (loss of precision
  1065. during operation), and \fBdenormal\fR (operation performed on a
  1066. denormal value). The first five exceptions correspond to the five
  1067. \&\s-1IEEE 754\s0 exceptions, whereas the last one (\fBdenormal\fR) is not
  1068. part of the \s-1IEEE 754\s0 standard but is available on some common
  1069. architectures such as x86.
  1070. .Sp
  1071. The first three exceptions (\fBinvalid\fR, \fBzero\fR, and
  1072. \&\fBoverflow\fR) often indicate serious errors, and unless the program
  1073. has provisions for dealing with these exceptions, enabling traps for
  1074. these three exceptions is probably a good idea.
  1075. .Sp
  1076. If the option is used more than once in the command line, the lists will
  1077. be joined: '\f(CW\*(C`ffpe\-trap=\*(C'\fR\fIlist1\fR \f(CW\*(C`ffpe\-trap=\*(C'\fR\fIlist2\fR'
  1078. is equivalent to \f(CW\*(C`ffpe\-trap=\*(C'\fR\fIlist1\fR,\fIlist2\fR.
  1079. .Sp
  1080. Note that once enabled an exception cannot be disabled (no negative form).
  1081. .Sp
  1082. Many, if not most, floating point operations incur loss of precision
  1083. due to rounding, and hence the \f(CW\*(C`ffpe\-trap=inexact\*(C'\fR is likely to
  1084. be uninteresting in practice.
  1085. .Sp
  1086. By default no exception traps are enabled.
  1087. .IP "\fB\-ffpe\-summary=\fR\fIlist\fR" 4
  1088. .IX Item "-ffpe-summary=list"
  1089. Specify a list of floating-point exceptions, whose flag status is printed
  1090. to \f(CW\*(C`ERROR_UNIT\*(C'\fR when invoking \f(CW\*(C`STOP\*(C'\fR and \f(CW\*(C`ERROR STOP\*(C'\fR.
  1091. \&\fIlist\fR can be either \fBnone\fR, \fBall\fR or a comma-separated list
  1092. of the following exceptions: \fBinvalid\fR, \fBzero\fR, \fBoverflow\fR,
  1093. \&\fBunderflow\fR, \fBinexact\fR and \fBdenormal\fR. (See
  1094. \&\fB\-ffpe\-trap\fR for a description of the exceptions.)
  1095. .Sp
  1096. If the option is used more than once in the command line, only the
  1097. last one will be used.
  1098. .Sp
  1099. By default, a summary for all exceptions but \fBinexact\fR is shown.
  1100. .IP "\fB\-fno\-backtrace\fR" 4
  1101. .IX Item "-fno-backtrace"
  1102. When a serious runtime error is encountered or a deadly signal is
  1103. emitted (segmentation fault, illegal instruction, bus error,
  1104. floating-point exception, and the other \s-1POSIX\s0 signals that have the
  1105. action \fBcore\fR), the Fortran runtime library tries to output a
  1106. backtrace of the error. \f(CW\*(C`\-fno\-backtrace\*(C'\fR disables the backtrace
  1107. generation. This option only has influence for compilation of the
  1108. Fortran main program.
  1109. .SS "Options for directory search"
  1110. .IX Subsection "Options for directory search"
  1111. These options affect how \s-1GNU\s0 Fortran searches
  1112. for files specified by the \f(CW\*(C`INCLUDE\*(C'\fR directive and where it searches
  1113. for previously compiled modules.
  1114. .PP
  1115. It also affects the search paths used by \fBcpp\fR when used to preprocess
  1116. Fortran source.
  1117. .IP "\fB\-I\fR\fIdir\fR" 4
  1118. .IX Item "-Idir"
  1119. These affect interpretation of the \f(CW\*(C`INCLUDE\*(C'\fR directive
  1120. (as well as of the \f(CW\*(C`#include\*(C'\fR directive of the \fBcpp\fR
  1121. preprocessor).
  1122. .Sp
  1123. Also note that the general behavior of \fB\-I\fR and
  1124. \&\f(CW\*(C`INCLUDE\*(C'\fR is pretty much the same as of \fB\-I\fR with
  1125. \&\f(CW\*(C`#include\*(C'\fR in the \fBcpp\fR preprocessor, with regard to
  1126. looking for \fIheader.gcc\fR files and other such things.
  1127. .Sp
  1128. This path is also used to search for \fI.mod\fR files when previously
  1129. compiled modules are required by a \f(CW\*(C`USE\*(C'\fR statement.
  1130. .IP "\fB\-J\fR\fIdir\fR" 4
  1131. .IX Item "-Jdir"
  1132. This option specifies where to put \fI.mod\fR files for compiled modules.
  1133. It is also added to the list of directories to searched by an \f(CW\*(C`USE\*(C'\fR
  1134. statement.
  1135. .Sp
  1136. The default is the current directory.
  1137. .IP "\fB\-fintrinsic\-modules\-path\fR \fIdir\fR" 4
  1138. .IX Item "-fintrinsic-modules-path dir"
  1139. This option specifies the location of pre-compiled intrinsic modules, if
  1140. they are not in the default location expected by the compiler.
  1141. .SS "Influencing the linking step"
  1142. .IX Subsection "Influencing the linking step"
  1143. These options come into play when the compiler links object files into an
  1144. executable output file. They are meaningless if the compiler is not doing
  1145. a link step.
  1146. .IP "\fB\-static\-libgfortran\fR" 4
  1147. .IX Item "-static-libgfortran"
  1148. On systems that provide \fIlibgfortran\fR as a shared and a static
  1149. library, this option forces the use of the static version. If no
  1150. shared version of \fIlibgfortran\fR was built when the compiler was
  1151. configured, this option has no effect.
  1152. .SS "Influencing runtime behavior"
  1153. .IX Subsection "Influencing runtime behavior"
  1154. These options affect the runtime behavior of programs compiled with \s-1GNU\s0 Fortran.
  1155. .IP "\fB\-fconvert=\fR\fIconversion\fR" 4
  1156. .IX Item "-fconvert=conversion"
  1157. Specify the representation of data for unformatted files. Valid
  1158. values for conversion are: \fBnative\fR, the default; \fBswap\fR,
  1159. swap between big\- and little-endian; \fBbig-endian\fR, use big-endian
  1160. representation for unformatted files; \fBlittle-endian\fR, use little-endian
  1161. representation for unformatted files.
  1162. .Sp
  1163. \&\fIThis option has an effect only when used in the main program.
  1164. The \f(CI\*(C`CONVERT\*(C'\fI specifier and the \s-1GFORTRAN_CONVERT_UNIT\s0 environment
  1165. variable override the default specified by \f(BI\-fconvert\fI.\fR
  1166. .IP "\fB\-frecord\-marker=\fR\fIlength\fR" 4
  1167. .IX Item "-frecord-marker=length"
  1168. Specify the length of record markers for unformatted files.
  1169. Valid values for \fIlength\fR are 4 and 8. Default is 4.
  1170. \&\fIThis is different from previous versions of\fR \fBgfortran\fR,
  1171. which specified a default record marker length of 8 on most
  1172. systems. If you want to read or write files compatible
  1173. with earlier versions of \fBgfortran\fR, use \fB\-frecord\-marker=8\fR.
  1174. .IP "\fB\-fmax\-subrecord\-length=\fR\fIlength\fR" 4
  1175. .IX Item "-fmax-subrecord-length=length"
  1176. Specify the maximum length for a subrecord. The maximum permitted
  1177. value for length is 2147483639, which is also the default. Only
  1178. really useful for use by the gfortran testsuite.
  1179. .IP "\fB\-fsign\-zero\fR" 4
  1180. .IX Item "-fsign-zero"
  1181. When enabled, floating point numbers of value zero with the sign bit set
  1182. are written as negative number in formatted output and treated as
  1183. negative in the \f(CW\*(C`SIGN\*(C'\fR intrinsic. \fB\-fno\-sign\-zero\fR does not
  1184. print the negative sign of zero values (or values rounded to zero for I/O)
  1185. and regards zero as positive number in the \f(CW\*(C`SIGN\*(C'\fR intrinsic for
  1186. compatibility with Fortran 77. The default is \fB\-fsign\-zero\fR.
  1187. .SS "Options for code generation conventions"
  1188. .IX Subsection "Options for code generation conventions"
  1189. These machine-independent options control the interface conventions
  1190. used in code generation.
  1191. .PP
  1192. Most of them have both positive and negative forms; the negative form
  1193. of \fB\-ffoo\fR would be \fB\-fno\-foo\fR. In the table below, only
  1194. one of the forms is listed\-\-\-the one which is not the default. You
  1195. can figure out the other form by either removing \fBno\-\fR or adding
  1196. it.
  1197. .IP "\fB\-fno\-automatic\fR" 4
  1198. .IX Item "-fno-automatic"
  1199. Treat each program unit (except those marked as \s-1RECURSIVE\s0) as if the
  1200. \&\f(CW\*(C`SAVE\*(C'\fR statement were specified for every local variable and array
  1201. referenced in it. Does not affect common blocks. (Some Fortran compilers
  1202. provide this option under the name \fB\-static\fR or \fB\-save\fR.)
  1203. The default, which is \fB\-fautomatic\fR, uses the stack for local
  1204. variables smaller than the value given by \fB\-fmax\-stack\-var\-size\fR.
  1205. Use the option \fB\-frecursive\fR to use no static memory.
  1206. .Sp
  1207. Local variables or arrays having an explicit \f(CW\*(C`SAVE\*(C'\fR attribute are
  1208. silently ignored unless the \fB\-pedantic\fR option is added.
  1209. .IP "\fB\-ff2c\fR" 4
  1210. .IX Item "-ff2c"
  1211. Generate code designed to be compatible with code generated
  1212. by \fBg77\fR and \fBf2c\fR.
  1213. .Sp
  1214. The calling conventions used by \fBg77\fR (originally implemented
  1215. in \fBf2c\fR) require functions that return type
  1216. default \f(CW\*(C`REAL\*(C'\fR to actually return the C type \f(CW\*(C`double\*(C'\fR, and
  1217. functions that return type \f(CW\*(C`COMPLEX\*(C'\fR to return the values via an
  1218. extra argument in the calling sequence that points to where to
  1219. store the return value. Under the default \s-1GNU\s0 calling conventions, such
  1220. functions simply return their results as they would in \s-1GNU\s0
  1221. C\-\-\-default \f(CW\*(C`REAL\*(C'\fR functions return the C type \f(CW\*(C`float\*(C'\fR, and
  1222. \&\f(CW\*(C`COMPLEX\*(C'\fR functions return the \s-1GNU C\s0 type \f(CW\*(C`complex\*(C'\fR.
  1223. Additionally, this option implies the \fB\-fsecond\-underscore\fR
  1224. option, unless \fB\-fno\-second\-underscore\fR is explicitly requested.
  1225. .Sp
  1226. This does not affect the generation of code that interfaces with
  1227. the \fBlibgfortran\fR library.
  1228. .Sp
  1229. \&\fICaution:\fR It is not a good idea to mix Fortran code compiled with
  1230. \&\fB\-ff2c\fR with code compiled with the default \fB\-fno\-f2c\fR
  1231. calling conventions as, calling \f(CW\*(C`COMPLEX\*(C'\fR or default \f(CW\*(C`REAL\*(C'\fR
  1232. functions between program parts which were compiled with different
  1233. calling conventions will break at execution time.
  1234. .Sp
  1235. \&\fICaution:\fR This will break code which passes intrinsic functions
  1236. of type default \f(CW\*(C`REAL\*(C'\fR or \f(CW\*(C`COMPLEX\*(C'\fR as actual arguments, as
  1237. the library implementations use the \fB\-fno\-f2c\fR calling conventions.
  1238. .IP "\fB\-fno\-underscoring\fR" 4
  1239. .IX Item "-fno-underscoring"
  1240. Do not transform names of entities specified in the Fortran
  1241. source file by appending underscores to them.
  1242. .Sp
  1243. With \fB\-funderscoring\fR in effect, \s-1GNU\s0 Fortran appends one
  1244. underscore to external names with no underscores. This is done to ensure
  1245. compatibility with code produced by many \s-1UNIX\s0 Fortran compilers.
  1246. .Sp
  1247. \&\fICaution\fR: The default behavior of \s-1GNU\s0 Fortran is
  1248. incompatible with \fBf2c\fR and \fBg77\fR, please use the
  1249. \&\fB\-ff2c\fR option if you want object files compiled with
  1250. \&\s-1GNU\s0 Fortran to be compatible with object code created with these
  1251. tools.
  1252. .Sp
  1253. Use of \fB\-fno\-underscoring\fR is not recommended unless you are
  1254. experimenting with issues such as integration of \s-1GNU\s0 Fortran into
  1255. existing system environments (vis\-a\*`\-vis existing libraries, tools,
  1256. and so on).
  1257. .Sp
  1258. For example, with \fB\-funderscoring\fR, and assuming that \f(CW\*(C`j()\*(C'\fR and
  1259. \&\f(CW\*(C`max_count()\*(C'\fR are external functions while \f(CW\*(C`my_var\*(C'\fR and
  1260. \&\f(CW\*(C`lvar\*(C'\fR are local variables, a statement like
  1261. .Sp
  1262. .Vb 1
  1263. \& I = J() + MAX_COUNT (MY_VAR, LVAR)
  1264. .Ve
  1265. .Sp
  1266. is implemented as something akin to:
  1267. .Sp
  1268. .Vb 1
  1269. \& i = j_() + max_count_\|_(&my_var_\|_, &lvar);
  1270. .Ve
  1271. .Sp
  1272. With \fB\-fno\-underscoring\fR, the same statement is implemented as:
  1273. .Sp
  1274. .Vb 1
  1275. \& i = j() + max_count(&my_var, &lvar);
  1276. .Ve
  1277. .Sp
  1278. Use of \fB\-fno\-underscoring\fR allows direct specification of
  1279. user-defined names while debugging and when interfacing \s-1GNU\s0 Fortran
  1280. code with other languages.
  1281. .Sp
  1282. Note that just because the names match does \fInot\fR mean that the
  1283. interface implemented by \s-1GNU\s0 Fortran for an external name matches the
  1284. interface implemented by some other language for that same name.
  1285. That is, getting code produced by \s-1GNU\s0 Fortran to link to code produced
  1286. by some other compiler using this or any other method can be only a
  1287. small part of the overall solution\-\-\-getting the code generated by
  1288. both compilers to agree on issues other than naming can require
  1289. significant effort, and, unlike naming disagreements, linkers normally
  1290. cannot detect disagreements in these other areas.
  1291. .Sp
  1292. Also, note that with \fB\-fno\-underscoring\fR, the lack of appended
  1293. underscores introduces the very real possibility that a user-defined
  1294. external name will conflict with a name in a system library, which
  1295. could make finding unresolved-reference bugs quite difficult in some
  1296. cases\-\-\-they might occur at program run time, and show up only as
  1297. buggy behavior at run time.
  1298. .Sp
  1299. In future versions of \s-1GNU\s0 Fortran we hope to improve naming and linking
  1300. issues so that debugging always involves using the names as they appear
  1301. in the source, even if the names as seen by the linker are mangled to
  1302. prevent accidental linking between procedures with incompatible
  1303. interfaces.
  1304. .IP "\fB\-fsecond\-underscore\fR" 4
  1305. .IX Item "-fsecond-underscore"
  1306. By default, \s-1GNU\s0 Fortran appends an underscore to external
  1307. names. If this option is used \s-1GNU\s0 Fortran appends two
  1308. underscores to names with underscores and one underscore to external names
  1309. with no underscores. \s-1GNU\s0 Fortran also appends two underscores to
  1310. internal names with underscores to avoid naming collisions with external
  1311. names.
  1312. .Sp
  1313. This option has no effect if \fB\-fno\-underscoring\fR is
  1314. in effect. It is implied by the \fB\-ff2c\fR option.
  1315. .Sp
  1316. Otherwise, with this option, an external name such as \f(CW\*(C`MAX_COUNT\*(C'\fR
  1317. is implemented as a reference to the link-time external symbol
  1318. \&\f(CW\*(C`max_count_\|_\*(C'\fR, instead of \f(CW\*(C`max_count_\*(C'\fR. This is required
  1319. for compatibility with \fBg77\fR and \fBf2c\fR, and is implied
  1320. by use of the \fB\-ff2c\fR option.
  1321. .IP "\fB\-fcoarray=\fR\fI<keyword>\fR" 4
  1322. .IX Item "-fcoarray=<keyword>"
  1323. .RS 4
  1324. .PD 0
  1325. .IP "\fBnone\fR" 4
  1326. .IX Item "none"
  1327. .PD
  1328. Disable coarray support; using coarray declarations and image-control
  1329. statements will produce a compile-time error. (Default)
  1330. .IP "\fBsingle\fR" 4
  1331. .IX Item "single"
  1332. Single-image mode, i.e. \f(CW\*(C`num_images()\*(C'\fR is always one.
  1333. .IP "\fBlib\fR" 4
  1334. .IX Item "lib"
  1335. Library-based coarray parallelization; a suitable \s-1GNU\s0 Fortran coarray
  1336. library needs to be linked.
  1337. .RE
  1338. .RS 4
  1339. .RE
  1340. .IP "\fB\-fcheck=\fR\fI<keyword>\fR" 4
  1341. .IX Item "-fcheck=<keyword>"
  1342. Enable the generation of run-time checks; the argument shall be
  1343. a comma-delimited list of the following keywords. Prefixing a check with
  1344. \&\fBno\-\fR disables it if it was activated by a previous specification.
  1345. .RS 4
  1346. .IP "\fBall\fR" 4
  1347. .IX Item "all"
  1348. Enable all run-time test of \fB\-fcheck\fR.
  1349. .IP "\fBarray-temps\fR" 4
  1350. .IX Item "array-temps"
  1351. Warns at run time when for passing an actual argument a temporary array
  1352. had to be generated. The information generated by this warning is
  1353. sometimes useful in optimization, in order to avoid such temporaries.
  1354. .Sp
  1355. Note: The warning is only printed once per location.
  1356. .IP "\fBbits\fR" 4
  1357. .IX Item "bits"
  1358. Enable generation of run-time checks for invalid arguments to the bit
  1359. manipulation intrinsics.
  1360. .IP "\fBbounds\fR" 4
  1361. .IX Item "bounds"
  1362. Enable generation of run-time checks for array subscripts
  1363. and against the declared minimum and maximum values. It also
  1364. checks array indices for assumed and deferred
  1365. shape arrays against the actual allocated bounds and ensures that all string
  1366. lengths are equal for character array constructors without an explicit
  1367. typespec.
  1368. .Sp
  1369. Some checks require that \fB\-fcheck=bounds\fR is set for
  1370. the compilation of the main program.
  1371. .Sp
  1372. Note: In the future this may also include other forms of checking, e.g.,
  1373. checking substring references.
  1374. .IP "\fBdo\fR" 4
  1375. .IX Item "do"
  1376. Enable generation of run-time checks for invalid modification of loop
  1377. iteration variables.
  1378. .IP "\fBmem\fR" 4
  1379. .IX Item "mem"
  1380. Enable generation of run-time checks for memory allocation.
  1381. Note: This option does not affect explicit allocations using the
  1382. \&\f(CW\*(C`ALLOCATE\*(C'\fR statement, which will be always checked.
  1383. .IP "\fBpointer\fR" 4
  1384. .IX Item "pointer"
  1385. Enable generation of run-time checks for pointers and allocatables.
  1386. .IP "\fBrecursion\fR" 4
  1387. .IX Item "recursion"
  1388. Enable generation of run-time checks for recursively called subroutines and
  1389. functions which are not marked as recursive. See also \fB\-frecursive\fR.
  1390. Note: This check does not work for OpenMP programs and is disabled if used
  1391. together with \fB\-frecursive\fR and \fB\-fopenmp\fR.
  1392. .RE
  1393. .RS 4
  1394. .Sp
  1395. Example: Assuming you have a file \fIfoo.f90\fR, the command
  1396. .Sp
  1397. .Vb 1
  1398. \& gfortran \-fcheck=all,no\-array\-temps foo.f90
  1399. .Ve
  1400. .Sp
  1401. will compile the file with all checks enabled as specified above except
  1402. warnings for generated array temporaries.
  1403. .RE
  1404. .IP "\fB\-fbounds\-check\fR" 4
  1405. .IX Item "-fbounds-check"
  1406. Deprecated alias for \fB\-fcheck=bounds\fR.
  1407. .IP "\fB\-ftail\-call\-workaround\fR" 4
  1408. .IX Item "-ftail-call-workaround"
  1409. .PD 0
  1410. .IP "\fB\-ftail\-call\-workaround=\fR\fIn\fR" 4
  1411. .IX Item "-ftail-call-workaround=n"
  1412. .PD
  1413. Some C interfaces to Fortran codes violate the gfortran \s-1ABI\s0 by
  1414. omitting the hidden character length arguments as described in
  1415. This can lead to crashes
  1416. because pushing arguments for tail calls can overflow the stack.
  1417. .Sp
  1418. To provide a workaround for existing binary packages, this option
  1419. disables tail call optimization for gfortran procedures with character
  1420. arguments. With \fB\-ftail\-call\-workaround=2\fR tail call optimization
  1421. is disabled in all gfortran procedures with character arguments,
  1422. with \fB\-ftail\-call\-workaround=1\fR or equivalent
  1423. \&\fB\-ftail\-call\-workaround\fR only in gfortran procedures with character
  1424. arguments that call implicitly prototyped procedures.
  1425. .Sp
  1426. Using this option can lead to problems including crashes due to
  1427. insufficient stack space.
  1428. .Sp
  1429. It is \fIvery strongly\fR recommended to fix the code in question.
  1430. The \fB\-fc\-prototypes\-external\fR option can be used to generate
  1431. prototypes which conform to gfortran's \s-1ABI,\s0 for inclusion in the
  1432. source code.
  1433. .Sp
  1434. Support for this option will likely be withdrawn in a future release
  1435. of gfortran.
  1436. .Sp
  1437. The negative form, \fB\-fno\-tail\-call\-workaround\fR or equivalent
  1438. \&\fB\-ftail\-call\-workaround=0\fR, can be used to disable this option.
  1439. .Sp
  1440. Default is currently \fB\-ftail\-call\-workaround\fR, this will change
  1441. in future releases.
  1442. .IP "\fB\-fcheck\-array\-temporaries\fR" 4
  1443. .IX Item "-fcheck-array-temporaries"
  1444. Deprecated alias for \fB\-fcheck=array\-temps\fR.
  1445. .IP "\fB\-fmax\-array\-constructor=\fR\fIn\fR" 4
  1446. .IX Item "-fmax-array-constructor=n"
  1447. This option can be used to increase the upper limit permitted in
  1448. array constructors. The code below requires this option to expand
  1449. the array at compile time.
  1450. .Sp
  1451. .Vb 7
  1452. \& program test
  1453. \& implicit none
  1454. \& integer j
  1455. \& integer, parameter :: n = 100000
  1456. \& integer, parameter :: i(n) = (/ (2*j, j = 1, n) /)
  1457. \& print \*(Aq(10(I0,1X))\*(Aq, i
  1458. \& end program test
  1459. .Ve
  1460. .Sp
  1461. \&\fICaution: This option can lead to long compile times and excessively
  1462. large object files.\fR
  1463. .Sp
  1464. The default value for \fIn\fR is 65535.
  1465. .IP "\fB\-fmax\-stack\-var\-size=\fR\fIn\fR" 4
  1466. .IX Item "-fmax-stack-var-size=n"
  1467. This option specifies the size in bytes of the largest array that will be put
  1468. on the stack; if the size is exceeded static memory is used (except in
  1469. procedures marked as \s-1RECURSIVE\s0). Use the option \fB\-frecursive\fR to
  1470. allow for recursive procedures which do not have a \s-1RECURSIVE\s0 attribute or
  1471. for parallel programs. Use \fB\-fno\-automatic\fR to never use the stack.
  1472. .Sp
  1473. This option currently only affects local arrays declared with constant
  1474. bounds, and may not apply to all character variables.
  1475. Future versions of \s-1GNU\s0 Fortran may improve this behavior.
  1476. .Sp
  1477. The default value for \fIn\fR is 65536.
  1478. .IP "\fB\-fstack\-arrays\fR" 4
  1479. .IX Item "-fstack-arrays"
  1480. Adding this option will make the Fortran compiler put all arrays of
  1481. unknown size and array temporaries onto stack memory. If your program uses very
  1482. large local arrays it is possible that you will have to extend your runtime
  1483. limits for stack memory on some operating systems. This flag is enabled
  1484. by default at optimization level \fB\-Ofast\fR unless
  1485. \&\fB\-fmax\-stack\-var\-size\fR is specified.
  1486. .IP "\fB\-fpack\-derived\fR" 4
  1487. .IX Item "-fpack-derived"
  1488. This option tells \s-1GNU\s0 Fortran to pack derived type members as closely as
  1489. possible. Code compiled with this option is likely to be incompatible
  1490. with code compiled without this option, and may execute slower.
  1491. .IP "\fB\-frepack\-arrays\fR" 4
  1492. .IX Item "-frepack-arrays"
  1493. In some circumstances \s-1GNU\s0 Fortran may pass assumed shape array
  1494. sections via a descriptor describing a noncontiguous area of memory.
  1495. This option adds code to the function prologue to repack the data into
  1496. a contiguous block at runtime.
  1497. .Sp
  1498. This should result in faster accesses to the array. However it can introduce
  1499. significant overhead to the function call, especially when the passed data
  1500. is noncontiguous.
  1501. .IP "\fB\-fshort\-enums\fR" 4
  1502. .IX Item "-fshort-enums"
  1503. This option is provided for interoperability with C code that was
  1504. compiled with the \fB\-fshort\-enums\fR option. It will make
  1505. \&\s-1GNU\s0 Fortran choose the smallest \f(CW\*(C`INTEGER\*(C'\fR kind a given
  1506. enumerator set will fit in, and give all its enumerators this kind.
  1507. .IP "\fB\-finline\-arg\-packing\fR" 4
  1508. .IX Item "-finline-arg-packing"
  1509. When passing an assumed-shape argument of a procedure as actual
  1510. argument to an assumed-size or explicit size or as argument to a
  1511. procedure that does not have an explicit interface, the argument may
  1512. have to be packed, that is put into contiguous memory. An example is
  1513. the call to \f(CW\*(C`foo\*(C'\fR in
  1514. .Sp
  1515. .Vb 7
  1516. \& subroutine foo(a)
  1517. \& real, dimension(*) :: a
  1518. \& end subroutine foo
  1519. \& subroutine bar(b)
  1520. \& real, dimension(:) :: b
  1521. \& call foo(b)
  1522. \& end subroutine bar
  1523. .Ve
  1524. .Sp
  1525. When \fB\-finline\-arg\-packing\fR is in effect, this packing will be
  1526. performed by inline code. This allows for more optimization while
  1527. increasing code size.
  1528. .Sp
  1529. \&\fB\-finline\-arg\-packing\fR is implied by any of the \fB\-O\fR options
  1530. except when optimizing for size via \fB\-Os\fR. If the code
  1531. contains a very large number of argument that have to be packed, code
  1532. size and also compilation time may become excessive. If that is the
  1533. case, it may be better to disable this option. Instances of packing
  1534. can be found by using by using \fB\-Warray\-temporaries\fR.
  1535. .IP "\fB\-fexternal\-blas\fR" 4
  1536. .IX Item "-fexternal-blas"
  1537. This option will make \fBgfortran\fR generate calls to \s-1BLAS\s0 functions
  1538. for some matrix operations like \f(CW\*(C`MATMUL\*(C'\fR, instead of using our own
  1539. algorithms, if the size of the matrices involved is larger than a given
  1540. limit (see \fB\-fblas\-matmul\-limit\fR). This may be profitable if an
  1541. optimized vendor \s-1BLAS\s0 library is available. The \s-1BLAS\s0 library will have
  1542. to be specified at link time.
  1543. .IP "\fB\-fblas\-matmul\-limit=\fR\fIn\fR" 4
  1544. .IX Item "-fblas-matmul-limit=n"
  1545. Only significant when \fB\-fexternal\-blas\fR is in effect.
  1546. Matrix multiplication of matrices with size larger than (or equal to) \fIn\fR
  1547. will be performed by calls to \s-1BLAS\s0 functions, while others will be
  1548. handled by \fBgfortran\fR internal algorithms. If the matrices
  1549. involved are not square, the size comparison is performed using the
  1550. geometric mean of the dimensions of the argument and result matrices.
  1551. .Sp
  1552. The default value for \fIn\fR is 30.
  1553. .IP "\fB\-finline\-matmul\-limit=\fR\fIn\fR" 4
  1554. .IX Item "-finline-matmul-limit=n"
  1555. When front-end optimiztion is active, some calls to the \f(CW\*(C`MATMUL\*(C'\fR
  1556. intrinsic function will be inlined. This may result in code size
  1557. increase if the size of the matrix cannot be determined at compile
  1558. time, as code for both cases is generated. Setting
  1559. \&\f(CW\*(C`\-finline\-matmul\-limit=0\*(C'\fR will disable inlining in all cases.
  1560. Setting this option with a value of \fIn\fR will produce inline code
  1561. for matrices with size up to \fIn\fR. If the matrices involved are not
  1562. square, the size comparison is performed using the geometric mean of
  1563. the dimensions of the argument and result matrices.
  1564. .Sp
  1565. The default value for \fIn\fR is 30. The \f(CW\*(C`\-fblas\-matmul\-limit\*(C'\fR
  1566. can be used to change this value.
  1567. .IP "\fB\-frecursive\fR" 4
  1568. .IX Item "-frecursive"
  1569. Allow indirect recursion by forcing all local arrays to be allocated
  1570. on the stack. This flag cannot be used together with
  1571. \&\fB\-fmax\-stack\-var\-size=\fR or \fB\-fno\-automatic\fR.
  1572. .IP "\fB\-finit\-local\-zero\fR" 4
  1573. .IX Item "-finit-local-zero"
  1574. .PD 0
  1575. .IP "\fB\-finit\-derived\fR" 4
  1576. .IX Item "-finit-derived"
  1577. .IP "\fB\-finit\-integer=\fR\fIn\fR" 4
  1578. .IX Item "-finit-integer=n"
  1579. .IP "\fB\-finit\-real=\fR\fI<zero|inf|\-inf|nan|snan>\fR" 4
  1580. .IX Item "-finit-real=<zero|inf|-inf|nan|snan>"
  1581. .IP "\fB\-finit\-logical=\fR\fI<true|false>\fR" 4
  1582. .IX Item "-finit-logical=<true|false>"
  1583. .IP "\fB\-finit\-character=\fR\fIn\fR" 4
  1584. .IX Item "-finit-character=n"
  1585. .PD
  1586. The \fB\-finit\-local\-zero\fR option instructs the compiler to
  1587. initialize local \f(CW\*(C`INTEGER\*(C'\fR, \f(CW\*(C`REAL\*(C'\fR, and \f(CW\*(C`COMPLEX\*(C'\fR
  1588. variables to zero, \f(CW\*(C`LOGICAL\*(C'\fR variables to false, and
  1589. \&\f(CW\*(C`CHARACTER\*(C'\fR variables to a string of null bytes. Finer-grained
  1590. initialization options are provided by the
  1591. \&\fB\-finit\-integer=\fR\fIn\fR,
  1592. \&\fB\-finit\-real=\fR\fI<zero|inf|\-inf|nan|snan>\fR (which also initializes
  1593. the real and imaginary parts of local \f(CW\*(C`COMPLEX\*(C'\fR variables),
  1594. \&\fB\-finit\-logical=\fR\fI<true|false>\fR, and
  1595. \&\fB\-finit\-character=\fR\fIn\fR (where \fIn\fR is an \s-1ASCII\s0 character
  1596. value) options.
  1597. .Sp
  1598. With \fB\-finit\-derived\fR, components of derived type variables will be
  1599. initialized according to these flags. Components whose type is not covered by
  1600. an explicit \fB\-finit\-*\fR flag will be treated as described above with
  1601. \&\fB\-finit\-local\-zero\fR.
  1602. .Sp
  1603. These options do not initialize
  1604. .RS 4
  1605. .IP "*" 4
  1606. objects with the \s-1POINTER\s0 attribute
  1607. .IP "*" 4
  1608. allocatable arrays
  1609. .IP "*" 4
  1610. variables that appear in an \f(CW\*(C`EQUIVALENCE\*(C'\fR statement.
  1611. .RE
  1612. .RS 4
  1613. .Sp
  1614. (These limitations may be removed in future releases).
  1615. .Sp
  1616. Note that the \fB\-finit\-real=nan\fR option initializes \f(CW\*(C`REAL\*(C'\fR
  1617. and \f(CW\*(C`COMPLEX\*(C'\fR variables with a quiet NaN. For a signalling NaN
  1618. use \fB\-finit\-real=snan\fR; note, however, that compile-time
  1619. optimizations may convert them into quiet NaN and that trapping
  1620. needs to be enabled (e.g. via \fB\-ffpe\-trap\fR).
  1621. .Sp
  1622. The \fB\-finit\-integer\fR option will parse the value into an
  1623. integer of type \f(CW\*(C`INTEGER(kind=C_LONG)\*(C'\fR on the host. Said value
  1624. is then assigned to the integer variables in the Fortran code, which
  1625. might result in wraparound if the value is too large for the kind.
  1626. .Sp
  1627. Finally, note that enabling any of the \fB\-finit\-*\fR options will
  1628. silence warnings that would have been emitted by \fB\-Wuninitialized\fR
  1629. for the affected local variables.
  1630. .RE
  1631. .IP "\fB\-falign\-commons\fR" 4
  1632. .IX Item "-falign-commons"
  1633. By default, \fBgfortran\fR enforces proper alignment of all variables in a
  1634. \&\f(CW\*(C`COMMON\*(C'\fR block by padding them as needed. On certain platforms this is mandatory,
  1635. on others it increases performance. If a \f(CW\*(C`COMMON\*(C'\fR block is not declared with
  1636. consistent data types everywhere, this padding can cause trouble, and
  1637. \&\fB\-fno\-align\-commons\fR can be used to disable automatic alignment. The
  1638. same form of this option should be used for all files that share a \f(CW\*(C`COMMON\*(C'\fR block.
  1639. To avoid potential alignment issues in \f(CW\*(C`COMMON\*(C'\fR blocks, it is recommended to order
  1640. objects from largest to smallest.
  1641. .IP "\fB\-fno\-protect\-parens\fR" 4
  1642. .IX Item "-fno-protect-parens"
  1643. By default the parentheses in expression are honored for all optimization
  1644. levels such that the compiler does not do any re-association. Using
  1645. \&\fB\-fno\-protect\-parens\fR allows the compiler to reorder \f(CW\*(C`REAL\*(C'\fR and
  1646. \&\f(CW\*(C`COMPLEX\*(C'\fR expressions to produce faster code. Note that for the re-association
  1647. optimization \fB\-fno\-signed\-zeros\fR and \fB\-fno\-trapping\-math\fR
  1648. need to be in effect. The parentheses protection is enabled by default, unless
  1649. \&\fB\-Ofast\fR is given.
  1650. .IP "\fB\-frealloc\-lhs\fR" 4
  1651. .IX Item "-frealloc-lhs"
  1652. An allocatable left-hand side of an intrinsic assignment is automatically
  1653. (re)allocated if it is either unallocated or has a different shape. The
  1654. option is enabled by default except when \fB\-std=f95\fR is given. See
  1655. also \fB\-Wrealloc\-lhs\fR.
  1656. .IP "\fB\-faggressive\-function\-elimination\fR" 4
  1657. .IX Item "-faggressive-function-elimination"
  1658. Functions with identical argument lists are eliminated within
  1659. statements, regardless of whether these functions are marked
  1660. \&\f(CW\*(C`PURE\*(C'\fR or not. For example, in
  1661. .Sp
  1662. .Vb 1
  1663. \& a = f(b,c) + f(b,c)
  1664. .Ve
  1665. .Sp
  1666. there will only be a single call to \f(CW\*(C`f\*(C'\fR. This option only works
  1667. if \fB\-ffrontend\-optimize\fR is in effect.
  1668. .IP "\fB\-ffrontend\-optimize\fR" 4
  1669. .IX Item "-ffrontend-optimize"
  1670. This option performs front-end optimization, based on manipulating
  1671. parts the Fortran parse tree. Enabled by default by any \fB\-O\fR option
  1672. except \fB\-O0\fR and \fB\-Og\fR. Optimizations enabled by this option
  1673. include:
  1674. .RS 4
  1675. .ie n .IP "*<inlining calls to ""MATMUL"",>" 4
  1676. .el .IP "*<inlining calls to \f(CWMATMUL\fR,>" 4
  1677. .IX Item "*<inlining calls to MATMUL,>"
  1678. .PD 0
  1679. .IP "*<elimination of identical function calls within expressions,>" 4
  1680. .IX Item "*<elimination of identical function calls within expressions,>"
  1681. .ie n .IP "*<removing unnecessary calls to ""TRIM"" in comparisons and assignments,>" 4
  1682. .el .IP "*<removing unnecessary calls to \f(CWTRIM\fR in comparisons and assignments,>" 4
  1683. .IX Item "*<removing unnecessary calls to TRIM in comparisons and assignments,>"
  1684. .ie n .IP "*<replacing TRIM(a) with ""a(1:LEN_TRIM(a))"" and>" 4
  1685. .el .IP "*<replacing \f(CWTRIM(a)\fR with \f(CWa(1:LEN_TRIM(a))\fR and>" 4
  1686. .IX Item "*<replacing TRIM(a) with a(1:LEN_TRIM(a)) and>"
  1687. .ie n .IP "*<short\-circuiting of logical operators ("".AND."" and "".OR."").>" 4
  1688. .el .IP "*<short\-circuiting of logical operators (\f(CW.AND.\fR and \f(CW.OR.\fR).>" 4
  1689. .IX Item "*<short-circuiting of logical operators (.AND. and .OR.).>"
  1690. .RE
  1691. .RS 4
  1692. .PD
  1693. .Sp
  1694. It can be deselected by specifying \fB\-fno\-frontend\-optimize\fR.
  1695. .RE
  1696. .IP "\fB\-ffrontend\-loop\-interchange\fR" 4
  1697. .IX Item "-ffrontend-loop-interchange"
  1698. Attempt to interchange loops in the Fortran front end where
  1699. profitable. Enabled by default by any \fB\-O\fR option.
  1700. At the moment, this option only affects \f(CW\*(C`FORALL\*(C'\fR and
  1701. \&\f(CW\*(C`DO CONCURRENT\*(C'\fR statements with several forall triplets.
  1702. .SH "ENVIRONMENT"
  1703. .IX Header "ENVIRONMENT"
  1704. The \fBgfortran\fR compiler currently does not make use of any environment
  1705. variables to control its operation above and beyond those
  1706. that affect the operation of \fBgcc\fR.
  1707. .SH "BUGS"
  1708. .IX Header "BUGS"
  1709. For instructions on reporting bugs, see
  1710. <\fBhttps://bugs.linaro.org/\fR>.
  1711. .SH "SEE ALSO"
  1712. .IX Header "SEE ALSO"
  1713. \&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7),
  1714. \&\fIcpp\fR\|(1), \fIgcov\fR\|(1), \fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), \fIgdb\fR\|(1), \fIdbx\fR\|(1)
  1715. and the Info entries for \fIgcc\fR, \fIcpp\fR, \fIgfortran\fR, \fIas\fR,
  1716. \&\fIld\fR, \fIbinutils\fR and \fIgdb\fR.
  1717. .SH "AUTHOR"
  1718. .IX Header "AUTHOR"
  1719. See the Info entry for \fBgfortran\fR for contributors to \s-1GCC\s0 and
  1720. \&\s-1GNU\s0 Fortran.
  1721. .SH "COPYRIGHT"
  1722. .IX Header "COPYRIGHT"
  1723. Copyright (c) 2004\-2020 Free Software Foundation, Inc.
  1724. .PP
  1725. Permission is granted to copy, distribute and/or modify this document
  1726. under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
  1727. any later version published by the Free Software Foundation; with the
  1728. Invariant Sections being \*(L"Funding Free Software\*(R", the Front-Cover
  1729. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  1730. (see below). A copy of the license is included in the \fIgfdl\fR\|(7) man page.
  1731. .PP
  1732. (a) The \s-1FSF\s0's Front-Cover Text is:
  1733. .PP
  1734. .Vb 1
  1735. \& A GNU Manual
  1736. .Ve
  1737. .PP
  1738. (b) The \s-1FSF\s0's Back-Cover Text is:
  1739. .PP
  1740. .Vb 3
  1741. \& You have freedom to copy and modify this GNU Manual, like GNU
  1742. \& software. Copies published by the Free Software Foundation raise
  1743. \& funds for GNU development.
  1744. .Ve