1<!--===- docs/OptionComparison.md
2
3   Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4   See https://llvm.org/LICENSE.txt for license information.
5   SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7-->
8
9# Compiler options
10
11This document catalogs the options processed by F18's peers/competitors.  Much of the document is taken up by a set of tables that list the options categorized into different topics.  Some of the table headings link to more information about the contents of the tables.  For example, the table on **Standards conformance** options links to [notes on Standards conformance](#standards).
12
13**There's also important information in the ___[Notes section](#notes)___ near the end of the document on how this data was gathered and what ___is___ and ___is not___ included in this document.**
14
15Note that compilers may support language features without having an option for them.  Such cases are frequently, but not always noted in this document.
16
17<table>
18  <tr>
19   <td colspan="7" ><strong><a href="#standards">Standards conformance</a></strong>
20   </td>
21  </tr>
22  <tr>
23   <td><strong>Option</strong> </td>
24   <td><strong>Cray</strong> </td>
25   <td><strong>GNU</strong> </td>
26   <td><strong>IBM</strong> </td>
27   <td><strong>Intel</strong> </td>
28   <td><strong>PGI</strong> </td>
29   <td><strong>Flang</strong> </td>
30  </tr>
31  <tr>
32   <td>Overall conformance </td>
33   <td>en,
34<p>
35eN
36   </td>
37   <td>std=<em>level</em> </td>
38   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=210">qlanglvl</a>, <a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=257">qsaa</a>
39   </td>
40   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-stand">stand level</a>
41   </td>
42   <td>Mstandard
43   </td>
44   <td>Mstandard
45   </td>
46  </tr>
47  <tr>
48   <td>Compatibility with previous standards or implementations
49   </td>
50   <td>N/A
51   </td>
52   <td>fdec,
53<p>
54fall-instrinsics
55   </td>
56   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=297">qxlf77</a>,
57<p>
58<a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=299">qxlf90</a>,
59<p>
60<a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=301">qxlf2003</a>,
61<p>
62<a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=305">qxfl2008</a>,
63<p>
64<a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=245">qport</a>
65   </td>
66   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-f66">f66</a>,
67<p>
68<a href="https://software.intel.com/node/a8bfa478-22d5-4000-b0ac-b881804a7611">f77rtl</a>,
69<p>
70<a href="https://software.intel.com/node/647820a0-fc53-4252-a858-46feb012a281">fpscomp</a>,
71<p>
72<a href="https://software.intel.com/node/e610682a-00fe-4881-9cf7-8eee08c5f2a2">Intconstant</a>,
73<p>
74<a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-standard-realloc-lhs">nostandard-realloc-lhs</a>,
75<p>
76<a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-standard-semantics">standard-semantics</a>,
77<p>
78<a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume nostd_intent_in</a>,
79<p>
80<a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume nostd_value</a>,
81<p>
82<a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume norealloc_lhs</a>
83   </td>
84   <td>Mallocatable=95|03
85   </td>
86   <td>Mallocatable=95|03
87   </td>
88  </tr>
89</table>
90
91
92
93
94
95<table>
96  <tr>
97   <td colspan="7" ><strong><a href="#source">Source format</a></strong>
98   </td>
99  </tr>
100  <tr>
101   <td><strong>Option</strong>
102   </td>
103   <td><strong>Cray</strong>
104   </td>
105   <td><strong>GNU</strong>
106   </td>
107   <td><strong>IBM</strong>
108   </td>
109   <td><strong>Intel</strong>
110   </td>
111   <td><strong>PGI</strong>
112   </td>
113   <td><strong>Flang</strong>
114   </td>
115  </tr>
116  <tr>
117   <td>Fixed or free source
118   </td>
119   <td>f free,
120<p>
121f fixed
122   </td>
123   <td>ffree-form,
124<p>
125ffixed-form
126   </td>
127   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=179">qfree</a>,
128<p>
129<a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=169">qfixed</a>
130   </td>
131   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-fixed">fixed</a>,
132<p>
133<a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-free">free</a>
134   </td>
135   <td>Mfree,
136<p>
137Mfixed
138   </td>
139   <td>Mfreeform,
140<p>
141Mfixed
142   </td>
143  </tr>
144  <tr>
145   <td>Source line length
146   </td>
147   <td>N <em>col</em>
148   </td>
149   <td>ffixed-line-length-n,
150<p>
151ffree-line-length-n
152   </td>
153   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=169">qfixed=n</a>
154   </td>
155   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-extend-source">extend-source [size]</a>
156   </td>
157   <td>Mextend
158   </td>
159   <td>Mextend
160   </td>
161  </tr>
162  <tr>
163   <td>Column 1 comment specifier
164   </td>
165   <td>ed
166   </td>
167   <td>fd-lines-as-code,
168<p>
169fd-lines-as-comments
170   </td>
171   <td>D,
172<p>
173<a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=161">qdlines</a>,
174<p>
175<a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=306">qxlines</a>
176   </td>
177   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-d-lines-qd-lines">d-lines</a>
178   </td>
179   <td>Mdlines
180   </td>
181   <td>N/A
182   </td>
183  </tr>
184  <tr>
185   <td>Don't treat CR character as a line terminator
186   </td>
187   <td>NA
188   </td>
189   <td>N/A
190   </td>
191   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=153">qnocr</a>
192   </td>
193   <td>N/A
194   </td>
195   <td>N/A
196   </td>
197   <td>N/A
198   </td>
199  </tr>
200  <tr>
201   <td>Source file naming
202   </td>
203   <td>N/A
204   </td>
205   <td>N/A
206   </td>
207   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=282">qsuffix</a>
208   </td>
209   <td><a href="https://software.intel.com/node/84174680-3c7d-4225-9611-6083f496aa9b">extfor</a>,
210<p>
211<a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-tf">Tf filename</a>
212   </td>
213   <td>N/A
214   </td>
215   <td>N/A
216   </td>
217  </tr>
218</table>
219
220
221
222
223
224<table>
225  <tr>
226   <td colspan="7" ><strong><a href="#names">Names, Literals, and other tokens</a></strong>
227   </td>
228  </tr>
229  <tr>
230   <td><strong>Option</strong>
231   </td>
232   <td><strong>Cray</strong>
233   </td>
234   <td><strong>GNU</strong>
235   </td>
236   <td><strong>IBM</strong>
237   </td>
238   <td><strong>Intel</strong>
239   </td>
240   <td><strong>PGI</strong>
241   </td>
242   <td><strong>Flang</strong>
243   </td>
244  </tr>
245  <tr>
246   <td>Max identifier length
247   </td>
248   <td>N/A
249   </td>
250   <td>fmax-identifier-length=<em>n</em>
251   </td>
252   <td>N/A
253   </td>
254   <td>N/A
255   </td>
256   <td>N/A
257   </td>
258   <td>N/A
259   </td>
260  </tr>
261  <tr>
262   <td>"$" in symbol names
263   </td>
264   <td>N/A
265   </td>
266   <td>fdollar-ok
267   </td>
268   <td>default
269   </td>
270   <td>default
271   </td>
272   <td>N/A
273   </td>
274   <td>N/A
275   </td>
276  </tr>
277  <tr>
278   <td>Allow names with leading "_"
279   </td>
280   <td>eQ
281   </td>
282   <td>N/A
283   </td>
284   <td>N/A
285   </td>
286   <td>N/A
287   </td>
288   <td>N/A
289   </td>
290   <td>N/A
291   </td>
292  </tr>
293  <tr>
294   <td>Specify name format
295   </td>
296   <td>N/A
297   </td>
298   <td>N/A
299   </td>
300   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=296">U</a>
301   </td>
302   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-names">names=keyword</a>
303   </td>
304   <td>Mupcase
305   </td>
306   <td>NA
307   </td>
308  </tr>
309  <tr>
310   <td>Escapes in literals
311   </td>
312   <td>N/A
313   </td>
314   <td>fbackslash
315   </td>
316   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=163">qescape</a>
317   </td>
318   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume bscc</a>
319   </td>
320   <td>Mbackslash
321   </td>
322   <td>Mbackslash
323   </td>
324  </tr>
325  <tr>
326   <td>Allow multibyte characters in strings
327   </td>
328   <td>N/A
329   </td>
330   <td>N/A
331   </td>
332   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=223">qmbcs</a>
333   </td>
334   <td>N/A
335   </td>
336   <td>N/A
337   </td>
338   <td>N/A
339   </td>
340  </tr>
341  <tr>
342   <td>Create null terminated strings
343   </td>
344   <td>N/A
345   </td>
346   <td>N/A
347   </td>
348   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=228">qnullterm</a>
349   </td>
350   <td>N/A
351   </td>
352   <td>N/A
353   </td>
354   <td>N/A
355   </td>
356  </tr>
357  <tr>
358   <td>Character to use for "$"
359   </td>
360   <td>N/A
361   </td>
362   <td>N/A
363   </td>
364   <td>N/A
365   </td>
366   <td>N/A
367   </td>
368   <td>Mdollar,<em>char</em>
369   </td>
370   <td>
371   </td>
372  </tr>
373  <tr>
374   <td>Allow PARAMETER statements without parentheses
375   </td>
376   <td>N/A
377   </td>
378   <td>N/A
379   </td>
380   <td>N/A
381   </td>
382   <td><a href="https://software.intel.com/node/42e8ec08-64cc-44ba-a636-20ed50c682cd">altparam</a>
383   </td>
384   <td>N?A
385   </td>
386   <td>N/A
387   </td>
388  </tr>
389</table>
390
391
392
393<table>
394  <tr>
395   <td colspan="7" ><strong><a href="#do">DO loop handling</a></strong>
396   </td>
397  </tr>
398  <tr>
399   <td><strong>Option</strong>
400   </td>
401   <td><strong>Cray</strong>
402   </td>
403   <td><strong>GNU</strong>
404   </td>
405   <td><strong>IBM</strong>
406   </td>
407   <td><strong>Intel</strong>
408   </td>
409   <td><strong>PGI</strong>
410   </td>
411   <td><strong>Flang</strong>
412   </td>
413  </tr>
414  <tr>
415   <td>One trip DO loops
416   </td>
417   <td>ej
418   </td>
419   <td>N/A
420   </td>
421   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=113">1</a>,
422<p>
423<a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=231">qonetrip</a>
424   </td>
425   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-f66">f66</a>
426   </td>
427   <td>Monetrip
428   </td>
429   <td>N/A
430   </td>
431  </tr>
432  <tr>
433   <td>Allow branching into loops
434   </td>
435   <td>eg
436   </td>
437   <td>N/A
438   </td>
439   <td>N/A
440   </td>
441   <td>N/A
442   </td>
443   <td>N/A
444   </td>
445   <td>N/A
446   </td>
447  </tr>
448</table>
449
450
451
452
453
454<table>
455  <tr>
456   <td colspan="7" ><strong><a href="#real">REAL, DOUBLE PRECISION, and COMPLEX Data</a></strong>
457   </td>
458  </tr>
459  <tr>
460   <td><strong>Option</strong>
461   </td>
462   <td><strong>Cray</strong>
463   </td>
464   <td><strong>GNU</strong>
465   </td>
466   <td><strong>IBM</strong>
467   </td>
468   <td><strong>Intel</strong>
469   </td>
470   <td><strong>PGI</strong>
471   </td>
472   <td><strong>Flang</strong>
473   </td>
474  </tr>
475  <tr>
476   <td>Default REAL size
477   </td>
478   <td>s real32,
479<p>
480s real64,
481<p>
482s default32,
483<p>
484s default64
485   </td>
486   <td>fdefault-real-[8|10|16]
487   </td>
488   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=252">qrealsize=[4|8]</a>
489   </td>
490   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-real-size">real-size [32|64|128]</a>
491   </td>
492   <td>r[4|8]
493   </td>
494   <td>r8,
495<p>
496fdefault-real-8
497   </td>
498  </tr>
499  <tr>
500   <td>Default DOUBLE PRECISION size
501   </td>
502   <td>ep
503   </td>
504   <td>fdefault-double-8
505   </td>
506   <td>N/A
507   </td>
508   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-double-size">double-size[64|128]</a>
509   </td>
510   <td>N/A
511   </td>
512   <td>N/A
513   </td>
514  </tr>
515  <tr>
516   <td>Make real constants DOUBLE PRECISION
517   </td>
518   <td>N/A
519   </td>
520   <td>N/A
521   </td>
522   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=161">qdpc</a>
523   </td>
524   <td>N/A
525   </td>
526   <td>N/A
527   </td>
528   <td>N/A
529   </td>
530  </tr>
531  <tr>
532   <td>Promote or demote REAL type sizes
533   </td>
534   <td>N/A
535   </td>
536   <td>freal-[4|8]-real[4|8|10|16]
537   </td>
538   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=144">qautodbl=size</a>
539   </td>
540   <td>N/A
541   </td>
542   <td>Mr8,
543<p>
544Mr8intrinsics
545   </td>
546   <td>N/A
547   </td>
548  </tr>
549  <tr>
550   <td>Rounding mode
551   </td>
552   <td>N/A
553   </td>
554   <td>N/A
555   </td>
556   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=190">qieee</a>
557   </td>
558   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume std_minus0_rounding</a>
559   </td>
560   <td>N/A
561   </td>
562   <td>N/A
563   </td>
564  </tr>
565  <tr>
566   <td>Treatment of -0.0
567   </td>
568   <td>N/A
569   </td>
570   <td>N/A
571   </td>
572   <td>N/A
573   </td>
574   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume minus0</a>
575   </td>
576   <td>
577   </td>
578   <td>
579   </td>
580  </tr>
581</table>
582
583
584
585
586
587<table>
588  <tr>
589   <td colspan="7" ><strong><a href="#integer">INTEGER and LOGICAL Data</a></strong>
590   </td>
591  </tr>
592  <tr>
593   <td><strong>Option</strong>
594   </td>
595   <td><strong>Cray</strong>
596   </td>
597   <td><strong>GNU</strong>
598   </td>
599   <td><strong>IBM</strong>
600   </td>
601   <td><strong>Intel</strong>
602   </td>
603   <td><strong>PGI</strong>
604   </td>
605   <td><strong>Flang</strong>
606   </td>
607  </tr>
608  <tr>
609   <td>Default INTEGER size
610   </td>
611   <td>s integer32,
612<p>
613s integer64,
614<p>
615s default32,
616<p>
617s default64
618   </td>
619   <td>fdefault-integer-8
620   </td>
621   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=202">qintsize=[2|4|8]</a>
622   </td>
623   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-integer-size">integer-size [32|64|128]</a>
624   </td>
625   <td>I[2|4|8],
626<p>
627Mi4,
628<p>
629Mnoi4
630   </td>
631   <td>i8,
632<p>
633fdefault-integer-8
634   </td>
635  </tr>
636  <tr>
637   <td>Promote INTEGER sizes
638   </td>
639   <td>N/A
640   </td>
641   <td>finteger-4-integer-8
642   </td>
643   <td>N/A
644   </td>
645   <td>N/A
646   </td>
647   <td>N/A
648   </td>
649   <td>N/A
650   </td>
651  </tr>
652  <tr>
653   <td>Enable 8 and 16 bit INTEGER and LOGICALS
654   </td>
655   <td>eh
656   </td>
657   <td>N/A
658   </td>
659   <td>N/A
660   </td>
661   <td>N/A
662   </td>
663   <td>N/A
664   </td>
665   <td>N/A
666   </td>
667  </tr>
668  <tr>
669   <td>Change how the compiler treats LOGICAL
670   </td>
671   <td>N/A
672   </td>
673   <td>N/A
674   </td>
675   <td>N/A
676   </td>
677   <td>N/A
678   </td>
679   <td>Munixlogical
680   </td>
681   <td>
682   </td>
683  </tr>
684  <tr>
685   <td>Treatment of numeric constants as arguments
686   </td>
687   <td>N/A
688   </td>
689   <td>N/A
690   </td>
691   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=297">qxlf77 oldboz</a>
692   </td>
693   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume old_boz</a>
694   </td>
695   <td>N/A
696   </td>
697   <td>N/A
698   </td>
699  </tr>
700  <tr>
701   <td>Treatment of assignment between numerics and logicals
702   </td>
703   <td>N/A
704   </td>
705   <td>N/A
706   </td>
707   <td>N/A
708   </td>
709   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume old_logical_assign</a>
710   </td>
711   <td>N/A
712   </td>
713   <td>N/A
714   </td>
715  </tr>
716</table>
717
718
719
720
721
722<table>
723  <tr>
724   <td colspan="7" ><strong>CHARACTER and Pointer Data</strong>
725   </td>
726  </tr>
727  <tr>
728   <td><strong>Option</strong>
729   </td>
730   <td><strong>Cray</strong>
731   </td>
732   <td><strong>GNU</strong>
733   </td>
734   <td><strong>IBM</strong>
735   </td>
736   <td><strong>Intel</strong>
737   </td>
738   <td><strong>PGI</strong>
739   </td>
740   <td><strong>Flang</strong>
741   </td>
742  </tr>
743  <tr>
744   <td>Use bytes for pointer arithmetic
745   </td>
746   <td>s byte_pointer
747   </td>
748   <td>N/A
749   </td>
750   <td>N/A
751   </td>
752   <td>N/A
753   </td>
754   <td>N/A
755   </td>
756   <td>N/A
757   </td>
758  </tr>
759  <tr>
760   <td>Use words for pointer arithmetic
761   </td>
762   <td>S word_pointer
763   </td>
764   <td>N/A
765   </td>
766   <td>N/A
767   </td>
768   <td>N/A
769   </td>
770   <td>N/A
771   </td>
772   <td>N/A
773   </td>
774  </tr>
775  <tr>
776   <td>Allow character constants for typeless constants
777   </td>
778   <td>N/A
779   </td>
780   <td>N/A
781   </td>
782   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=153">qctyplss</a>
783   </td>
784   <td>N/A
785   </td>
786   <td>N/A
787   </td>
788   <td>N/A
789   </td>
790  </tr>
791</table>
792
793<table>
794  <tr>
795   <td colspan="7" ><strong>Data types and allocation</strong>
796   </td>
797  </tr>
798  <tr>
799   <td><strong>Option</strong>
800   </td>
801   <td><strong>Cray</strong>
802   </td>
803   <td><strong>GNU</strong>
804   </td>
805   <td><strong>IBM</strong>
806   </td>
807   <td><strong>Intel</strong>
808   </td>
809   <td><strong>PGI</strong>
810   </td>
811   <td><strong>Flang</strong>
812   </td>
813  </tr>
814  <tr>
815   <td>Default to IMPLICIT NONE
816   </td>
817   <td>eI
818   </td>
819   <td>fimplicit-none
820   </td>
821   <td>u, <a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=291">qundef</a>
822   </td>
823   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-warn">warn declarations</a>
824   </td>
825   <td>Mdclchk
826   </td>
827   <td>N/A
828   </td>
829  </tr>
830  <tr>
831   <td>Enable DEC STRUCTURE extensions
832   </td>
833   <td>N/A
834   </td>
835   <td><a href="https://gcc.gnu.org/onlinedocs/gfortran/STRUCTURE-and-RECORD.html">fdec-structure</a>
836   </td>
837   <td>N/A
838   </td>
839   <td>N/A
840   </td>
841   <td><a href="https://www.pgroup.com/doc/pgi15fortref.pdf#page=86">default</a>
842   </td>
843   <td>N/A
844   </td>
845  </tr>
846  <tr>
847   <td>Enable <a href="https://pubs.cray.com/content/S-3901/8.7/cray-fortran-reference-manual/types">Cray pointers</a>
848   </td>
849   <td>default
850   </td>
851   <td>fcray-pointer
852   </td>
853   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024776&aid=1#page=432">Default (near equivalent)</a>
854   </td>
855   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-pointer-integer">Default (near equivalent)</a>
856   </td>
857   <td>Mcray
858   </td>
859   <td>N/A
860   </td>
861  </tr>
862  <tr>
863   <td>Allow bitwise logical operations on numeric
864   </td>
865   <td>ee
866   </td>
867   <td>N/A
868   </td>
869   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=201">qintlog</a>
870   </td>
871   <td>N/A
872   </td>
873   <td>N/A
874   </td>
875   <td>N/A
876   </td>
877  </tr>
878  <tr>
879   <td>Allow DEC STATIC and AUTOMATIC declarations
880   </td>
881   <td>default
882   </td>
883   <td>fdec-static
884   </td>
885   <td>Default, see <a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024776&aid=1#page=393">IMPLICIT STATIC</a> and <a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024776&aid=1#page=393">IMPLICIT AUTOMATIC</a>
886   </td>
887   <td>Default, see <a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-automatic">AUTOMATIC</a> and <a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-static-1#408BC4E6-7AA7-4475-A280-205D34AE2E4F">STATIC</a>
888   </td>
889   <td><a href="https://www.pgroup.com/doc/pgi15fortref.pdf#page=86">Default</a>
890   </td>
891   <td>N/A
892   </td>
893  </tr>
894  <tr>
895   <td>Allocate variables to static storage
896   </td>
897   <td>ev
898   </td>
899   <td>fno-automatic
900   </td>
901   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=258">qsave</a>
902   </td>
903   <td><a href="https://software.intel.com/node/3ed16417-6eed-4e09-9edd-4ae03e77c6cf">save</a>,
904<p>
905<a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-auto">noauto</a>
906   </td>
907   <td>Mnorecursive,
908<p>
909Msave
910   </td>
911   <td>N/A
912   </td>
913  </tr>
914  <tr>
915   <td>Compile procedures as if RECURSIVE
916   </td>
917   <td>eR
918   </td>
919   <td>frecursive
920   </td>
921   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=254">q recur</a>
922   </td>
923   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume recursion</a>,
924<p>
925<a href="https://software.intel.com/node/1c3820b4-42a1-48ea-887a-2cf39a41ce53">recursive</a>
926   </td>
927   <td>Mrecursive
928   </td>
929   <td>Mrecursive
930   </td>
931  </tr>
932</table>
933
934
935<table>
936  <tr>
937   <td colspan="7" ><strong><a href="#arrays">Arrays</strong>
938   </td>
939  </tr>
940  <tr>
941   <td><strong>Option</strong>
942   </td>
943   <td><strong>Cray</strong>
944   </td>
945   <td><strong>GNU</strong>
946   </td>
947   <td><strong>IBM</strong>
948   </td>
949   <td><strong>Intel</strong>
950   </td>
951   <td><strong>PGI</strong>
952   </td>
953   <td><strong>Flang</strong>
954   </td>
955  </tr>
956  <tr>
957  <tr>
958   <td>Enable coarrays
959   </td>
960   <td>h caf
961   </td>
962   <td>fcoarray=<em>key</em>
963   </td>
964   <td>N/A
965   </td>
966   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-coarray-qcoarray">coarray[=keyword]</a>
967   </td>
968   <td>N/A
969   </td>
970   <td>N/A
971   </td>
972  </tr>
973  <tr>
974   <td>Contiguous array pointers
975   </td>
976   <td>h contiguous
977   </td>
978   <td>N/A
979   </td>
980   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=142">qassert=contig</a>
981   </td>
982   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume contiguous_pointer</a>
983   </td>
984   <td>N/A
985   </td>
986   <td>N/A
987   </td>
988  </tr>
989  <tr>
990   <td>Contiguous assumed shape dummy arguments
991   </td>
992   <td>h contiguous_assumed_shape
993   </td>
994   <td>frepack-arrays
995   </td>
996   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=142">qassert=contig</a>
997   </td>
998   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-assume">assume contiguous_assumed_shape</a>
999   </td>
1000   <td>N/A
1001   </td>
1002   <td>N/A
1003   </td>
1004  </tr>
1005</table>
1006
1007
1008
1009
1010<table>
1011  <tr>
1012   <td colspan="7" ><strong>OpenACC, OpenMP, and CUDA</strong>
1013   </td>
1014  </tr>
1015  <tr>
1016   <td><strong>Option</strong>
1017   </td>
1018   <td><strong>Cray</strong>
1019   </td>
1020   <td><strong>GNU</strong>
1021   </td>
1022   <td><strong>IBM</strong>
1023   </td>
1024   <td><strong>Intel</strong>
1025   </td>
1026   <td><strong>PGI</strong>
1027   </td>
1028   <td><strong>Flang</strong>
1029   </td>
1030  </tr>
1031  <tr>
1032   <td>Enable OpenACC
1033   </td>
1034   <td> <a href="https://pubs.cray.com/content/S-3901/8.7/cray-fortran-reference-manual/program-model-specific-options">h acc</a>
1035   </td>
1036   <td>fopenacc
1037   </td>
1038   <td>N/A
1039   </td>
1040   <td>N/A
1041   </td>
1042   <td><a href="https://www.pgroup.com/resources/docs/19.1/x86/pgi-ref-guide/index.htm#acc">acc</a>
1043   </td>
1044   <td>N/A
1045   </td>
1046  </tr>
1047  <tr>
1048   <td>Enable OpenMP
1049   </td>
1050   <td> <a href="https://pubs.cray.com/content/S-3901/8.7/cray-fortran-reference-manual/program-model-specific-options">h omp</a>
1051   </td>
1052   <td>fopenmp
1053   </td>
1054   <td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=285">qswapomp</a>
1055   </td>
1056   <td><a href="https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-qopenmp-qopenmp">qopenmp</a>,
1057<p>
1058<a href="https://software.intel.com/node/26d2aef3-9c68-4ef2-9241-bce168a48629">qopenmp-lib</a>,
1059<p>
1060<a href="https://software.intel.com/node/f8d22e40-7ed0-4ec6-8e80-d4d27010ca8b">qopenmp-link</a>,
1061<p>
1062<a href="https://software.intel.com/node/2cc99a64-9605-44e2-b40a-1409ba459a62">qopenmp-offload</a>,
1063<p>
1064<a href="https://software.intel.com/node/02ef8658-3e66-4634-8a11-68eec60322c1">qopenmp-simd</a>,
1065<p>
1066<a href="https://software.intel.com/node/088272f2-5eae-42c2-a053-20f42022343d">qopenmp-stubs</a>,
1067<p>
1068<a href="https://software.intel.com/node/0ed8bee0-62b4-4266-8cbb-f25b585d4800">qopenmp-threadprivate</a>
1069   </td>
1070   <td><a href="https://www.pgroup.com/resources/docs/19.1/x86/pgi-ref-guide/index.htm#mp">mp</a>,
1071<p>
1072Mcuda
1073   </td>
1074   <td>-mp
1075   </td>
1076  </tr>
1077</table>
1078
1079
1080
1081<table>
1082  <tr>
1083   <td colspan="7" ><strong><a href="#miscellaneous">Miscellaneous</a></strong>
1084   </td>
1085  </tr>
1086  <tr>
1087   <td><strong>Option</strong>
1088   </td>
1089   <td><strong>Cray</strong>
1090   </td>
1091   <td><strong>GNU</strong>
1092   </td>
1093   <td><strong>IBM</strong>
1094   </td>
1095   <td><strong>Intel</strong>
1096   </td>
1097   <td><strong>PGI</strong>
1098   </td>
1099   <td><strong>Flang</strong>
1100   </td>
1101  </tr>
1102  <tr>
1103   <td>Disable compile time range checking
1104   </td>
1105   <td> N/A
1106   </td>
1107   <td>fno-range-check
1108   </td>
1109   <td>N/A
1110   </td>
1111   <td>N/A
1112   </td>
1113   <td>N/A
1114   </td>
1115   <td>N/A
1116   </td>
1117  </tr>
1118  <tr>
1119   <td>Disable call site checking
1120   </td>
1121   <td>dC
1122   </td>
1123   <td>N/A
1124   </td>
1125   <td>N/A
1126   </td>
1127   <td>N/A
1128   </td>
1129   <td>N/A
1130   </td>
1131   <td>N/A
1132   </td>
1133  </tr>
1134  <tr>
1135   <td>Warn for bad call checking
1136   </td>
1137   <td>eb
1138   </td>
1139   <td>N/A
1140   </td>
1141   <td>N/A
1142   </td>
1143   <td>N/A
1144   </td>
1145   <td>N/A
1146   </td>
1147   <td>N/A
1148   </td>
1149  </tr>
1150  <tr>
1151   <td>Set default accessibility of module entities to PRIVATE
1152   </td>
1153   <td>N/A
1154   </td>
1155   <td>fmodule-private
1156   </td>
1157   <td>N/A
1158   </td>
1159   <td>N/A
1160   </td>
1161   <td>N/A
1162   </td>
1163   <td>N/A
1164   </td>
1165  </tr>
1166  <tr>
1167   <td>Force FORALL to use temp
1168   </td>
1169   <td>N/A
1170   </td>
1171   <td>ftest-forall-temp
1172   </td>
1173   <td>N/A
1174   </td>
1175   <td>N/A
1176   </td>
1177   <td>N/A
1178   </td>
1179   <td>N/A
1180   </td>
1181  </tr>
1182</table>
1183
1184
1185
1186## <a name="notes"></a>Notes
1187
1188**<a name="standards"></a>Standards conformance:**
1189
1190All conformance options are similar -- they issue warnings if non-standard features are used.  All defaults are to allow extensions without warnings.  The GNU, IBM, and Intel compilers allow multiple standard levels to be specified.
1191
1192
1193
1194*   **Cray**: The capital "-eN" option specifies to issue error messages for non-compliance rather than warnings.
1195*   **GNU:** The "std=_level_" option specifies the standard to which the program is expected to conform.   The default value for std is 'gnu', which specifies a superset of the latest Fortran standard that includes all of the extensions supported by GNU Fortran, although warnings will be given for obsolete extensions not recommended for use in new code. The 'legacy' value is equivalent but without the warnings for obsolete extensions. The 'f95', 'f2003', 'f2008', and 'f2018' values specify strict conformance to the respective standards.  Errors are given for all extensions beyond the relevant language standard, and warnings are given for the Fortran 77 features that are permitted but obsolescent in later standards. '-std=f2008ts' allows the Fortran 2008 standard including the additions of the Technical Specification (TS) 29113 on Further Interoperability of Fortran with C and TS 18508 on Additional Parallel Features in Fortran.  Values for "_level_" are f_95, f2003, f2008, f2008ts, f2018, gnu,_ and _legacy._
1196
1197**<a name="source"></a>Source format:**
1198
1199**Fixed or free source:**  Cray, IBM, and Intel default the source format based on the source file suffix as follows:
1200
1201
1202
1203*   **Cray**
1204    *   **Free:** .f90, .F90, .f95, .F95, .f03, .F03, .f08, .F08, .ftn, .FTN
1205    *   **Fixed:** .f, .F, .for, .FOR
1206*   **Intel**
1207    *   **Free:** .f90, .F90, .i90
1208    *   **Fixed:** .f, .for, .FOR, .ftn, .FTN, .fpp, .FPP, .i
1209
1210IBM Fortran's options allow the source line length to be specified with the option, e.g., "-qfixed=72".  IBM bases the default on the name of the command used to invoke the compiler.  IBM has 16 different commands that invoke the Fortran compiler, and the default use of free or fixed format and the line length are based on the command name.  -qfixed=72 is the default for the xlf, xlf_r, f77, and fort77 commands. -qfree=f90is the default for the f90, xlf90, xlf90_r, f95, xlf95, xlf95_r, f2003, xlf2003, xlf2003_r, f2008, xlf2008, and xlf2008_r commands.  The maximum line length for either source format is 132 characters.
1211
1212**Column 1 comment specifier:**  All compilers allow "D" in column 1 to specify that the line contains a comment and have this as the default for fixed format source.  IBM also supports an "X" in column 1 with the option "-qxlines".
1213
1214**Source line length:**
1215
1216
1217*   **Cray:** The "-N _col_" option specifies the line width for fixed- and free-format source lines. The value used for col specifies the maximum number of columns per line.  For free form sources, col can be set to 132, 255, or 1023.  For fixed form sources, col can be set to 72, 80, 132, 255, or 1023.  Characters in columns beyond the col specification are ignored.  By default, lines are 72 characters wide for fixed-format sources and 255 characters wide for free-form sources.
1218*   **GNU:** For both "ffixed-line-length-_n_" and "ffree-line-length-_n_" options, characters are ignored after the specified length.  The default for fixed is 72.  The default for free is 132.  For free, you can specify 'none' as the length, which means that all characters in the line are meaningful.
1219*   **IBM:** For **fixed**, the default is 72.  For **free**, there's no default, but the maximum length for either form is 132.
1220*   **Intel:** The default is 72 for **fixed** and 132 for **free**.
1221*   **PGI, Flang:**
1222    * in free form, it is an error if the line is longer than 1000 characters
1223    * in fixed form by default, characters after column 72 are ignored
1224    * in fixed form with -Mextend, characters after column 132 are ignored
1225
1226**<a name="names"></a>Names, Literals, and other tokens**
1227
1228**Escapes in literals:**
1229
1230
1231*   **GNU:** The "-fbackslash" option the interpretation of backslashes in string literals from a single backslash character to "C-style" escape characters. The following combinations are expanded \a, \b, \f, \n, \r, \t, \v, \\, and \0 to the ASCII characters alert, backspace, form feed, newline, carriage return, horizontal tab, vertical tab, backslash, and NUL, respectively. Additionally, \xnn, \unnnn and \Unnnnnnnn (where each n is a hexadecimal digit) are translated into the Unicode characters corresponding to the specified code points. All other combinations of a character preceded by \ are unexpanded.
1232*   **Intel:** The option "-assume bscc" tells the compiler to treat the backslash character (\) as a C-style control (escape) character syntax in character literals. "nobscc" specifies that the backslash character is treated as a normal character in character literals.  This is the default.
1233
1234**"$" in symbol names:** Allowing "$" in names is controlled by an option in GNU and is the default behavior in IBM and Intel.  Presumably, these compilers issue warnings when standard conformance options are enabled.  Dollar signs in names don't seem to be allowed in Cray, PGI, or Flang.
1235
1236**<a name="do"></a>DO loop handling**
1237
1238**One trip:**
1239
1240
1241
1242*   **IBM:** IBM has two options that do the same thing: "-1" and "-qonetrip".
1243*   **Intel:** Intel used to support a "-onetrip" option, but it has been removed.  Intel now supports a "-f66" option that ensures that DO loops are executed at least once in addition to [several other Fortran 66 semantic features](https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-f66#320D769C-7C41-4A84-AE0E-50A72296A838).
1244
1245**<a name="real"></a>REAL, DOUBLE PRECISION, and COMPLEX Data**
1246
1247These size options affect the sizes of variables, literals, and intrinsic function results.
1248
1249**Default REAL sizes:** These options do not affect the size of explicitly declared data (for example, REAL(KIND=4).
1250
1251
1252
1253*   **Cray:** The "-s default32" and "-s default64" options affect both REAL, INTEGER, and LOGICAL types.
1254
1255**Default DOUBLE PRECISION:** These options allow control of the size of DOUBLE PRECISION types in conjunction with controlling REAL types.
1256
1257
1258
1259*   **Cray:** The "-ep" option controls DOUBLE PRECISION. This option can only be enabled when the default data size is 64 bits ("-s default64" or "-s real64").  When "-s default64" or "-s real64" is specified, and double precision arithmetic is disabled, DOUBLE PRECISION variables and constants specified with the D exponent are converted to default real type (64-bit). If double precision is enabled ("-ep"), they are handled as a double precision type (128-bit).  Similarly when the "-s default64" or" -s real64" option is used, variables declared on a DOUBLE COMPLEX statement and complex constants specified with the D exponent are mapped to the complex type in which each part has a default real type, so the complex variable is 128-bit. If double precision is enabled ("-ep"), each part has double precision type, so the double complex variable is 256-bit.
1260*   **GNU:** The "-fdefault-double-8" option sets the DOUBLE PRECISION type to an 8 byte wide type. Do nothing if this is already the default. If "-fdefault-real-8" is given, DOUBLE PRECISION would instead be promoted to 16 bytes if possible, and "-fdefault-double-8" can be used to prevent this. The kind of real constants like 1.d0 will not be changed by "-fdefault-real-8" though, so also "-fdefault-double-8" does not affect it.
1261
1262**Promote or demote REAL type sizes:** These options change the meaning of data types specified by declarations of the form REAL(KIND=_N_), except, perhaps for PGI.
1263
1264*   **GNU:** The allowable combinations are "-freal-4-real-8", "-freal-4-real-10", "-freal-4-real-16", "-freal-8-real-4", "-freal-8-real-10", and "-freal-8-real-16".
1265*   **IBM:** The "-qautodbl" option  is documented [here](https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=144).
1266*   **PGI:** The "-Mr8" option promotes REAL variables and constants to DOUBLE PRECISION variables and constants, respectively. DOUBLE PRECISION elements are 8 bytes in length.  The "-Mr8intrinsics" option promotes the intrinsics CMPLX and REAL as DCMPLX and DBLE, respectively.
1267
1268**<a name="integer"></a>INTEGER and LOGICAL Data**
1269
1270These size options affect the sizes of variables, literals, and intrinsic function results.
1271
1272**Default INTEGER sizes:** For all compilers, these options affect both INTEGER and LOGICAL types.
1273
1274**Enable 8 and 16 bit INTEGER and LOGICAL:** This Cray option ("-eh") enables support for 8-bit and 16-bit INTEGER and LOGICAL types that use explicit kind or star values.  By default ("-eh"), data objects declared as INTEGER(kind=1) or LOGICAL(kind=1) are 8 bits long, and objects declared as INTEGER(kind=2) or LOGICAL(kind=2) are 16 bits long. When this option is disabled ("-dh"), data objects declared as INTEGER(kind=1), INTEGER(kind=2), LOGICAL(kind=1), or LOGICAL(kind=2) are 32 bits long.
1275
1276**Intrinsic functions**
1277
1278GNU is the only compiler with options governing the use of non-standard intrinsics.  For more information on the GNU options, see [here](https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gfortran/Fortran-Dialect-Options.html#Fortran-Dialect-Options).  All compilers implement non-standard intrinsics but don't have options that affect access to them.
1279
1280**<a name="arrays"></a>Arrays**
1281
1282**Contiguous array pointers:** All vendors that implement this option (Cray, IBM, and Intel) seem to have apply to all pointer targets.  Assuming that the arrays that are targeted by the pointers allows greater optimization.
1283
1284**Contiguous assumed shape dummy arguments:** Cray and Intel have a separate argument that's specific to assumed shape dummy arguments.
1285
1286**<a name="miscellaneous"></a>Miscellaneous**
1287
1288**Disable call site checking:**  This Cray option ("-dC") disables some types of standard call site checking. The current Fortran standard requires that the number and types of arguments must agree between the caller and callee. These constraints are enforced in cases where the compiler can detect them, however, specifying "-dC" disables some of this error checking, which may be necessary in order to get some older Fortran codes to compile.  If error checking is disabled, unexpected compile-time or run time results may occur.  The compiler by default attempts to detect situations in which an interface block should be specified but is not. Specifying "-dC" disables this type of checking as well.
1289
1290**Warn for bad call checking**: This Cray option ("-eb") issues a warning message rather than an error message when the compiler detects a call to a procedure with one or more dummy arguments having the TARGET, VOLATILE or ASYNCHRONOUS attribute and there is not an explicit interface definition.
1291
1292
1293## Notes
1294
1295
1296### What is and is not included
1297
1298This document focuses on options relevant to the Fortran language.  This includes some features (such as recursion) that are only indirectly related.  Options related to the following areas are not included:
1299
1300
1301
1302*   Input/Output
1303*   Optimization
1304*   Preprocessing
1305*   Inlining
1306*   Alternate library definition or linking
1307*   Choosing file locations for compiler input or output
1308*   Modules
1309*   Warning and error messages and listing output
1310*   Data initialization
1311*   Run time checks
1312*   Debugging
1313*   Specification of operating system
1314*   Target architecture
1315*   Assembler generation
1316*   Threads or parallelization
1317*   Profiling and code coverage
1318
1319
1320### Data sources
1321
1322Here's the list of compilers surveyed, hot linked to the source of data on it.  Note that this is the only mention of the Oracle and NAG compilers in this document.
1323
1324
1325
1326*   [Cray Fortran Reference Manual version 8.7](https://pubs.cray.com/content/S-3901/8.7/cray-fortran-reference-manual/compiler-command-line-options)
1327*   IBM  (XLF) version 14.1 -- [Compiler Referenc](https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=93)e, [Language Reference](https://www-01.ibm.com/support/docview.wss?uid=swg27024776&aid=1)
1328*   [Intel Fortran version 19.0](https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-alphabetical-list-of-compiler-options)
1329*   [GNU Fortran Compiler version 8.3.0](https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gfortran/Option-Summary.html)
1330*   [NAG Fortran Release 6.2](https://www.nag.co.uk/nagware/np/r62_doc/manual/compiler_2_4.html)
1331*   [Oracle Fortran version 819-0492-10](https://docs.oracle.com/cd/E19059-01/stud.10/819-0492/3_options.html)
1332*   PGI -- [Compiler Reference version 19.1](https://www.pgroup.com/resources/docs/19.1/x86/pgi-ref-guide/index.htm#cmdln-options-ref), [Fortran Reference Guide version 17](https://www.pgroup.com/doc/pgi17fortref.pdf)
1333*   [Flang](https://github.com/flang-compiler/flang/wiki/Using-Flang) -- information from GitHub
1334
1335This document has been kept relatively small by providing links to much of the information about options rather than duplicating that information.  For IBM, Intel, and some PGI options, there are direct links.  But direct links were not possible for Cray, GNU and some PGI options.
1336
1337Many compilers have options that can either be enabled or disabled.  Some compilers indicate this by the presence or absence of the letters "no" in the option name (IBM, Intel, and PGI) while Cray precedes many options with either "e" for enabled or "d" for disabled.  This document only includes the enabled version of the option specification.
1338
1339Deprecated options were generally ignored, even though they were documented.
1340