1 ; Options for the Fortran front end.
2 ; Copyright (C) 2003-2021 Free Software Foundation, Inc.
4 ; This file is part of GCC.
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
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
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/>.
20 ; See the GCC internals manual for a description of this file's format.
22 ; Please try to keep this file in ASCII collating order.
31 Fortran Separate Alias(A)
34 Fortran Joined Alias(A)
43 Fortran Separate Alias(D)
46 Fortran Joined Alias(D)
52 Fortran Separate Alias(d)
55 Fortran Joined Alias(d)
61 Fortran Separate Alias(I)
64 Fortran Joined Alias(I)
66 -include-directory-after
67 Fortran Separate Alias(idirafter)
69 -include-directory-after=
70 Fortran Joined Alias(idirafter)
73 Fortran Separate Alias(iprefix)
76 Fortran JoinedOrMissing Alias(iprefix)
82 Fortran Alias(nostdinc)
85 Fortran Separate Alias(o)
88 Fortran Joined Alias(o)
91 Fortran Undocumented Alias(E)
93 -print-missing-file-dependencies
100 Fortran Separate Alias(U)
103 Fortran Joined Alias(U)
112 Fortran NoDriverArg Separate Alias(MD)
114 -write-user-dependencies
115 Fortran NoDriverArg Separate Alias(MMD)
118 Fortran Joined Separate
130 Fortran Joined Separate
141 Fortran Joined Separate
145 Fortran Joined Separate
146 -J<directory> Put MODULE files in 'directory'.
153 Fortran Separate NoDriverArg
157 Fortran Joined Separate
169 Fortran Separate NoDriverArg
177 Fortran Joined Separate
181 Fortran Joined Separate
189 Fortran Joined Separate
197 Fortran Warning Var(warn_aliasing) LangEnabledBy(Fortran,Wall)
198 Warn about possible aliasing of dummy arguments.
201 Fortran Warning Var(warn_align_commons) Init(1)
202 Warn about alignment of COMMON blocks.
205 Fortran Warning Var(warn_ampersand) LangEnabledBy(Fortran,Wall || Wpedantic)
206 Warn about missing ampersand in continued character constants.
209 Fortran Warning Var(warn_array_temporaries)
210 Warn about creation of array temporaries.
214 Does nothing. Preserved for backward compatibility.
217 Fortran Var(warn_c_binding_type) Warning LangEnabledBy(Fortran,Wall)
218 Warn if the type of a variable might be not interoperable with C.
224 Wcharacter-truncation
225 Fortran Var(warn_character_truncation) Warning LangEnabledBy(Fortran,Wall)
226 Warn about truncated character expressions.
229 Fortran Warning Var(warn_compare_reals) LangEnabledBy(Fortran,Wextra)
230 Warn about equality comparisons involving REAL or COMPLEX expressions.
233 Fortran Var(warn_conversion) Warning LangEnabledBy(Fortran,Wall)
237 Fortran Var(warn_conversion_extra) Warning
238 Warn about most implicit conversions.
241 Fortran Var(warn_do_subscript) Warning LangEnabledBy(Fortran,Wextra)
242 Warn about possibly incorrect subscripts in do loops.
246 ; Documented in common
248 Wfrontend-loop-interchange
249 Fortran Var(flag_warn_frontend_loop_interchange)
250 Warn if loops have been interchanged.
252 Wfunction-elimination
253 Fortran Warning Var(warn_function_elimination) LangEnabledBy(Fortran,Wextra)
254 Warn about function call elimination.
257 Fortran Warning Var(warn_implicit_interface)
258 Warn about calls with implicit interface.
261 Fortran Warning Var(warn_implicit_procedure)
262 Warn about called procedures not explicitly declared.
265 Fortran Warning Var(warn_integer_division) LangEnabledBy(Fortran,Wall)
266 Warn about constant integer divisions with truncated results.
269 Fortran Warning Var(warn_line_truncation) LangEnabledBy(Fortran,Wall) Init(-1)
270 Warn about truncated source lines.
273 Fortran Var(warn_intrinsics_std) Warning LangEnabledBy(Fortran,Wall)
274 Warn on intrinsics not part of the selected standard.
277 Fortran LangEnabledBy(Fortran,Wall)
278 ; Documented in common.opt
280 Wmissing-include-dirs
282 ; Documented in C/C++
285 Fortran Var(warn_use_without_only) Warning
286 Warn about USE statements that have no ONLY qualifier.
297 Fortran Warning Var(warn_overwrite_recursive) Init(1)
298 Warn that -fno-automatic may break recursion.
302 ; Documented in common.opt
305 Fortran Warning Var(warn_real_q_constant) LangEnabledBy(Fortran,Wall)
306 Warn about real-literal-constants with 'q' exponent-letter.
309 Fortran Warning Var(warn_realloc_lhs) LangEnabledBy(Fortran,Wrealloc-lhs-all)
310 Warn when a left-hand-side array variable is reallocated.
313 Fortran Warning Var(warn_realloc_lhs_all)
314 Warn when a left-hand-side variable is reallocated.
317 Fortran Warning Var(warn_target_lifetime) LangEnabledBy(Fortran,Wall)
318 Warn if the pointer in a pointer assignment might outlive its target.
321 Fortran Warning LangEnabledBy(Fortran,Wall)
325 Fortran Warning Var(warn_surprising) LangEnabledBy(Fortran,Wall)
326 Warn about \"suspicious\" constructs.
329 Fortran Warning Var(warn_tabs) LangEnabledBy(Fortran,Wall || Wpedantic)
330 Permit nonconforming uses of the tab character.
333 Fortran Warning Var(warn_undefined_do_loop) LangEnabledBy(Fortran,Wall)
334 Warn about an invalid DO loop.
337 Fortran Warning Var(warn_underflow) Init(1)
338 Warn about underflow of numerical constant expressions.
341 Fortran LangEnabledBy(Fortran,Wall)
342 ; Documented in common.opt
345 Fortran Warning Var(warn_intrinsic_shadow) LangEnabledBy(Fortran,Wall)
346 Warn if a user-procedure has the same name as an intrinsic.
349 LangEnabledBy(Fortran,Wall)
350 ; Documented in common.opt
352 Wunused-dummy-argument
353 Fortran Warning Var(warn_unused_dummy_argument) LangEnabledBy(Fortran,Wall)
354 Warn about unused dummy arguments.
357 Fortran Warning Var(warn_zerotrip) LangEnabledBy(Fortran,Wall)
358 Warn about zero-trip DO loops.
361 Fortran Negative(nocpp)
362 Enable preprocessing.
365 Fortran Joined Negative(nocpp) Undocumented NoDWARFRecord
366 ; Internal option generated by specs from -cpp.
369 Fortran Negative(cpp)
370 Disable preprocessing.
374 ; Documented in common.opt
376 fallow-argument-mismatch
377 Fortran Var(flag_allow_argument_mismatch) LangEnabledBy(Fortran,std=legacy)
378 Accept argument mismatches in procedure calls.
380 faggressive-function-elimination
381 Fortran Var(flag_aggressive_function_elimination)
382 Eliminate multiple function invocations also for impure functions.
385 Fortran Var(flag_align_commons) Init(1)
386 Enable alignment of COMMON blocks.
389 Fortran RejectNegative Var(flag_all_intrinsics)
390 All intrinsics procedures are available regardless of selected standard.
393 Fortran RejectNegative Var(flag_allow_invalid_boz)
394 Allow a BOZ literal constant to appear in an invalid context and with X instead of Z.
396 fallow-leading-underscore
397 Fortran Undocumented Var(flag_allow_leading_underscore)
398 ; For internal use only: allow the first character of symbol names to be an underscore
401 Fortran Var(flag_automatic) Init(1)
402 Do not treat local variables and COMMON blocks as if they were named in SAVE statements.
405 Fortran Var(flag_backslash)
406 Specify that backslash in string introduces an escape character.
409 Fortran Var(flag_backtrace) Init(1)
410 Produce a backtrace when a runtime error is encountered.
413 Fortran RejectNegative Joined UInteger Var(flag_blas_matmul_limit) Init(30)
414 -fblas-matmul-limit=<n> Size of the smallest matrix for which matmul will use BLAS.
416 fcheck-array-temporaries
418 Produce a warning at runtime if a array temporary has been created for a procedure argument.
421 Fortran RejectNegative Joined Enum(gfc_convert) Var(flag_convert) Init(GFC_FLAG_CONVERT_NATIVE)
422 -fconvert=<big-endian|little-endian|native|swap> The endianness used for unformatted files.
425 Name(gfc_convert) Type(enum gfc_convert) UnknownError(Unrecognized option to endianness value: %qs)
428 Enum(gfc_convert) String(big-endian) Value(GFC_FLAG_CONVERT_BIG)
431 Enum(gfc_convert) String(little-endian) Value(GFC_FLAG_CONVERT_LITTLE)
434 Enum(gfc_convert) String(native) Value(GFC_FLAG_CONVERT_NATIVE)
437 Enum(gfc_convert) String(swap) Value(GFC_FLAG_CONVERT_SWAP)
440 Fortran Var(flag_cray_pointer)
441 Use the Cray Pointer extension.
444 Fortran Var(flag_c_prototypes)
445 Generate C prototypes from BIND(C) declarations.
447 fc-prototypes-external
448 Fortran Var(flag_c_prototypes_external)
449 Generate C prototypes from non-BIND(C) external procedure definitions.
452 Fortran RejectNegative
453 Ignore 'D' in column one in fixed form.
456 Fortran RejectNegative
457 Treat lines with 'D' in column one as comments.
460 Fortran Var(flag_debug_aux_vars)
461 Issue debug information for compiler-generated auxiliary variables.
464 Fortran Var(flag_dec)
465 Enable all DEC language extensions.
467 fdec-blank-format-item
468 Fortran Var(flag_dec_blank_format_item)
469 Enable the use of blank format items in format strings.
471 fdec-char-conversions
472 Fortran Var(flag_dec_char_conversions)
473 Enable the use of character literals in assignments and data statements
474 for non-character variables.
477 Fortran Var(flag_dec_include)
478 Enable legacy parsing of INCLUDE as statement.
481 Fortran Var(flag_dec_format_defaults)
482 Enable default widths for i, f and g format specifiers.
485 Fortran Var(flag_dec_intrinsic_ints)
486 Enable kind-specific variants of integer intrinsic functions.
489 Fortran Var(flag_dec_math)
490 Enable legacy math intrinsics for compatibility.
493 Fortran Var(flag_dec_structure)
494 Enable support for DEC STRUCTURE/RECORD.
497 Fortran Var(flag_dec_static)
498 Enable DEC-style STATIC and AUTOMATIC attributes.
501 Fortran Var(flag_default_double)
502 Set the default double precision kind to an 8 byte wide type.
505 Fortran Var(flag_default_integer)
506 Set the default integer kind to an 8 byte wide type.
509 Fortran Var(flag_default_real_8)
510 Set the default real kind to an 8 byte wide type.
513 Fortran Var(flag_default_real_10)
514 Set the default real kind to an 10 byte wide type.
517 Fortran Var(flag_default_real_16)
518 Set the default real kind to an 16 byte wide type.
521 Fortran Var(flag_dollar_ok)
522 Allow dollar signs in entity names.
526 Does nothing. Preserved for backward compatibility.
528 fdump-fortran-original
529 Fortran Var(flag_dump_fortran_original)
530 Display the code tree after parsing.
532 fdump-fortran-optimized
533 Fortran Var(flag_dump_fortran_optimized)
534 Display the code tree after front end optimization.
537 Fortran Var(flag_dump_fortran_global)
538 Display the global symbol table after parsing.
541 Fortran Alias(fdump-fortran-original)
542 Display the code tree after parsing; deprecated option.
545 Fortran Var(flag_external_blas)
546 Specify that an external BLAS library should be used for matmul calls on large-size arrays.
549 Fortran Var(flag_f2c)
550 Use f2c calling convention.
553 Fortran RejectNegative
554 Assume that the source file is fixed form.
557 Fortran Var(flag_test_forall_temp) Init(0)
558 Force creation of temporary to test infrequently-executed forall code.
561 Fortran RejectNegative Var(flag_integer4_kind,8)
562 Interpret any INTEGER(4) as an INTEGER(8).
564 fintrinsic-modules-path
565 Fortran RejectNegative Separate
566 Specify where to find the compiled intrinsic modules.
568 fintrinsic-modules-path=
569 Fortran RejectNegative Joined
570 Specify where to find the compiled intrinsic modules.
572 ffixed-line-length-none
573 Fortran RejectNegative Var(flag_fixed_line_length,0)
574 Allow arbitrary character line width in fixed mode.
577 Fortran RejectNegative Joined UInteger Var(flag_fixed_line_length) Init(72)
578 -ffixed-line-length-<n> Use n as character line width in fixed mode.
581 Fortran Var(flag_pad_source) Init(1)
582 Pad shorter fixed form lines to line width with spaces.
585 Fortran RejectNegative JoinedOrMissing
586 -ffpe-trap=[...] Stop on following floating point exceptions.
589 Fortran RejectNegative JoinedOrMissing
590 -ffpe-summary=[...] Print summary of floating point exceptions.
593 Fortran RejectNegative
594 Assume that the source file is free form.
596 ffree-line-length-none
597 Fortran RejectNegative Var(flag_free_line_length,0)
598 Allow arbitrary character line width in free mode.
601 Fortran RejectNegative Joined UInteger Var(flag_free_line_length) Init(132)
602 -ffree-line-length-<n> Use n as character line width in free mode.
604 ffrontend-loop-interchange
605 Fortran Var(flag_frontend_loop_interchange) Init(-1)
606 Try to interchange loops if profitable.
609 Fortran Var(flag_frontend_optimize) Init(-1)
610 Enable front end optimization.
613 Fortran Var(flag_implicit_none)
614 Specify that no implicit typing is allowed, unless overridden by explicit IMPLICIT statements.
617 Fortran RejectNegative Joined UInteger
618 -finit-character=<n> Initialize local character variables to ASCII value n.
621 Fortran Var(flag_init_derived)
622 Initialize components of derived type variables according to other init flags.
625 Fortran RejectNegative Joined
626 -finit-integer=<n> Initialize local integer variables to n.
630 Initialize local variables to zero (from g77).
633 Fortran RejectNegative Joined
634 -finit-logical=<true|false> Initialize local logical variables.
637 Fortran RejectNegative ToLower Joined Enum(gfc_init_local_real) Var(flag_init_real) Init(GFC_INIT_REAL_OFF)
638 -finit-real=<zero|snan|nan|inf|-inf> Initialize local real variables.
641 Name(gfc_init_local_real) Type(enum gfc_init_local_real) UnknownError(Unrecognized option to floating-point init value: %qs)
644 Enum(gfc_init_local_real) String(zero) Value(GFC_INIT_REAL_ZERO)
647 Enum(gfc_init_local_real) String(snan) Value(GFC_INIT_REAL_SNAN)
650 Enum(gfc_init_local_real) String(nan) Value(GFC_INIT_REAL_NAN)
653 Enum(gfc_init_local_real) String(inf) Value(GFC_INIT_REAL_INF)
656 Enum(gfc_init_local_real) String(-inf) Value(GFC_INIT_REAL_NEG_INF)
659 Fortran Var(flag_inline_arg_packing) Init(-1)
660 -finline-arg-packing Perform argument packing inline.
662 finline-matmul-limit=
663 Fortran RejectNegative Joined UInteger Var(flag_inline_matmul_limit) Init(-1)
664 -finline-matmul-limit=<n> Specify the size of the largest matrix for which matmul will be inlined.
666 fmax-array-constructor=
667 Fortran RejectNegative Joined UInteger Var(flag_max_array_constructor) Init(65535)
668 -fmax-array-constructor=<n> Maximum number of objects in an array constructor.
670 fmax-identifier-length=
671 Fortran RejectNegative Joined UInteger
672 -fmax-identifier-length=<n> Maximum identifier length.
674 fmax-subrecord-length=
675 Fortran RejectNegative Joined UInteger Var(flag_max_subrecord_length)
676 -fmax-subrecord-length=<n> Maximum length for subrecords.
679 Fortran RejectNegative Joined UInteger Var(flag_max_stack_var_size) Init(-2)
680 -fmax-stack-var-size=<n> Size in bytes of the largest array that will be put on the stack.
683 Fortran Var(flag_stack_arrays) Init(-1)
684 Put all local arrays on stack.
687 Fortran Var(flag_module_private)
688 Set default accessibility of module entities to PRIVATE.
695 Fortran LTO Joined Var(flag_openacc_dims)
707 Fortran Var(flag_pack_derived)
708 Try to lay out derived types as compactly as possible.
715 Fortran Var(flag_protect_parens) Init(-1)
716 Protect parentheses in expressions.
719 Fortran RejectNegative Joined Var(flag_pre_include) Undocumented
720 Path to header file that should be pre-included before each compilation unit.
723 Fortran Var(flag_range_check) Init(1)
724 Enable range checking during compilation.
727 Fortran RejectNegative Var(flag_real4_kind,8)
728 Interpret any REAL(4) as a REAL(8).
731 Fortran RejectNegative Var(flag_real4_kind,10)
732 Interpret any REAL(4) as a REAL(10).
735 Fortran RejectNegative Var(flag_real4_kind,16)
736 Interpret any REAL(4) as a REAL(16).
739 Fortran RejectNegative Var(flag_real8_kind,4)
740 Interpret any REAL(8) as a REAL(4).
743 Fortran RejectNegative Var(flag_real8_kind,10)
744 Interpret any REAL(8) as a REAL(10).
747 Fortran RejectNegative Var(flag_real8_kind,16)
748 Interpret any REAL(8) as a REAL(16).
751 Fortran Var(flag_realloc_lhs) Init(-1)
752 Reallocate the LHS in assignments.
755 Fortran RejectNegative Var(flag_record_marker,4)
756 Use a 4-byte record marker for unformatted files.
759 Fortran RejectNegative Var(flag_record_marker,8)
760 Use an 8-byte record marker for unformatted files.
763 Fortran Var(flag_recursive)
764 Allocate local variables on the stack to allow indirect recursion.
767 Fortran Var(flag_repack_arrays)
768 Copy array sections into a contiguous block on procedure entry.
771 Fortran RejectNegative Joined Enum(gfc_fcoarray) Var(flag_coarray) Init(GFC_FCOARRAY_NONE)
772 -fcoarray=<none|single|lib> Specify which coarray parallelization should be used.
775 Name(gfc_fcoarray) Type(enum gfc_fcoarray) UnknownError(Unrecognized option: %qs)
778 Enum(gfc_fcoarray) String(none) Value(GFC_FCOARRAY_NONE)
781 Enum(gfc_fcoarray) String(single) Value(GFC_FCOARRAY_SINGLE)
784 Enum(gfc_fcoarray) String(lib) Value(GFC_FCOARRAY_LIB)
787 Fortran RejectNegative JoinedOrMissing
788 -fcheck=[...] Specify which runtime checks are to be performed.
791 Fortran Var(flag_second_underscore) Init(-1)
792 Append a second underscore if the name already contains an underscore.
795 Fortran Var(flag_short_enums)
799 Fortran Var(flag_sign_zero) Init(1)
800 Apply negative sign to zero values.
802 ftail-call-workaround
803 Fortran Alias(ftail-call-workaround=,1,0)
805 ftail-call-workaround=
806 Fortran RejectNegative Joined UInteger IntegerRange(0, 2) Var(flag_tail_call_workaround) Init(1)
807 Disallow tail call optimization when a calling routine may have omitted character lengths.
810 Fortran Var(flag_underscoring) Init(1)
811 Append underscores to externally visible names.
815 Does nothing. Preserved for backward compatibility.
822 Fortran Joined Separate
826 Fortran Joined Separate
830 Fortran Joined Separate
834 Fortran Joined Separate
838 Fortran Joined Separate
842 Fortran Joined Separate
850 Fortran Joined Separate
851 ; Documented in common.opt
855 Statically link the GNU Fortran helper library (libgfortran).
859 Conform to the ISO Fortran 2003 standard.
863 Conform to the ISO Fortran 2008 standard.
867 Conform to the ISO Fortran 2008 standard including TS 29113.
871 Conform to the ISO Fortran 2018 standard.
875 Conform to the ISO Fortran 95 standard.
879 Conform to nothing in particular.
883 Accept extensions to support legacy code.
893 ; This comment is to ensure we retain the blank line above.