xref: /dragonfly/contrib/gcc-8.0/gcc/fortran/lang.opt (revision dda92f98)
1; Options for the Fortran front end.
2; Copyright (C) 2003-2018 Free Software Foundation, Inc.
3;
4; This file is part of GCC.
5;
6; GCC is free software; you can redistribute it and/or modify it under
7; the terms of the GNU General Public License as published by the Free
8; Software Foundation; either version 3, or (at your option) any later
9; version.
10;
11; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12; WARRANTY; without even the implied warranty of MERCHANTABILITY or
13; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14; for more details.
15;
16; You should have received a copy of the GNU General Public License
17; along with GCC; see the file COPYING3.  If not see
18; <http://www.gnu.org/licenses/>.
19
20; See the GCC internals manual for a description of this file's format.
21
22; Please try to keep this file in ASCII collating order.
23
24Language
25Fortran
26
27-all-warnings
28Fortran Alias(Wall)
29
30-assert
31Fortran Separate Alias(A)
32
33-assert=
34Fortran Joined Alias(A)
35
36-comments
37Fortran Alias(C)
38
39-comments-in-macros
40Fortran Alias(CC)
41
42-define-macro
43Fortran Separate Alias(D)
44
45-define-macro=
46Fortran Joined Alias(D)
47
48-dependencies
49Fortran Alias(M)
50
51-dump
52Fortran Separate Alias(d)
53
54-dump=
55Fortran Joined Alias(d)
56
57-include-barrier
58Fortran Alias(I, -)
59
60-include-directory
61Fortran Separate Alias(I)
62
63-include-directory=
64Fortran Joined Alias(I)
65
66-include-directory-after
67Fortran Separate Alias(idirafter)
68
69-include-directory-after=
70Fortran Joined Alias(idirafter)
71
72-include-prefix
73Fortran Separate Alias(iprefix)
74
75-include-prefix=
76Fortran JoinedOrMissing Alias(iprefix)
77
78-no-line-commands
79Fortran Alias(P)
80
81-no-standard-includes
82Fortran Alias(nostdinc)
83
84-output
85Fortran Separate Alias(o)
86
87-output=
88Fortran Joined Alias(o)
89
90-preprocess
91Fortran Undocumented Alias(E)
92
93-print-missing-file-dependencies
94Fortran Alias(MG)
95
96-trace-includes
97Fortran Alias(H)
98
99-undefine-macro
100Fortran Separate Alias(U)
101
102-undefine-macro=
103Fortran Joined Alias(U)
104
105-user-dependencies
106Fortran Alias(MM)
107
108-verbose
109Fortran Alias(v)
110
111-write-dependencies
112Fortran NoDriverArg Separate Alias(MD)
113
114-write-user-dependencies
115Fortran NoDriverArg Separate Alias(MMD)
116
117A
118Fortran Joined Separate
119; Documented in C
120
121C
122Fortran
123; Documented in C
124
125CC
126Fortran
127; Documented in C
128
129D
130Fortran Joined Separate
131; Documented in C
132
133E
134Fortran Undocumented
135
136H
137Fortran
138; Documented in C
139
140I
141Fortran Joined Separate
142; Documented in C
143
144J
145Fortran Joined Separate
146-J<directory>	Put MODULE files in 'directory'.
147
148M
149Fortran
150; Documented in C
151
152MD
153Fortran Separate NoDriverArg
154; Documented in C
155
156MF
157Fortran Joined Separate
158; Documented in C
159
160MG
161Fortran
162; Documented in C
163
164MM
165Fortran
166; Documented in C
167
168MMD
169Fortran Separate NoDriverArg
170; Documented in C
171
172MP
173Fortran
174; Documented in C
175
176MT
177Fortran Joined Separate
178; Documented in C
179
180MQ
181Fortran Joined Separate
182; Documented in C
183
184P
185Fortran
186; Documented in C
187
188U
189Fortran Joined Separate
190; Documented in C
191
192Wall
193Fortran
194; Documented in C
195
196Waliasing
197Fortran Warning Var(warn_aliasing) LangEnabledBy(Fortran,Wall)
198Warn about possible aliasing of dummy arguments.
199
200Walign-commons
201Fortran Warning Var(warn_align_commons) Init(1)
202Warn about alignment of COMMON blocks.
203
204Wampersand
205Fortran Warning Var(warn_ampersand) LangEnabledBy(Fortran,Wall || Wpedantic)
206Warn about missing ampersand in continued character constants.
207
208Warray-temporaries
209Fortran Warning Var(warn_array_temporaries)
210Warn about creation of array temporaries.
211
212Wargument-mismatch
213Fortran Warning Var(warn_argument_mismatch) Init(1)
214Warn about type and rank mismatches between arguments and parameters.
215
216Wc-binding-type
217Fortran Var(warn_c_binding_type) Warning LangEnabledBy(Fortran,Wall)
218Warn if the type of a variable might be not interoperable with C.
219
220Wdate-time
221Fortran
222; Documented in C
223
224Wcharacter-truncation
225Fortran Var(warn_character_truncation) Warning LangEnabledBy(Fortran,Wall)
226Warn about truncated character expressions.
227
228Wcompare-reals
229Fortran Warning Var(warn_compare_reals) LangEnabledBy(Fortran,Wextra)
230Warn about equality comparisons involving REAL or COMPLEX expressions.
231
232Wconversion
233Fortran Var(warn_conversion) Warning LangEnabledBy(Fortran,Wall)
234; Documented in C
235
236Wconversion-extra
237Fortran Var(warn_conversion_extra) Warning
238Warn about most implicit conversions.
239
240Wdo-subscript
241Fortran Var(warn_do_subscript) Warning LangEnabledBy(Fortran,Wextra)
242Warn about possibly incorrect subscripts in do loops.
243
244Wextra
245Fortran Warning
246; Documented in common
247
248Wfrontend-loop-interchange
249Fortran Var(flag_warn_frontend_loop_interchange)
250Warn if loops have been interchanged.
251
252Wfunction-elimination
253Fortran Warning Var(warn_function_elimination)
254Warn about function call elimination.
255
256Wimplicit-interface
257Fortran Warning Var(warn_implicit_interface)
258Warn about calls with implicit interface.
259
260Wimplicit-procedure
261Fortran Warning Var(warn_implicit_procedure)
262Warn about called procedures not explicitly declared.
263
264Winteger-division
265Fortran Warning Var(warn_integer_division) LangEnabledBy(Fortran,Wall)
266Warn about constant integer divisions with truncated results.
267
268Wline-truncation
269Fortran Warning Var(warn_line_truncation) LangEnabledBy(Fortran,Wall) Init(-1)
270Warn about truncated source lines.
271
272Wintrinsics-std
273Fortran Var(warn_intrinsics_std) Warning LangEnabledBy(Fortran,Wall)
274Warn on intrinsics not part of the selected standard.
275
276Wmaybe-uninitialized
277Fortran LangEnabledBy(Fortran,Wall)
278; Documented in common.opt
279
280Wmissing-include-dirs
281Fortran
282; Documented in C/C++
283
284Wuse-without-only
285Fortran Var(warn_use_without_only) Warning
286Warn about USE statements that have no ONLY qualifier.
287
288Wopenmp-simd
289Fortran
290; Documented in C
291
292Wpedantic
293Fortran
294; Documented in common.opt
295
296Wreal-q-constant
297Fortran Warning Var(warn_real_q_constant) LangEnabledBy(Fortran,Wall)
298Warn about real-literal-constants with 'q' exponent-letter.
299
300Wrealloc-lhs
301Fortran Warning Var(warn_realloc_lhs) LangEnabledBy(Fortran,Wrealloc-lhs-all)
302Warn when a left-hand-side array variable is reallocated.
303
304Wrealloc-lhs-all
305Fortran Warning Var(warn_realloc_lhs_all)
306Warn when a left-hand-side variable is reallocated.
307
308Wtarget-lifetime
309Fortran Warning Var(warn_target_lifetime) LangEnabledBy(Fortran,Wall)
310Warn if the pointer in a pointer assignment might outlive its target.
311
312Wreturn-type
313Fortran Warning LangEnabledBy(Fortran,Wall)
314; Documented in C
315
316Wsurprising
317Fortran Warning Var(warn_surprising) LangEnabledBy(Fortran,Wall)
318Warn about \"suspicious\" constructs.
319
320Wtabs
321Fortran Warning Var(warn_tabs) LangEnabledBy(Fortran,Wall || Wpedantic)
322Permit nonconforming uses of the tab character.
323
324Wundefined-do-loop
325Fortran Warning Var(warn_undefined_do_loop) LangEnabledBy(Fortran,Wall)
326Warn about an invalid DO loop.
327
328Wunderflow
329Fortran Warning Var(warn_underflow) Init(1)
330Warn about underflow of numerical constant expressions.
331
332Wuninitialized
333Fortran LangEnabledBy(Fortran,Wall)
334; Documented in common.opt
335
336Wintrinsic-shadow
337Fortran Warning Var(warn_intrinsic_shadow) LangEnabledBy(Fortran,Wall)
338Warn if a user-procedure has the same name as an intrinsic.
339
340Wunused
341LangEnabledBy(Fortran,Wall)
342; Documented in common.opt
343
344Wunused-dummy-argument
345Fortran Warning Var(warn_unused_dummy_argument) LangEnabledBy(Fortran,Wall)
346Warn about unused dummy arguments.
347
348Wzerotrip
349Fortran Warning Var(warn_zerotrip) LangEnabledBy(Fortran,Wall)
350Warn about zero-trip DO loops.
351
352cpp
353Fortran Negative(nocpp)
354Enable preprocessing.
355
356cpp=
357Fortran Joined Negative(nocpp) Undocumented NoDWARFRecord
358; Internal option generated by specs from -cpp.
359
360nocpp
361Fortran Negative(cpp)
362Disable preprocessing.
363
364d
365Fortran Joined
366; Documented in common.opt
367
368faggressive-function-elimination
369Fortran Var(flag_aggressive_function_elimination)
370Eliminate multiple function invocations also for impure functions.
371
372falign-commons
373Fortran Var(flag_align_commons) Init(1)
374Enable alignment of COMMON blocks.
375
376fall-intrinsics
377Fortran RejectNegative Var(flag_all_intrinsics)
378All intrinsics procedures are available regardless of selected standard.
379
380fallow-leading-underscore
381Fortran Undocumented Var(flag_allow_leading_underscore)
382; For internal use only: allow the first character of symbol names to be an underscore
383
384fautomatic
385Fortran Var(flag_automatic) Init(1)
386Do not treat local variables and COMMON blocks as if they were named in SAVE statements.
387
388fbackslash
389Fortran Var(flag_backslash)
390Specify that backslash in string introduces an escape character.
391
392fbacktrace
393Fortran Var(flag_backtrace) Init(1)
394Produce a backtrace when a runtime error is encountered.
395
396fblas-matmul-limit=
397Fortran RejectNegative Joined UInteger Var(flag_blas_matmul_limit) Init(30)
398-fblas-matmul-limit=<n>	Size of the smallest matrix for which matmul will use BLAS.
399
400fcheck-array-temporaries
401Fortran
402Produce a warning at runtime if a array temporary has been created for a procedure argument.
403
404fconvert=
405Fortran RejectNegative Joined Enum(gfc_convert) Var(flag_convert) Init(GFC_FLAG_CONVERT_NATIVE)
406-fconvert=<big-endian|little-endian|native|swap> The endianness used for unformatted files.
407
408Enum
409Name(gfc_convert) Type(enum gfc_convert) UnknownError(Unrecognized option to endianness value: %qs)
410
411EnumValue
412Enum(gfc_convert) String(big-endian) Value(GFC_FLAG_CONVERT_BIG)
413
414EnumValue
415Enum(gfc_convert) String(little-endian) Value(GFC_FLAG_CONVERT_LITTLE)
416
417EnumValue
418Enum(gfc_convert) String(native) Value(GFC_FLAG_CONVERT_NATIVE)
419
420EnumValue
421Enum(gfc_convert) String(swap) Value(GFC_FLAG_CONVERT_SWAP)
422
423fcray-pointer
424Fortran Var(flag_cray_pointer)
425Use the Cray Pointer extension.
426
427fc-prototypes
428Fortran Var(flag_c_prototypes)
429Generate C prototypes from BIND(C) declarations.
430
431fd-lines-as-code
432Fortran RejectNegative
433Ignore 'D' in column one in fixed form.
434
435fd-lines-as-comments
436Fortran RejectNegative
437Treat lines with 'D' in column one as comments.
438
439fdec
440Fortran Var(flag_dec)
441Enable all DEC language extensions.
442
443fdec-intrinsic-ints
444Fortran Var(flag_dec_intrinsic_ints)
445Enable kind-specific variants of integer intrinsic functions.
446
447fdec-math
448Fortran Var(flag_dec_math)
449Enable legacy math intrinsics for compatibility.
450
451fdec-structure
452Fortran Var(flag_dec_structure)
453Enable support for DEC STRUCTURE/RECORD.
454
455fdec-static
456Fortran Var(flag_dec_static)
457Enable DEC-style STATIC and AUTOMATIC attributes.
458
459fdefault-double-8
460Fortran Var(flag_default_double)
461Set the default double precision kind to an 8 byte wide type.
462
463fdefault-integer-8
464Fortran Var(flag_default_integer)
465Set the default integer kind to an 8 byte wide type.
466
467fdefault-real-8
468Fortran Var(flag_default_real_8)
469Set the default real kind to an 8 byte wide type.
470
471fdefault-real-10
472Fortran Var(flag_default_real_10)
473Set the default real kind to an 10 byte wide type.
474
475fdefault-real-16
476Fortran Var(flag_default_real_16)
477Set the default real kind to an 16 byte wide type.
478
479fdollar-ok
480Fortran Var(flag_dollar_ok)
481Allow dollar signs in entity names.
482
483fdump-core
484Fortran Ignore
485Does nothing. Preserved for backward compatibility.
486
487fdump-fortran-original
488Fortran Var(flag_dump_fortran_original)
489Display the code tree after parsing.
490
491fdump-fortran-optimized
492Fortran Var(flag_dump_fortran_optimized)
493Display the code tree after front end optimization.
494
495fdump-parse-tree
496Fortran Alias(fdump-fortran-original)
497Display the code tree after parsing; deprecated option.
498
499fexternal-blas
500Fortran Var(flag_external_blas)
501Specify that an external BLAS library should be used for matmul calls on large-size arrays.
502
503ff2c
504Fortran Var(flag_f2c)
505Use f2c calling convention.
506
507ffixed-form
508Fortran RejectNegative
509Assume that the source file is fixed form.
510
511ftest-forall-temp
512Fortran Var(flag_test_forall_temp) Init(0)
513Force creation of temporary to test infrequently-executed forall code.
514
515finteger-4-integer-8
516Fortran RejectNegative Var(flag_integer4_kind,8)
517Interpret any INTEGER(4) as an INTEGER(8).
518
519fintrinsic-modules-path
520Fortran RejectNegative Separate
521Specify where to find the compiled intrinsic modules.
522
523fintrinsic-modules-path=
524Fortran RejectNegative Joined
525Specify where to find the compiled intrinsic modules.
526
527ffixed-line-length-none
528Fortran RejectNegative Var(flag_fixed_line_length,0)
529Allow arbitrary character line width in fixed mode.
530
531ffixed-line-length-
532Fortran RejectNegative Joined UInteger Var(flag_fixed_line_length) Init(72)
533-ffixed-line-length-<n>	Use n as character line width in fixed mode.
534
535ffpe-trap=
536Fortran RejectNegative JoinedOrMissing
537-ffpe-trap=[...]	Stop on following floating point exceptions.
538
539ffpe-summary=
540Fortran RejectNegative JoinedOrMissing
541-ffpe-summary=[...]	Print summary of floating point exceptions.
542
543ffree-form
544Fortran RejectNegative
545Assume that the source file is free form.
546
547ffree-line-length-none
548Fortran RejectNegative Var(flag_free_line_length,0)
549Allow arbitrary character line width in free mode.
550
551ffree-line-length-
552Fortran RejectNegative Joined UInteger Var(flag_free_line_length) Init(132)
553-ffree-line-length-<n>	Use n as character line width in free mode.
554
555ffrontend-loop-interchange
556Fortran Var(flag_frontend_loop_interchange) Init(-1)
557Try to interchange loops if profitable.
558
559ffrontend-optimize
560Fortran Var(flag_frontend_optimize) Init(-1)
561Enable front end optimization.
562
563fimplicit-none
564Fortran Var(flag_implicit_none)
565Specify that no implicit typing is allowed, unless overridden by explicit IMPLICIT statements.
566
567finit-character=
568Fortran RejectNegative Joined UInteger
569-finit-character=<n>	Initialize local character variables to ASCII value n.
570
571finit-derived
572Fortran Var(flag_init_derived)
573Initialize components of derived type variables according to other init flags.
574
575finit-integer=
576Fortran RejectNegative Joined
577-finit-integer=<n>	Initialize local integer variables to n.
578
579finit-local-zero
580Fortran
581Initialize local variables to zero (from g77).
582
583finit-logical=
584Fortran RejectNegative Joined
585-finit-logical=<true|false>	Initialize local logical variables.
586
587finit-real=
588Fortran RejectNegative ToLower Joined Enum(gfc_init_local_real) Var(flag_init_real) Init(GFC_INIT_REAL_OFF)
589-finit-real=<zero|snan|nan|inf|-inf>	Initialize local real variables.
590
591Enum
592Name(gfc_init_local_real) Type(enum gfc_init_local_real) UnknownError(Unrecognized option to floating-point init value: %qs)
593
594EnumValue
595Enum(gfc_init_local_real) String(zero) Value(GFC_INIT_REAL_ZERO)
596
597EnumValue
598Enum(gfc_init_local_real) String(snan) Value(GFC_INIT_REAL_SNAN)
599
600EnumValue
601Enum(gfc_init_local_real) String(nan) Value(GFC_INIT_REAL_NAN)
602
603EnumValue
604Enum(gfc_init_local_real) String(inf) Value(GFC_INIT_REAL_INF)
605
606EnumValue
607Enum(gfc_init_local_real) String(-inf) Value(GFC_INIT_REAL_NEG_INF)
608
609finline-matmul-limit=
610Fortran RejectNegative Joined UInteger Var(flag_inline_matmul_limit) Init(-1)
611-finline-matmul-limit=<n>	Specify the size of the largest matrix for which matmul will be inlined.
612
613fmax-array-constructor=
614Fortran RejectNegative Joined UInteger Var(flag_max_array_constructor) Init(65535)
615-fmax-array-constructor=<n>	Maximum number of objects in an array constructor.
616
617fmax-identifier-length=
618Fortran RejectNegative Joined UInteger
619-fmax-identifier-length=<n>	Maximum identifier length.
620
621fmax-subrecord-length=
622Fortran RejectNegative Joined UInteger Var(flag_max_subrecord_length)
623-fmax-subrecord-length=<n>	Maximum length for subrecords.
624
625fmax-stack-var-size=
626Fortran RejectNegative Joined UInteger Var(flag_max_stack_var_size) Init(-2)
627-fmax-stack-var-size=<n>	Size in bytes of the largest array that will be put on the stack.
628
629fstack-arrays
630Fortran Var(flag_stack_arrays) Init(-1)
631Put all local arrays on stack.
632
633fmodule-private
634Fortran Var(flag_module_private)
635Set default accessibility of module entities to PRIVATE.
636
637fopenacc
638Fortran LTO
639; Documented in C
640
641fopenacc-dim=
642Fortran LTO Joined Var(flag_openacc_dims)
643; Documented in C
644
645fopenmp
646Fortran LTO
647; Documented in C
648
649fopenmp-simd
650Fortran
651; Documented in C
652
653fpack-derived
654Fortran Var(flag_pack_derived)
655Try to lay out derived types as compactly as possible.
656
657fpreprocessed
658Fortran
659; Documented in C
660
661fprotect-parens
662Fortran Var(flag_protect_parens) Init(-1)
663Protect parentheses in expressions.
664
665frange-check
666Fortran Var(flag_range_check) Init(1)
667Enable range checking during compilation.
668
669freal-4-real-8
670Fortran RejectNegative Var(flag_real4_kind,8)
671Interpret any REAL(4) as a REAL(8).
672
673freal-4-real-10
674Fortran RejectNegative Var(flag_real4_kind,10)
675Interpret any REAL(4) as a REAL(10).
676
677freal-4-real-16
678Fortran RejectNegative Var(flag_real4_kind,16)
679Interpret any REAL(4) as a REAL(16).
680
681freal-8-real-4
682Fortran RejectNegative Var(flag_real8_kind,4)
683Interpret any REAL(8) as a REAL(4).
684
685freal-8-real-10
686Fortran RejectNegative Var(flag_real8_kind,10)
687Interpret any REAL(8) as a REAL(10).
688
689freal-8-real-16
690Fortran RejectNegative Var(flag_real8_kind,16)
691Interpret any REAL(8) as a REAL(16).
692
693frealloc-lhs
694Fortran Var(flag_realloc_lhs) Init(-1)
695Reallocate the LHS in assignments.
696
697frecord-marker=4
698Fortran RejectNegative Var(flag_record_marker,4)
699Use a 4-byte record marker for unformatted files.
700
701frecord-marker=8
702Fortran RejectNegative Var(flag_record_marker,8)
703Use an 8-byte record marker for unformatted files.
704
705frecursive
706Fortran Var(flag_recursive)
707Allocate local variables on the stack to allow indirect recursion.
708
709frepack-arrays
710Fortran Var(flag_repack_arrays)
711Copy array sections into a contiguous block on procedure entry.
712
713fcoarray=
714Fortran RejectNegative Joined Enum(gfc_fcoarray) Var(flag_coarray) Init(GFC_FCOARRAY_NONE)
715-fcoarray=<none|single|lib>	Specify which coarray parallelization should be used.
716
717Enum
718Name(gfc_fcoarray) Type(enum gfc_fcoarray) UnknownError(Unrecognized option: %qs)
719
720EnumValue
721Enum(gfc_fcoarray) String(none) Value(GFC_FCOARRAY_NONE)
722
723EnumValue
724Enum(gfc_fcoarray) String(single) Value(GFC_FCOARRAY_SINGLE)
725
726EnumValue
727Enum(gfc_fcoarray) String(lib) Value(GFC_FCOARRAY_LIB)
728
729fcheck=
730Fortran RejectNegative JoinedOrMissing
731-fcheck=[...]	Specify which runtime checks are to be performed.
732
733fsecond-underscore
734Fortran Var(flag_second_underscore) Init(-1)
735Append a second underscore if the name already contains an underscore.
736
737fshort-enums
738Fortran Var(flag_short_enums)
739; Documented in C
740
741fsign-zero
742Fortran Var(flag_sign_zero) Init(1)
743Apply negative sign to zero values.
744
745funderscoring
746Fortran Var(flag_underscoring) Init(1)
747Append underscores to externally visible names.
748
749fwhole-file
750Fortran Ignore
751Does nothing.  Preserved for backward compatibility.
752
753fworking-directory
754Fortran
755; Documented in C
756
757idirafter
758Fortran Joined Separate
759; Documented in C
760
761imultilib
762Fortran Joined Separate
763; Documented in C
764
765iprefix
766Fortran Joined Separate
767; Documented in C
768
769iquote
770Fortran Joined Separate
771; Documented in C
772
773isysroot
774Fortran Joined Separate
775; Documented in C
776
777isystem
778Fortran Joined Separate
779; Documented in C
780
781nostdinc
782Fortran
783; Documented in C
784
785o
786Fortran Joined Separate
787; Documented in common.opt
788
789static-libgfortran
790Fortran
791Statically link the GNU Fortran helper library (libgfortran).
792
793std=f2003
794Fortran
795Conform to the ISO Fortran 2003 standard.
796
797std=f2008
798Fortran
799Conform to the ISO Fortran 2008 standard.
800
801std=f2008ts
802Fortran
803Conform to the ISO Fortran 2008 standard including TS 29113.
804
805std=f2018
806Fortran
807Conform to the ISO Fortran 2018 standard.
808
809std=f95
810Fortran
811Conform to the ISO Fortran 95 standard.
812
813std=gnu
814Fortran
815Conform to nothing in particular.
816
817std=legacy
818Fortran
819Accept extensions to support legacy code.
820
821undef
822Fortran
823; Documented in C
824
825v
826Fortran
827; Documented in C
828
829; This comment is to ensure we retain the blank line above.
830