]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/common.opt
Do not query further vector epilogues after a masked epilogue
[thirdparty/gcc.git] / gcc / common.opt
CommitLineData
d7b42618 1; Options for the language- and target-independent parts of the compiler.
50431bc4 2
6441eb6d 3; Copyright (C) 2003-2025 Free Software Foundation, Inc.
d7b42618
NB
4;
5; This file is part of GCC.
6;
7; GCC is free software; you can redistribute it and/or modify it under
8; the terms of the GNU General Public License as published by the Free
9dcd6f09 9; Software Foundation; either version 3, or (at your option) any later
d7b42618 10; version.
c22cacf3 11;
d7b42618
NB
12; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15; for more details.
c22cacf3 16;
d7b42618 17; You should have received a copy of the GNU General Public License
9dcd6f09
NC
18; along with GCC; see the file COPYING3. If not see
19; <http://www.gnu.org/licenses/>.
d7b42618 20
71733172 21; See the GCC internals manual (options.texi) for a description of this file's format.
d7b42618
NB
22
23; Please try to keep this file in ASCII collating order.
24
e90afde6
JM
25Variable
26int target_flags
27
46625112
JM
28Variable
29int optimize
30
31Variable
32int optimize_size
33
bf7a7185
RG
34Variable
35int optimize_debug
36
0a8134ca
JM
37; Not used directly to control optimizations, only to save -Ofast
38; setting for "optimize" attributes.
39Variable
40int optimize_fast
41
a7d0d30f
JM
42; True if this is the lto front end. This is used to disable gimple
43; generation and lowering passes that are normally run on the output
44; of a front end. These passes must be bypassed for lto since they
45; have already been done before the gimple was written.
46Variable
47bool in_lto_p = false
48
1ff9ed6f 49; This variable is set to non-0 only by LTO front-end. 1 indicates that
46a27415 50; the output produced will be used for incremental linking (thus weak symbols
5b42d196
JH
51; can still be bound) and 2 indicates that the IL is going to be linked and
52; and output to LTO object file.
1ff9ed6f 53Variable
5b42d196 54enum incremental_link flag_incremental_link = INCREMENTAL_LINK_NONE
1ff9ed6f 55
a64697d7
ML
56Variable
57int flag_default_complex_method = 1
58
a75bfaa6
JM
59; Language specific warning pass for unused results.
60Variable
61bool flag_warn_unused_result = false
62
d5478783
JM
63; Nonzero if we should write GIMPLE bytecode for link-time optimization.
64Variable
65int flag_generate_lto
66
f0d78df9
IV
67; Nonzero if we should write GIMPLE bytecode for offload compilation.
68Variable
69int flag_generate_offload = 0
70
d5478783
JM
71; Nonzero means we should be saving declaration info into a .X file.
72Variable
73int flag_gen_aux_info = 0
74
75; Nonzero if we are compiling code for a shared library, zero for
76; executable.
77Variable
78int flag_shlib
79
a1ad0d84 80; These three are really VEC(char_p,heap) *.
6a1f6c9c
JM
81
82Variable
83void *flag_instrument_functions_exclude_functions
84
85Variable
86void *flag_instrument_functions_exclude_files
87
a1ad0d84
MP
88Variable
89void *flag_ignored_attributes
90
69ccdddb
JM
91; Generic structs (e.g. templates not explicitly specialized)
92; may not have a compilation unit associated with them, and so
93; may need to be treated differently from ordinary structs.
94;
95; Structs only handled by reference (indirectly), will also usually
96; not need as much debugging information.
97
98Variable
99enum debug_struct_file debug_struct_ordinary[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }
100
101Variable
102enum debug_struct_file debug_struct_generic[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }
103
0576d21f
JM
104; True if we should exit after parsing options.
105Variable
106bool exit_after_options
107
108; Type(s) of debugging information we are producing (if any). See
109; flag-types.h for the definitions of the different possible types of
110; debugging information.
111Variable
459d84e9 112uint32_t write_symbols = NO_DEBUG
0576d21f
JM
113
114; Level of debugging information we are producing. See flag-types.h
115; for the definitions of the different possible levels.
116Variable
117enum debug_info_levels debug_info_level = DINFO_LEVEL_NONE
118
b7e215a8
IB
119; Level of CTF debugging information we are producing. See flag-types.h
120; for the definitions of the different possible levels.
121Variable
122enum ctf_debug_info_levels ctf_debug_info_level = CTFINFO_LEVEL_NONE
123
299404a1
JM
124; Original value of maximum field alignment in bytes, specified via
125; -fpack-struct=<value>.
126Variable
127unsigned int initial_max_fld_align = TARGET_DEFAULT_PACK_STRUCT
128
5e471ea6
JM
129; Type of stack check.
130Variable
131enum stack_check_type flag_stack_check = NO_STACK_CHECK
132
a11e0df4
EB
133; True if stack usage information needs to be computed.
134Variable
135bool flag_stack_usage_info = false
136
299404a1
JM
137; -dA causes debug commentary information to be produced in
138; the generated assembly code (to make it more readable). This option
139; is generally only of use to those who actually need to read the
140; generated assembly code (perhaps while debugging the compiler itself).
e53b6e56 141; Currently, this switch is only used by dwarf2out.cc; however, it is intended
299404a1
JM
142; to be a catchall for printing debug information in the assembler file.
143Variable
144int flag_debug_asm
145
6592d14b
PMR
146; Balance between GNAT encodings and standard DWARF to emit.
147Variable
148enum dwarf_gnat_encodings gnat_encodings = DWARF_GNAT_ENCODINGS_DEFAULT
149
299404a1
JM
150; -dP causes the rtl to be emitted as a comment in assembly.
151Variable
152int flag_dump_rtl_in_asm
153
154; Whether -da was passed (used only in handle_common_deferred_options).
155Variable
156bool flag_dump_all_passed
157
158; Other flags saying which kinds of debugging dump have been requested.
159
160Variable
161int rtl_dump_and_exit
162
163Variable
164int flag_print_asm_name
165
a803773f
JM
166; Name of top-level original source file (what was input to cpp).
167; This comes from the #-command at the beginning of the actual input.
168; If there isn't any there, then this is the cc1 input file name.
169Variable
170const char *main_input_filename
171
172; Pointer to base name in main_input_filename, with directories and a
173; single final extension removed, and the length of this base
174; name.
175
176Variable
177const char *main_input_basename
178
179Variable
180int main_input_baselength
181
1dedc12d
AO
182; The base name used for auxiliary output files.
183; dump_base_name minus dump_base_ext.
184
185Variable
186const char *aux_base_name
187
299404a1
JM
188; Which options have been printed by --help.
189Variable
190char *help_printed
191
e6d4b984
JM
192; Which enums have been printed by --help. 0 = not printed, no
193; relevant options seen, 1 = relevant option seen, not yet printed, 2
194; = printed.
195Variable
196char *help_enum_printed
197
299404a1
JM
198; The number of columns for --help output.
199Variable
200unsigned int help_columns
201
202; Whether this options structure has been through finish_options
203Variable
204bool flag_opts_finished
205
de5a5fa1
MP
206; What the sanitizer should instrument
207Variable
208unsigned int flag_sanitize
209
d95a2703
JJ
210; What sanitizers should recover from errors
211Variable
3bd87832 212unsigned int flag_sanitize_recover = (SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT | SANITIZE_KERNEL_ADDRESS | SANITIZE_KERNEL_HWADDRESS) & ~(SANITIZE_UNREACHABLE | SANITIZE_RETURN)
d95a2703 213
2c7cfc7b
JJ
214; What sanitizers should use __builtin_trap () instead of runtime diagnostics
215Variable
216unsigned int flag_sanitize_trap
217
91035653
JJ
218; Flag whether a prefix has been added to dump_base_name
219Variable
220bool dump_base_name_prefixed = false
221
d10f3e90 222; What subset of registers should be zeroed on function return
223Variable
224unsigned int flag_zero_call_used_regs
225
603349bf
JM
226###
227Driver
228
e200444e
JM
229-assemble
230Driver Alias(S)
231
232-compile
233Driver Alias(c)
234
d86c7648
ML
235-completion=
236Common Driver Joined Undocumented
237Provide bash completion for options starting with provided string.
238
e200444e
JM
239-coverage
240Driver Alias(coverage)
241
242-debug
243Common Alias(g)
244
245-dump
246Common Separate Alias(d)
247
248-dump=
249Common Joined Alias(d)
250
251-dumpbase
1dedc12d
AO
252Driver Common Separate Alias(dumpbase)
253
254-dumpbase-ext
255Driver Common Separate Alias(dumpbase-ext)
e200444e
JM
256
257-dumpdir
1dedc12d 258Driver Common Separate Alias(dumpdir)
e200444e
JM
259
260-entry
261Driver Separate Alias(e)
262
263-entry=
264Driver Joined Alias(e)
265
266-extra-warnings
267Common Warning Alias(Wextra)
268
269-for-assembler
270Driver Separate Alias(Xassembler)
271
272-for-assembler=
273Driver JoinedOrMissing Alias(Xassembler)
274
275-for-linker
276Driver Separate Alias(Xlinker)
277
278-for-linker=
279Driver JoinedOrMissing Alias(Xlinker)
280
281-force-link
282Driver Separate Alias(u)
283
284-force-link=
285Driver Joined Alias(u)
286
d185d268 287-help
e200444e 288Common Driver Var(help_flag)
a7b2e184 289Display this information.
d185d268 290
c662432e 291-help=
eece52b5 292Common Driver Joined
a7b2e184 293--help=<class> Display descriptions of a specific class of options. <class> is one or more of optimizers, target, warnings, undocumented, params.
903caebf 294
e200444e
JM
295-language
296Driver Separate Alias(x)
297
298-language=
299Driver Joined Alias(x)
300
301-library-directory
302Driver Separate Alias(L)
303
304-library-directory=
305Driver Joined Alias(L)
306
307-no-canonical-prefixes
308Driver Alias(no-canonical-prefixes)
309
310-no-standard-libraries
311Driver Alias(nostdlib)
312
28b4fc51
JM
313-no-sysroot-suffix
314Driver Var(no_sysroot_suffix)
315
e200444e
JM
316-no-warnings
317Common Alias(w)
318
319-optimize
320Common Alias(O)
321
322-output
323Common Driver Separate Alias(o) MissingArgError(missing filename after %qs)
324
325-output=
326Common Driver Joined Alias(o) MissingArgError(missing filename after %qs)
327
328-pass-exit-codes
329Driver Alias(pass-exit-codes)
330
331-pedantic
c1771a20 332Common Alias(Wpedantic)
e200444e
JM
333
334-pedantic-errors
335Common Alias(pedantic-errors)
336
337-pie
5460e1fc 338Driver Alias(pie)
e200444e 339
b4fed890
L
340-static-pie
341Driver Alias(static-pie)
342
e200444e
JM
343-pipe
344Driver Alias(pipe)
345
346-prefix
347Driver Separate Alias(B)
348
349-prefix=
350Driver JoinedOrMissing Alias(B)
351
352-preprocess
353Driver Alias(E)
354
355-print-file-name
356Driver Separate Alias(print-file-name=)
357
358-print-file-name=
359Driver JoinedOrMissing Alias(print-file-name=)
360
361-print-libgcc-file-name
362Driver Alias(print-libgcc-file-name)
363
364-print-multi-directory
365Driver Alias(print-multi-directory)
366
367-print-multi-lib
368Driver Alias(print-multi-lib)
369
370-print-multi-os-directory
371Driver Alias(print-multi-os-directory)
372
e0cdc09f
MK
373-print-multiarch
374Driver Alias(print-multiarch)
375
e200444e
JM
376-print-prog-name
377Driver Separate Alias(print-prog-name=)
378
379-print-prog-name=
380Driver JoinedOrMissing Alias(print-prog-name=)
381
382-print-search-dirs
383Driver Alias(print-search-dirs)
384
385-print-sysroot
386Driver Alias(print-sysroot)
387
388-print-sysroot-headers-suffix
389Driver Alias(print-sysroot-headers-suffix)
390
391-profile
392Common Alias(p)
393
394-save-temps
395Driver Alias(save-temps)
396
397-shared
5460e1fc 398Driver Alias(shared)
e200444e
JM
399
400-specs
401Driver Separate Alias(specs=)
402
403-specs=
404Driver Joined Alias(specs=)
405
406-static
407Driver Alias(static)
408
409-symbolic
410Driver Alias(symbolic)
411
d185d268 412-target-help
603349bf 413Common Driver
717b2d41 414Display target specific command line options (including assembler and linker options).
c662432e 415
e200444e
JM
416-time
417Driver Alias(time)
418
985b5a90
PD
419;; Truncate the file specified after linking.
420;; This option is used by lto-wrapper to reduce the peak disk-usage when
421;; linking with many .LTRANS units.
422truncate
423Driver Separate Undocumented MissingArgError(missing filename after %qs)
424
e200444e
JM
425-verbose
426Driver Alias(v)
427
428;; The driver used to convert options such as --help into forms such
429;; as -fhelp; the following four entries are for compatibility with
430;; any direct uses of those (undocumented) -f forms
c662432e 431fhelp
e200444e 432Common Driver Alias(-help)
c662432e
NC
433
434fhelp=
e200444e 435Common Driver Joined Alias(-help=)
c662432e
NC
436
437ftarget-help
e200444e 438Common Driver Alias(-target-help)
c662432e 439
41fd0f9b 440fversion
e200444e 441Common Driver Alias(-version)
41fd0f9b 442
e200444e
JM
443-sysroot
444Driver Separate Alias(-sysroot=)
445
603349bf
JM
446-sysroot=
447Driver JoinedOrMissing
448
d185d268 449-version
603349bf
JM
450Common Driver
451
452B
453Driver Joined Separate
454
455E
456Driver
d185d268 457
d9d16a19
JM
458L
459Driver Joined Separate
460
dd9f93dc
JM
461N
462Driver
463
903caebf 464O
ab442df7 465Common JoinedOrMissing Optimization
a7b2e184 466-O<number> Set optimization level to <number>.
903caebf
NB
467
468Os
ab442df7 469Common Optimization
a7b2e184 470Optimize for space rather than speed.
903caebf 471
be6d3f0e
RG
472Ofast
473Common Optimization
a7b2e184 474Optimize for speed disregarding exact standards compliance.
be6d3f0e 475
bf7a7185
RG
476Og
477Common Optimization
a7b2e184 478Optimize for debugging experience rather than speed or size.
bf7a7185 479
e742722f
RS
480Oz
481Common Optimization
482Optimize for space aggressively rather than speed.
483
dd9f93dc
JM
484Q
485Driver
486
487Qn
488Driver Negative(Qy)
489
490Qy
491Driver Negative(Qn)
492
6d721f67
JM
493R
494Driver Joined Separate
495
603349bf
JM
496S
497Driver
498
6d721f67
JM
499T
500Driver Joined Separate
501
502Tbss
503Driver Separate
504
e69d7376
JM
505Tbss=
506Driver Joined
507
6d721f67
JM
508Tdata
509Driver Separate
510
e69d7376
JM
511Tdata=
512Driver Joined
513
6d721f67
JM
514Ttext
515Driver Separate
516
e69d7376
JM
517Ttext=
518Driver Joined
519
903caebf 520W
5de8299c 521Common RejectNegative Warning Alias(Wextra)
a7b2e184 522This switch is deprecated; use -Wextra instead.
903caebf 523
603349bf 524Wa,
9ed32e27 525Driver JoinedOrMissing RejectNegative
603349bf
JM
526
527Wl,
9ed32e27 528Driver JoinedOrMissing RejectNegative
603349bf
JM
529
530Wp,
9ed32e27 531Driver JoinedOrMissing RejectNegative
603349bf 532
e01cc6dc 533Waggregate-return
c662432e 534Common Var(warn_aggregate_return) Warning
a7b2e184 535Warn about returning structures, unions or arrays.
e01cc6dc 536
fbd28bc3
JJ
537Waggressive-loop-optimizations
538Common Var(warn_aggressive_loop_optimizations) Init(1) Warning
a7b2e184 539Warn if a loop with constant number of iterations triggers undefined behavior.
fbd28bc3 540
590b1f2d 541Warray-bounds
7c01d029 542Common Alias(Warray-bounds=, 1, 0) Warning
590b1f2d 543
de1b5c17 544Warray-bounds=
63010089 545Common Joined RejectNegative UInteger Var(warn_array_bounds) Warning IntegerRange(0, 2)
a7b2e184 546Warn if an array is accessed out of bounds.
de1b5c17 547
671a2836
MS
548Wuse-after-free
549Common Var(warn_use_after_free) Warning
dc898b2b 550Warn for uses of pointers to deallocated storage.
671a2836
MS
551
552Wuse-after-free=
553Common Joined RejectNegative UInteger Var(warn_use_after_free) Warning IntegerRange(0, 3)
dc898b2b 554Warn for uses of pointers to deallocated storage.
671a2836 555
5c498b10 556Wattributes
c662432e 557Common Var(warn_attributes) Init(1) Warning
a7b2e184 558Warn about inappropriate attribute usage.
5c498b10 559
a1ad0d84
MP
560Wattributes=
561Common Joined
562Do not warn about specified attributes.
563
5ebfd62b
BE
564Wattribute-alias
565Common Alias(Wattribute_alias=, 1, 0) Warning
d3a02ae5 566Warn about type safety and similar errors and mismatches in declarations with alias attributes.
5ebfd62b 567
79a2c428
MS
568Wattribute-alias=
569Common Joined RejectNegative UInteger Var(warn_attribute_alias) Init(1) Warning IntegerRange(0, 2)
d3a02ae5 570Warn about type safety and similar errors and mismatches in declarations with alias attributes.
79a2c428 571
6902799c
IL
572Wcannot-profile
573Common Var(warn_cannot_profile) Init(1) Warning
574Warn when profiling instrumentation was requested, but could not be applied to
575a certain function.
576
e01cc6dc 577Wcast-align
c662432e 578Common Var(warn_cast_align) Warning
a7b2e184 579Warn about pointer casts which increase alignment.
e01cc6dc 580
1d933576
BE
581Wcast-align=strict
582Common Var(warn_cast_align,2) Warning
583Warn about pointer casts which increase alignment.
584
320dc51c
TS
585Wcomplain-wrong-lang
586Common Var(warn_complain_wrong_lang) Init(1) Warning
587Complain when a command-line option is valid, but not applicable to the current front end.
588
87cf0651
SB
589Wcpp
590Common Var(warn_cpp) Init(1) Warning
a7b2e184 591Warn when a #warning directive is encountered.
87cf0651 592
e217792b
NM
593Wattribute-warning
594Common Var(warn_attribute_warning) Init(1) Warning
595Warn about uses of __attribute__((warning)) declarations.
596
99063eee
RS
597Wdeprecated
598Common Var(warn_deprecated) Init(1) Warning
599Warn if a deprecated compiler feature, class, method, or field is used.
600
e01cc6dc 601Wdeprecated-declarations
c662432e 602Common Var(warn_deprecated_decl) Init(1) Warning
a7b2e184 603Warn about uses of __attribute__((deprecated)) declarations.
e01cc6dc
NB
604
605Wdisabled-optimization
c662432e 606Common Var(warn_disabled_optimization) Warning
a7b2e184 607Warn when an optimization pass is disabled.
e01cc6dc
NB
608
609Werror
50431bc4 610Common Var(warnings_are_errors)
0acac6c4 611Turn all warnings into errors.
e01cc6dc 612
79cf5994
DD
613Werror=
614Common Joined
0acac6c4 615Turn the specified warning into an error.
79cf5994 616
903caebf 617Wextra
62a67c94 618Common Var(extra_warnings) Warning
a7b2e184 619Print extra (possibly unwanted) warnings.
903caebf 620
c65a01af 621Wfatal-errors
50431bc4 622Common Var(flag_fatal_errors)
a7b2e184 623Exit on the first error occurred.
c65a01af 624
a214518f 625Wframe-larger-than=
00abf86c
MS
626Common RejectNegative Joined Host_Wide_Int ByteSize Warning Var(warn_frame_larger_than_size) Init(HOST_WIDE_INT_MAX)
627-Wframe-larger-than=<byte-size> Warn if a function's stack frame requires in excess of <byte-size>.
a214518f 628
ae962e57
MS
629Wno-frame-larger-than
630Common Alias(Wframe-larger-than=,18446744073709551615EiB,none) Warning
631Disable -Wframe-larger-than= warning. Equivalent to -Wframe-larger-than=<SIZE_MAX> or larger.
632
a3a704a4
MH
633Wfree-nonheap-object
634Common Var(warn_free_nonheap_object) Init(1) Warning
a7b2e184 635Warn when attempting to free a non-heap object.
a3a704a4 636
24592abd
MP
637Whardened
638Common Var(warn_hardened) Init(1) Warning
639Warn when -fhardened did not enable an option from its set.
640
b2b40051 641Whsa
c56684fd
MJ
642Common Ignore Warning
643Does nothing. Preserved for backward compatibility.
b2b40051 644
81fea426 645Wimplicit-fallthrough
70f6d5e1
JJ
646Common Alias(Wimplicit-fallthrough=,3,0) Warning
647
648Wimplicit-fallthrough=
63010089 649Common Var(warn_implicit_fallthrough) RejectNegative Joined UInteger Warning IntegerRange(0, 5)
81fea426
MP
650Warn when a switch case falls through.
651
30ba058f
MS
652Winfinite-recursion
653Var(warn_infinite_recursion) Warning
654Warn for infinitely recursive calls.
655
e01cc6dc 656Winline
a924bffb 657Common Var(warn_inline) Warning Optimization
a7b2e184 658Warn when an inlined function cannot be inlined.
e01cc6dc 659
86951993
AM
660Winvalid-memory-model
661Common Var(warn_invalid_memory_model) Init(1) Warning
662Warn when an atomic memory model parameter is known to be outside the valid range.
663
e01cc6dc 664Wlarger-than-
5de8299c 665Common RejectNegative Joined Warning Undocumented Alias(Wlarger-than=)
e8fc888d
MLI
666
667Wlarger-than=
00abf86c
MS
668Common RejectNegative Joined Host_Wide_Int ByteSize Warning Var(warn_larger_than_size) Init(HOST_WIDE_INT_MAX)
669-Wlarger-than=<byte-size> Warn if an object's size exceeds <byte-size>.
e01cc6dc 670
ae962e57
MS
671Wno-larger-than
672Common Alias(Wlarger-than=,18446744073709551615EiB,none) Warning
673Disable -Wlarger-than= warning. Equivalent to -Wlarger-than=<SIZE_MAX> or larger.
674
bf14eba2
JJ
675Wnonnull-compare
676Var(warn_nonnull_compare) Warning
677Warn if comparing pointer parameter with nonnull attribute with NULL.
678
76787f70 679Wnull-dereference
c2d89095 680Common Var(warn_null_dereference) Warning
a7b2e184 681Warn if dereferencing a NULL pointer may lead to erroneous or undefined behavior.
76787f70 682
f9cc1a70 683Wunsafe-loop-optimizations
ee79110c
JJ
684Common Ignore Warning
685Does nothing. Preserved for backward compatibility.
f9cc1a70 686
e01cc6dc 687Wmissing-noreturn
54d62f51 688Common Warning Alias(Wsuggest-attribute=noreturn)
e01cc6dc 689
634215cd
JJ
690Wmusttail-local-addr
691Common Var(warn_musttail_local_addr) Init(1) Warning
692Warn about passing a pointer/reference to a local or temporary variable to a musttail call argument.
693
694Wmaybe-musttail-local-addr
695Common Var(warn_maybe_musttail_local_addr) Warning EnabledBy(Wextra)
696Warn about pointer/reference to a local or temporary variable possibly escaping to a musttail call.
697
c59f7203 698Wodr
a0fd3373 699Common Var(warn_odr_violations) Init(1) Warning
a7b2e184 700Warn about some C++ One Definition Rule violations during link time optimization.
c59f7203 701
71834ad3 702Woverflow
c662432e 703Common Var(warn_overflow) Init(1) Warning
a7b2e184 704Warn about overflow in arithmetic expressions.
71834ad3 705
259d29e3
JH
706Wlto-type-mismatch
707Common Var(warn_lto_type_mismatch) Init(1) Warning
a7b2e184 708During link time optimization warn about mismatched types of global declarations.
259d29e3 709
e01cc6dc 710Wpacked
c662432e 711Common Var(warn_packed) Warning
a7b2e184 712Warn when the packed attribute has no effect on struct layout.
e01cc6dc
NB
713
714Wpadded
c662432e 715Common Var(warn_padded) Warning
a7b2e184 716Warn when padding is required to align structure members.
e01cc6dc 717
c1771a20 718Wpedantic
2b71f4a4 719Common Var(pedantic) Init(0) Warning
a7b2e184 720Issue warnings needed for strict compliance to the standard.
c1771a20 721
b4dfdc11
MG
722Wreturn-local-addr
723Common Var(warn_return_local_addr) Init(1) Warning
724Warn about returning a pointer/reference to a local or temporary variable.
725
e01cc6dc 726Wshadow
c662432e 727Common Var(warn_shadow) Warning
84ff4775
LCW
728Warn when one variable shadows another. Same as -Wshadow=global.
729
730Wshadow=global
731Common Warning Alias(Wshadow)
732Warn when one variable shadows another (globally).
733
734Wshadow=local
735Common Var(warn_shadow_local) Warning EnabledBy(Wshadow)
736Warn when one local variable shadows another local variable or parameter.
737
738Wshadow-local
739Common Warning Undocumented Alias(Wshadow=local)
740
741Wshadow=compatible-local
742Common Var(warn_shadow_compatible_local) Warning EnabledBy(Wshadow=local)
743Warn when one local variable shadows another local variable or parameter of compatible type.
744
745Wshadow-compatible-local
746Common Warning Undocumented Alias(Wshadow=compatible-local)
e01cc6dc 747
7d69de61 748Wstack-protector
c662432e 749Common Var(warn_stack_protect) Warning
a7b2e184 750Warn when not issuing stack smashing protection for some reason.
7d69de61 751
a11e0df4 752Wstack-usage=
00abf86c
MS
753Common Joined RejectNegative Host_Wide_Int ByteSize Var(warn_stack_usage) Warning Init(HOST_WIDE_INT_MAX)
754-Wstack-usage=<byte-size> Warn if stack usage might exceed <byte-size>.
a11e0df4 755
ae962e57
MS
756Wno-stack-usage
757Common Alias(Wstack-usage=,18446744073709551615EiB,none) Warning
758Disable Wstack-usage= warning. Equivalent to Wstack-usage=<SIZE_MAX> or larger.
759
e01cc6dc 760Wstrict-aliasing
c662432e 761Common Warning
a7b2e184 762Warn about code which might break strict aliasing rules.
e01cc6dc 763
5399d643 764Wstrict-aliasing=
65d4f2cd 765Common Joined RejectNegative UInteger Var(warn_strict_aliasing) Warning
a7b2e184 766Warn about code which might break strict aliasing rules.
5399d643 767
6ac01510 768Wstrict-overflow
21af5cdf 769Common Warning
a7b2e184 770Warn about optimizations that assume that signed overflow is undefined.
6ac01510
ILT
771
772Wstrict-overflow=
65d4f2cd 773Common Joined RejectNegative UInteger Var(warn_strict_overflow) Warning
a7b2e184 774Warn about optimizations that assume that signed overflow is undefined.
6ac01510 775
12b9f3ac
JH
776Wsuggest-attribute=cold
777Common Var(warn_suggest_attribute_cold) Warning
778Warn about functions which might be candidates for __attribute__((cold)).
779
5dc16b19
MLI
780Wsuggest-attribute=const
781Common Var(warn_suggest_attribute_const) Warning
a7b2e184 782Warn about functions which might be candidates for __attribute__((const)).
5dc16b19
MLI
783
784Wsuggest-attribute=pure
785Common Var(warn_suggest_attribute_pure) Warning
a7b2e184 786Warn about functions which might be candidates for __attribute__((pure)).
5dc16b19 787
7ea6b6cf
JH
788Wsuggest-attribute=noreturn
789Common Var(warn_suggest_attribute_noreturn) Warning
a7b2e184 790Warn about functions which might be candidates for __attribute__((noreturn)).
7ea6b6cf 791
0fab169b
PK
792Wsuggest-attribute=malloc
793Common Var(warn_suggest_attribute_malloc) Warning
794Warn about functions which might be candidates for __attribute__((malloc)).
795
53ba8d66
JH
796Wsuggest-attribute=returns_nonnull
797Common Var(warn_suggest_attribute_returns_nonnull) Warning
798Warn about functions which might be candidates for __attribute__((returns_nonnull)).
799
91bc34a9
JH
800Wsuggest-final-types
801Common Var(warn_suggest_final_types) Warning
a7b2e184 802Warn about C++ polymorphic types where adding final keyword would improve code quality.
91bc34a9
JH
803
804Wsuggest-final-methods
805Common Var(warn_suggest_final_methods) Warning
a7b2e184 806Warn about C++ virtual methods where adding final keyword would improve code quality.
91bc34a9 807
a7dc5980
MP
808Wswitch-unreachable
809Common Var(warn_switch_unreachable) Warning Init(1)
810Warn about statements between switch's controlling expression and the first
811case.
812
e01cc6dc 813Wsystem-headers
c662432e 814Common Var(warn_system_headers) Warning
a7b2e184 815Do not suppress warnings from system headers.
e01cc6dc 816
e8febb64
AO
817Wtautological-compare
818Common Var(warn_tautological_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
819Warn if a comparison always evaluates to true or false.
820
8ffadef9
MG
821Wtrampolines
822Common Var(warn_trampolines) Warning
a7b2e184 823Warn whenever a trampoline is generated.
8ffadef9 824
dbaabd06
QZ
825Wtrivial-auto-var-init
826Common Var(warn_trivial_auto_var_init) Warning Init(0)
827Warn about cases where -ftrivial-auto-var-init cannot initialize an auto variable.
828
faebccf9 829Wtype-limits
95744782 830Common Var(warn_type_limits) Warning EnabledBy(Wextra)
a7b2e184 831Warn if a comparison is always true or always false due to the limited range of the data type.
faebccf9 832
e01cc6dc 833Wuninitialized
7d5a5747 834Common Var(warn_uninitialized) Warning EnabledBy(Wextra)
a7b2e184 835Warn about uninitialized automatic variables.
e01cc6dc 836
2f964ad6 837Wmaybe-uninitialized
7d5a5747 838Common Var(warn_maybe_uninitialized) Warning EnabledBy(Wuninitialized)
a7b2e184 839Warn about maybe uninitialized automatic variables.
2f964ad6 840
e01cc6dc 841Wunreachable-code
f1a62b6f 842Common Ignore Warning
bc3c12a2 843Does nothing. Preserved for backward compatibility.
e01cc6dc 844
903caebf 845Wunused
e73f7547 846Common Var(warn_unused) Init(0) Warning
a7b2e184 847Enable all -Wunused- warnings.
903caebf 848
ebfbbdc5 849Wunused-but-set-parameter
d919140b 850Common Var(warn_unused_but_set_parameter) Warning EnabledBy(Wunused && Wextra)
a7b2e184 851Warn when a function parameter is only set, otherwise unused.
ebfbbdc5
JJ
852
853Wunused-but-set-variable
7d5a5747 854Common Var(warn_unused_but_set_variable) Warning EnabledBy(Wunused)
a7b2e184 855Warn when a variable is only set, otherwise unused.
ebfbbdc5 856
e01cc6dc 857Wunused-function
7d5a5747 858Common Var(warn_unused_function) Warning EnabledBy(Wunused)
a7b2e184 859Warn when a function is unused.
e01cc6dc
NB
860
861Wunused-label
7d5a5747 862Common Var(warn_unused_label) Warning EnabledBy(Wunused)
a7b2e184 863Warn when a label is unused.
e01cc6dc
NB
864
865Wunused-parameter
d919140b 866Common Var(warn_unused_parameter) Warning EnabledBy(Wunused && Wextra)
a7b2e184 867Warn when a function parameter is unused.
e01cc6dc
NB
868
869Wunused-value
7d5a5747 870Common Var(warn_unused_value) Warning EnabledBy(Wunused)
a7b2e184 871Warn when an expression value is unused.
e01cc6dc
NB
872
873Wunused-variable
7d5a5747 874Common Var(warn_unused_variable) Warning EnabledBy(Wunused)
a7b2e184 875Warn when a variable is unused.
e01cc6dc 876
16c1c158 877Wcoverage-mismatch
650cfcab 878Common Var(warn_coverage_mismatch) Init(1) Warning
a7b2e184 879Warn in case profiles in -fprofile-use do not match.
16c1c158 880
8bf728ae
ML
881Wcoverage-invalid-line-number
882Common Var(warn_coverage_invalid_linenum) Init(1) Warning
883Warn in case a function ends earlier than it begins due to an invalid linenum macros.
884
08a52331
JK
885Wcoverage-too-many-conditions
886Common Var(warn_too_many_conditions) Init(1) Warning
887Warn when a conditional has too many terms and condition coverage profiling
888gives up instrumenting the expression.
889
8ed2d5d2
JK
890fpath-coverage-limit=
891Common RejectNegative Joined UInteger Var(path_coverage_limit) Init(250000)
892-fpath-coverage-limit=<number> Don't instrument functions path count exceeding
893<number>.
894
895Wcoverage-too-many-paths
896Common Var(warn_too_many_paths) Init(1) Warning
897Warn if a function exceeds the number of paths (controlled by
898-fpath-coverage-limit) and path coverage give up instrumenting the function.
899The limit is approximate and conservative and coverage might give up even if
900the actual number is slightly below the limit.
901
bc162b0e
IB
902Wmissing-profile
903Common Var(warn_missing_profile) Init(1) Warning
904Warn in case profiles in -fprofile-use do not exist.
905
cdbb5ba3
AS
906Wvector-operation-performance
907Common Var(warn_vector_operation_performance) Warning
a7b2e184 908Warn when a vector operation is compiled outside the SIMD.
cdbb5ba3 909
8833eab4
ML
910Wtsan
911Common Var(warn_tsan) Init(1) Warning
912Warn about unsupported features in ThreadSanitizer.
913
603349bf
JM
914Xassembler
915Driver Separate
916
917Xlinker
918Driver Separate
919
920Xpreprocessor
921Driver Separate
922
dd9f93dc
JM
923Z
924Driver
925
d185d268 926aux-info
d5478783 927Common Separate Var(aux_info_file_name)
a7b2e184 928-aux-info <file> Emit declaration information into <file>.
d185d268
NB
929
930aux-info=
5de8299c 931Common Joined Alias(aux-info)
d185d268 932
e200444e
JM
933coverage
934Driver
935
603349bf
JM
936c
937Driver
d185d268
NB
938
939d
940Common Joined
a7b2e184 941-d<letters> Enable dumps from specific passes of the compiler.
d185d268
NB
942
943dumpbase
1dedc12d 944Driver Common Separate Var(dump_base_name)
a7b2e184 945-dumpbase <file> Set the file basename to be used for dumps.
d185d268 946
1dedc12d
AO
947dumpbase-ext
948Driver Common Separate Var(dump_base_ext)
949-dumpbase-ext .<ext> Drop a trailing .<ext> from the dump basename to name auxiliary output files.
950
d7fb0a6d 951dumpdir
1dedc12d 952Driver Common Separate Var(dump_dir_name)
a7b2e184 953-dumpdir <dir> Set the directory name to be used for dumps.
d7fb0a6d 954
603349bf
JM
955dumpmachine
956Driver
957
958dumpspecs
959Driver
960
961dumpversion
962Driver
963
3c36aa6b
JJ
964dumpfullversion
965Driver
966
e200444e
JM
967e
968Driver Joined Separate
969
fa381cb2
JM
970; This option has historically been passed down to the linker by an
971; accident of a %{e*} spec, so ensure it continues to be passed down
972; as a single option. The supported option for this purpose is
973; -rdynamic. See PR 47390.
974export-dynamic
975Driver Undocumented
976
31b66477
KC
977; The version of the C++ ABI in use. The following values are allowed:
978;
979; 0: The version of the ABI believed most conformant with the C++ ABI
980; specification. This ABI may change as bugs are discovered and fixed.
981; Therefore, 0 will not necessarily indicate the same ABI in different
982; versions of G++.
983;
90d84934 984; 1: The version of the ABI first used in G++ 3.2. No longer selectable.
31b66477 985;
785f21af
JM
986; 2: The version of the ABI first used in G++ 3.4, and the default
987; until GCC 4.9.
abfe01ce
JM
988;
989; 3: The version of the ABI that fixes the missing underscore
990; in template non-type arguments of pointer type.
991;
992; 4: The version of the ABI that introduces unambiguous mangling of
55af847f 993; vector types. First selectable in G++ 4.5.
99a8d35b 994;
67e18edb 995; 5: The version of the ABI that ignores attribute const/noreturn
55af847f 996; in function pointer mangling, and corrects mangling of decltype and
67e18edb 997; function parameters used in other parameters and the return type.
55af847f 998; First selectable in G++ 4.6.
67e18edb 999;
4b6aaa99
JM
1000; 6: The version of the ABI that doesn't promote scoped enums to int and
1001; changes the mangling of template argument packs, const/static_cast,
1002; prefix ++ and --, and a class scope function used as a template
1003; argument.
967444bb
JM
1004; First selectable in G++ 4.7.
1005;
622aac0b
JM
1006; 7: The version of the ABI that treats nullptr_t as a builtin type and
1007; corrects the mangling of lambdas in default argument scope.
a3ddb738 1008; First selectable in G++ 4.8.
0861bec8
JM
1009;
1010; 8: The version of the ABI that corrects the substitution behavior of
1011; function types with function-cv-qualifiers.
603eaec4
JM
1012; First selectable in G++ 4.9 and default in G++ 5.
1013;
a03c9bf1
JM
1014; 9: The version of the ABI that corrects the alignment of nullptr_t.
1015; First selectable and default in G++ 5.2.
1016;
1017; 10: The version of the ABI that mangles attributes that affect type
1018; identity, such as ia32 calling convention attributes (stdcall, etc.)
1019; Default in G++ 6 (set in c_common_post_options).
0861bec8 1020;
31f7f784
JM
1021; 11: The version of the ABI that corrects mangling of sizeof... expressions
1022; and introduces new inheriting constructor handling.
34bbc4c5
JM
1023; Default in G++ 7.
1024;
f3ec182d 1025; 12: Corrects the calling convention for classes with only deleted copy/move
974aedcc 1026; constructors and changes passing/returning of empty records.
34a7a230
JM
1027; Default in G++ 8.1.
1028;
1029; 13: Fixes the accidental change in 12 to the calling convention for classes
1030; with deleted copy constructor and trivial move constructor.
1031; Default in G++ 8.2.
b1c9b3c3 1032;
e0c866dd
KK
1033; 14: Corrects the mangling of nullptr expression.
1034; Default in G++ 10.
f3ec182d 1035;
5f00df59
JM
1036; 15: Corrects G++ 10 ABI tag regression [PR98481].
1037; Available, but not default, in G++ 10.3.
1038;
1039; 16: Changes the mangling of __alignof__ to be distinct from that of alignof.
1040; Adds missing 'on' in mangling of operator names in some cases.
b1c9b3c3
PP
1041; Default in G++ 11.
1042;
a37e8ce3
JM
1043; 17: Fixes layout of classes that inherit from aggregate classes with default
1044; member initializers in C++14 and up.
1045; Default in G++ 12.
1046;
c7cb239f
NS
1047; 18: Corrects errors in mangling of lambdas with additional context.
1048; Default in G++ 13.
1049;
cd37325b 1050; 19: Emits ABI tags if needed in structured binding mangled names.
685c458f 1051; Ignores cv-quals on [[no_unique_address]] members.
074c6f15 1052; Mangles constraints on function templates.
cd37325b
JJ
1053; Default in G++ 14.
1054;
685c458f
NS
1055; 20: Fix mangling of lambdas in static data member initializers.
1056; Default in G++ 15.
1057;
87c44600 1058; 21: Fix noexcept lambda capture pruning.
e6e3b077 1059; Fix C++20 layout of base with all explicitly defaulted constructors.
b13bb504
JM
1060; Default in G++ 16.
1061;
31b66477
KC
1062; Additional positive integers will be assigned as new versions of
1063; the ABI become the default version of the ABI.
57782ad8 1064fabi-version=
ca0e51a0 1065Common Joined RejectNegative UInteger Var(flag_abi_version) Init(0)
a7b2e184 1066The version of the C++ ABI in use.
57782ad8 1067
6e616110 1068faggressive-loop-optimizations
eece52b5 1069Common Var(flag_aggressive_loop_optimizations) Optimization Init(1)
a7b2e184 1070Aggressively optimize loops using language constraints.
6e616110 1071
6ff3a151 1072falign-functions
eece52b5 1073Common Var(flag_align_functions) Optimization
a7b2e184 1074Align the start of functions.
6ff3a151 1075
058de654 1076falign-functions=
c518c102 1077Common RejectNegative Joined Var(str_align_functions) Optimization
058de654 1078
6ff3a151 1079falign-jumps
eece52b5 1080Common Var(flag_align_jumps) Optimization
a7b2e184 1081Align labels which are only reached by jumping.
6ff3a151 1082
058de654 1083falign-jumps=
c518c102 1084Common RejectNegative Joined Var(str_align_jumps) Optimization
058de654 1085
6ff3a151 1086falign-labels
eece52b5 1087Common Var(flag_align_labels) Optimization
a7b2e184 1088Align all labels.
6ff3a151 1089
058de654 1090falign-labels=
c518c102 1091Common RejectNegative Joined Var(str_align_labels) Optimization
058de654 1092
6ff3a151 1093falign-loops
eece52b5 1094Common Var(flag_align_loops) Optimization
a7b2e184 1095Align the start of loops.
6ff3a151 1096
058de654 1097falign-loops=
8956e247 1098Common RejectNegative Joined Var(str_align_loops) Optimization
058de654 1099
e622a32d 1100fallow-store-data-races
eece52b5 1101Common Var(flag_store_data_races) Optimization
e622a32d
RB
1102Allow the compiler to introduce new data races on stores.
1103
757bf1df
DM
1104fanalyzer
1105Common Var(flag_analyzer)
1106Enable static analysis pass.
1107
6ff3a151 1108fargument-alias
2d2bd949 1109Common Ignore
0d3c82d6 1110Does nothing. Preserved for backward compatibility.
6ff3a151
NB
1111
1112fargument-noalias
2d2bd949 1113Common Ignore
0d3c82d6 1114Does nothing. Preserved for backward compatibility.
6ff3a151
NB
1115
1116fargument-noalias-global
2d2bd949 1117Common Ignore
0d3c82d6 1118Does nothing. Preserved for backward compatibility.
6ff3a151 1119
0698a1d2 1120fargument-noalias-anything
2d2bd949 1121Common Ignore
0d3c82d6 1122Does nothing. Preserved for backward compatibility.
0698a1d2 1123
de5a5fa1 1124fsanitize=
eece52b5 1125Common Driver Joined
a7b2e184 1126Select what to sanitize.
32b4b7f5 1127
f6e50a7d 1128fsanitize-coverage=
0ebb09f5 1129Common Joined Enum(sanitize_coverage) Var(flag_sanitize_coverage) EnumBitSet
cefc0906 1130Select type of coverage sanitization.
f6e50a7d 1131
c1681f22
ML
1132Enum
1133Name(sanitize_coverage) Type(int)
1134
1135EnumValue
0ebb09f5 1136Enum(sanitize_coverage) String(trace-pc) Value(SANITIZE_COV_TRACE_PC)
c1681f22
ML
1137
1138EnumValue
0ebb09f5 1139Enum(sanitize_coverage) String(trace-cmp) Value(SANITIZE_COV_TRACE_CMP)
c1681f22 1140
fd960af2
YG
1141fasan-shadow-offset=
1142Common Joined RejectNegative Var(common_deferred_options) Defer
1143-fasan-shadow-offset=<number> Use custom shadow memory offset.
1144
18af8d16
YG
1145fsanitize-sections=
1146Common Joined RejectNegative Var(common_deferred_options) Defer
1147-fsanitize-sections=<sec1,sec2,...> Sanitize global variables
1148in user-defined sections.
1149
d95a2703 1150fsanitize-recover=
eece52b5 1151Common Joined
a7b2e184 1152After diagnosing undefined behavior attempt to continue execution.
1c33c9b7 1153
d95a2703 1154fsanitize-recover
eece52b5 1155Common
a7b2e184 1156This switch is deprecated; use -fsanitize-recover= instead.
d95a2703 1157
2c7cfc7b
JJ
1158fsanitize-trap=
1159Common Driver Joined
1160Use traps instead of diagnostics of undefined behavior sanitizers.
1161
1162fsanitize-trap
1163Common Driver
1164
6dc4a604 1165fsanitize-address-use-after-scope
eece52b5 1166Common Driver Var(flag_sanitize_address_use_after_scope) Init(0)
6dc4a604 1167
1c33c9b7 1168fsanitize-undefined-trap-on-error
2c7cfc7b
JJ
1169Common Driver Alias(fsanitize-trap)
1170This switch is deprecated; use -fsanitize-trap= instead.
1c33c9b7 1171
6ff3a151 1172fasynchronous-unwind-tables
eece52b5 1173Common Var(flag_asynchronous_unwind_tables) Optimization
a7b2e184 1174Generate unwind tables that are exact at each instruction boundary.
6ff3a151 1175
6fb5fa3c 1176fauto-inc-dec
eece52b5 1177Common Var(flag_auto_inc_dec) Init(1) Optimization
a7b2e184 1178Generate auto-inc/dec instructions.
6fb5fa3c 1179
be3c16c4 1180fauto-profile
eece52b5 1181Common Var(flag_auto_profile)
be3c16c4
DC
1182Use sample profile information for call graph node weights. The default
1183profile file is fbdata.afdo in 'pwd'.
1184
1185fauto-profile=
1186Common Joined RejectNegative Var(auto_profile_file)
1187Use sample profile information for call graph node weights. The profile
1188file is specified in the argument.
1189
aaf55e09
JH
1190fauto-profile-inlining
1191Common Var(flag_auto_profile_inlining) Init(1) Optimization
1192Perform inlining using auto-profile.
1193
31b66477
KC
1194; -fcheck-bounds causes gcc to generate array bounds checks.
1195; For C, C++ and ObjC: defaults off.
1196; For Java: defaults to on.
1197; For Fortran: defaults to off.
6ff3a151 1198fbounds-check
eece52b5 1199Common Var(flag_bounds_check)
a7b2e184 1200Generate code to check bounds before indexing arrays.
6ff3a151
NB
1201
1202fbranch-count-reg
eece52b5 1203Common Var(flag_branch_on_count_reg) Optimization
a7b2e184 1204Replace add, compare, branch with branch on count register.
6ff3a151
NB
1205
1206fbranch-probabilities
eece52b5 1207Common Var(flag_branch_probabilities) Optimization
a7b2e184 1208Use profiling information for branch probabilities.
6ff3a151 1209
de32c0cb 1210fbranch-target-load-optimize
f78f73cb
RS
1211Common Ignore
1212Does nothing. Preserved for backward compatibility.
de32c0cb
NB
1213
1214fbranch-target-load-optimize2
f78f73cb
RS
1215Common Ignore
1216Does nothing. Preserved for backward compatibility.
de32c0cb 1217
1194fc79 1218fbtr-bb-exclusive
f78f73cb
RS
1219Common Ignore
1220Does nothing. Preserved for backward compatibility.
1194fc79 1221
3cf3da88 1222fcallgraph-info
eece52b5 1223Common RejectNegative Var(flag_callgraph_info) Init(NO_CALLGRAPH_INFO);
3cf3da88
EB
1224Output callgraph information on a per-file basis.
1225
1226fcallgraph-info=
eece52b5 1227Common RejectNegative Joined
3cf3da88
EB
1228Output callgraph information on a per-file basis with decorations.
1229
058de654 1230fcall-saved-
21bf1558 1231Common Joined RejectNegative Var(common_deferred_options) Defer
a7b2e184 1232-fcall-saved-<register> Mark <register> as being preserved across functions.
058de654
NB
1233
1234fcall-used-
21bf1558 1235Common Joined RejectNegative Var(common_deferred_options) Defer
a7b2e184 1236-fcall-used-<register> Mark <register> as being corrupted by function calls.
058de654 1237
31b66477
KC
1238; Nonzero for -fcaller-saves: allocate values in regs that need to
1239; be saved across function calls, if that produces overall better code.
1240; Optional now, so people can test it.
de32c0cb 1241fcaller-saves
eece52b5 1242Common Var(flag_caller_saves) Optimization
a7b2e184 1243Save registers around function calls.
de32c0cb 1244
3d8864c0 1245fcheck-data-deps
c0c12356 1246Common Ignore
49b8fe6c 1247This switch is deprecated; do not use.
3d8864c0 1248
2284b034
MG
1249fcheck-new
1250Common Var(flag_check_new)
a7b2e184 1251Check the return value of new in C++.
2284b034 1252
6d27d749 1253fchecking
b06f87c7 1254Common Var(flag_checking) Init(CHECKING_P ? ENABLE_EXTRA_CHECKING ? 2 : 1 : 0)
6d27d749
RB
1255Perform internal consistency checkings.
1256
7db11a5a
JJ
1257fchecking=
1258Common Joined RejectNegative UInteger Var(flag_checking)
1259Perform internal consistency checkings.
1260
2eb0191a
JJ
1261fcanon-prefix-map
1262Common Var(common_deferred_options) Defer
1263For -f*-prefix-map= options compare canonicalized pathnames rather than just strings.
1264
37ccb0ba 1265fcode-hoisting
eece52b5 1266Common Var(flag_code_hoisting) Optimization
37ccb0ba
SB
1267Enable code hoisting.
1268
ccaeeafe 1269fcombine-stack-adjustments
eece52b5 1270Common Var(flag_combine_stack_adjustments) Optimization
ccaeeafe
NC
1271Looks for opportunities to reduce stack adjustments and stack references.
1272
6ff3a151 1273fcommon
eece52b5 1274Common Var(flag_no_common,0) Init(1)
df73e971 1275Put uninitialized globals in the common section.
6ff3a151 1276
603349bf
JM
1277fcompare-debug
1278Driver
1279; Converted by the driver to -fcompare-debug= options.
1280
2153915d 1281fcompare-debug=
603349bf 1282Common Driver JoinedOrMissing RejectNegative Var(flag_compare_debug_opt)
a7b2e184 1283-fcompare-debug[=<opts>] Compile with and without e.g. -gtoggle, and compare the final-insns dump.
2153915d
AO
1284
1285fcompare-debug-second
5e471ea6 1286Common Driver RejectNegative Var(flag_compare_debug)
a7b2e184 1287Run only the second compilation of -fcompare-debug.
2153915d 1288
e692f276 1289fcompare-elim
eece52b5 1290Common Var(flag_compare_elim_after_reload) Optimization
a7b2e184 1291Perform comparison elimination after register allocation has finished.
e692f276 1292
b5b8b0ac
AO
1293fconserve-stack
1294Common Var(flag_conserve_stack) Optimization
a7b2e184 1295Do not perform optimizations increasing noticeably stack usage.
b5b8b0ac 1296
6ff3a151 1297fcprop-registers
eece52b5 1298Common Var(flag_cprop_registers) Optimization
a7b2e184 1299Perform a register copy-propagation optimization pass.
6ff3a151 1300
04c9cf5c 1301ffold-mem-offsets
1203fc2e 1302Common Var(flag_fold_mem_offsets) Init(1) Optimization
04c9cf5c
MT
1303Fold instructions calculating memory offsets to the memory access instruction if possible.
1304
de32c0cb 1305fcrossjumping
eece52b5 1306Common Var(flag_crossjumping) Optimization
a7b2e184 1307Perform cross-jumping optimization.
de32c0cb
NB
1308
1309fcse-follow-jumps
eece52b5 1310Common Var(flag_cse_follow_jumps) Optimization
a7b2e184 1311When running CSE, follow jumps to their targets.
de32c0cb
NB
1312
1313fcse-skip-blocks
2d2bd949 1314Common Ignore
5f39ad47 1315Does nothing. Preserved for backward compatibility.
de32c0cb 1316
e543eaa6
RB
1317fcx-method=
1318Common Joined RejectNegative Enum(complex_method) Var(flag_complex_method) Optimization SetByCombined
1319
1320Enum
1321Name(complex_method) Type(int)
1322
1323; straightforward implementation of complex divide acceptable.
1324EnumValue
1325Enum(complex_method) String(limited-range) Value(0)
1326
1327; wide ranges of inputs must work for complex divide.
1328EnumValue
1329Enum(complex_method) String(fortran) Value(1)
1330
1331; C99-like requirements for complex multiply and divide.
1332EnumValue
1333Enum(complex_method) String(stdc) Value(2)
1334
c7463669 1335fcx-limited-range
e543eaa6 1336Common Alias(fcx-method=,limited-range,stdc)
a7b2e184 1337Omit range reduction step when performing complex division.
c7463669 1338
35085f76 1339fcx-fortran-rules
e543eaa6 1340Common Alias(fcx-method=,fortran,stdc)
a7b2e184 1341Complex multiplication and division follow Fortran rules.
35085f76 1342
6ff3a151 1343fdata-sections
eece52b5 1344Common Var(flag_data_sections)
a7b2e184 1345Place data items into their own section.
6ff3a151 1346
0a090f42 1347fdbg-cnt-list
eece52b5 1348Common Var(flag_dbg_cnt_list)
0a090f42
SP
1349List all available debugging counters with their limits and counts.
1350
6fb5fa3c 1351fdbg-cnt=
299404a1 1352Common RejectNegative Joined Var(common_deferred_options) Defer
83a49336 1353-fdbg-cnt=<counter>[:<lower_limit1>-]<upper_limit1>[:<lower_limit2>-<upper_limit2>:...][,<counter>:...] Set the debug counter limit.
6fb5fa3c 1354
c8aea42c 1355fdebug-prefix-map=
299404a1 1356Common Joined RejectNegative Var(common_deferred_options) Defer
b408e010 1357-fdebug-prefix-map=<old>=<new> Map one directory name to another in debug information.
7365279f
BK
1358
1359ffile-prefix-map=
1360Common Joined RejectNegative Var(common_deferred_options) Defer
b408e010 1361-ffile-prefix-map=<old>=<new> Map one directory name to another in compilation result.
c8aea42c 1362
76f9db36 1363fdebug-types-section
eece52b5 1364Common Var(flag_debug_types_section) Init(0)
76f9db36
JJ
1365Output .debug_types section when using DWARF v4 debuginfo.
1366
31b66477
KC
1367; Nonzero for -fdefer-pop: don't pop args after each function call
1368; instead save them up to pop many calls' args with one insns.
de32c0cb 1369fdefer-pop
eece52b5 1370Common Var(flag_defer_pop) Optimization
a7b2e184 1371Defer popping functions args from stack until later.
de32c0cb
NB
1372
1373fdelayed-branch
eece52b5 1374Common Var(flag_delayed_branch) Optimization
a7b2e184 1375Attempt to fill delay slots of branch instructions.
de32c0cb 1376
2da02156 1377fdelete-dead-exceptions
eece52b5 1378Common Var(flag_delete_dead_exceptions) Init(0) Optimization
a7b2e184 1379Delete dead instructions that may throw exceptions.
2da02156 1380
de32c0cb 1381fdelete-null-pointer-checks
eece52b5 1382Common Var(flag_delete_null_pointer_checks) Init(-1) Optimization
a7b2e184 1383Delete useless null pointer checks.
de32c0cb 1384
1e29e4d3 1385fdevirtualize-at-ltrans
eece52b5 1386Common Var(flag_ltrans_devirtualize)
a7b2e184 1387Stream extra data to support more aggressive devirtualization in LTO local transformation mode.
1e29e4d3 1388
bbc9396b 1389fdevirtualize-speculatively
eece52b5 1390Common Var(flag_devirtualize_speculatively) Optimization
a7b2e184 1391Perform speculative devirtualization.
bbc9396b 1392
ca1eedf6 1393fdevirtualize
eece52b5 1394Common Var(flag_devirtualize) Optimization
ca1eedf6
JH
1395Try to convert virtual calls to direct ones.
1396
de32c0cb 1397fdiagnostics-show-location=
e6d4b984 1398Common Joined RejectNegative Enum(diagnostic_prefixing_rule)
a7b2e184 1399-fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped diagnostics.
de32c0cb 1400
e6d4b984
JM
1401; Required for these enum values.
1402SourceInclude
1403pretty-print.h
1404
1405Enum
1406Name(diagnostic_prefixing_rule) Type(int)
1407
1408EnumValue
1409Enum(diagnostic_prefixing_rule) String(once) Value(DIAGNOSTICS_SHOW_PREFIX_ONCE)
1410
1411EnumValue
1412Enum(diagnostic_prefixing_rule) String(every-line) Value(DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE)
1413
9fec0042
MLI
1414fdiagnostics-show-caret
1415Common Var(flag_diagnostics_show_caret) Init(1)
a7b2e184 1416Show the source line with a caret indicating the column.
9fec0042 1417
770657d0
DM
1418fdiagnostics-show-event-links
1419Common Var(flag_diagnostics_show_event_links) Init(1)
1420Show lines linking related events in diagnostic paths.
1421
96e6ae57
DM
1422fdiagnostics-show-labels
1423Common Var(flag_diagnostics_show_labels) Init(1)
04e5c73d 1424Show labels annotating ranges of source code when showing source.
96e6ae57 1425
56b61d7f
DM
1426fdiagnostics-show-line-numbers
1427Common Var(flag_diagnostics_show_line_numbers) Init(1)
04e5c73d 1428Show line numbers in the left margin when showing source.
56b61d7f 1429
4b84d650
JJ
1430fdiagnostics-color
1431Common Alias(fdiagnostics-color=,always,never)
1432;
1433
1434fdiagnostics-color=
97aa8bb6 1435Driver Common Joined RejectNegative Var(flag_diagnostics_show_color) Enum(diagnostic_color_rule) Init(DIAGNOSTICS_COLOR_NO)
a7b2e184 1436-fdiagnostics-color=[never|always|auto] Colorize diagnostics.
4b84d650
JJ
1437
1438; Required for these enum values.
1439SourceInclude
1440diagnostic-color.h
1441
1442Enum
1443Name(diagnostic_color_rule) Type(int)
1444
1445EnumValue
1446Enum(diagnostic_color_rule) String(never) Value(DIAGNOSTICS_COLOR_NO)
1447
1448EnumValue
1449Enum(diagnostic_color_rule) String(always) Value(DIAGNOSTICS_COLOR_YES)
1450
1451EnumValue
1452Enum(diagnostic_color_rule) String(auto) Value(DIAGNOSTICS_COLOR_AUTO)
1453
3bd8241a
DM
1454fdiagnostics-json-formatting
1455Common Var(flag_diagnostics_json_formatting) Init(1)
1456Enable formatting of JSON output.
1457
d2608235
DM
1458fdiagnostics-urls=
1459Driver Common Joined RejectNegative Var(flag_diagnostics_show_urls) Enum(diagnostic_url_rule) Init(DIAGNOSTICS_URL_AUTO)
1460-fdiagnostics-urls=[never|always|auto] Embed URLs in diagnostics.
1461
1462; Required for these enum values.
1463SourceInclude
1464diagnostic-url.h
1465
1466Enum
1467Name(diagnostic_url_rule) Type(int)
1468
1469EnumValue
1470Enum(diagnostic_url_rule) String(never) Value(DIAGNOSTICS_URL_NO)
1471
1472EnumValue
1473Enum(diagnostic_url_rule) String(always) Value(DIAGNOSTICS_URL_YES)
1474
1475EnumValue
1476Enum(diagnostic_url_rule) String(auto) Value(DIAGNOSTICS_URL_AUTO)
1477
004bb936
LH
1478fdiagnostics-column-unit=
1479Common Joined RejectNegative Enum(diagnostics_column_unit)
1480-fdiagnostics-column-unit=[display|byte] Select whether column numbers are output as display columns (default) or raw bytes.
1481
1482fdiagnostics-column-origin=
1483Common Joined RejectNegative UInteger
1484-fdiagnostics-column-origin=<number> Set the number of the first column. The default is 1-based as per GNU style, but some utilities may expect 0-based, for example.
1485
478dd60d
DM
1486fdiagnostics-format=
1487Common Joined RejectNegative Enum(diagnostics_output_format)
51ce3734 1488-fdiagnostics-format=[text|sarif-stderr|sarif-file] Select output format.
478dd60d 1489
0b73e938
DM
1490fdiagnostics-add-output=
1491Common Joined RejectNegative
1492Add output format.
1493
1494fdiagnostics-set-output=
1495Common Joined RejectNegative
1496Set output format.
1497
bd5e882c
DM
1498fdiagnostics-escape-format=
1499Common Joined RejectNegative Enum(diagnostics_escape_format)
1500-fdiagnostics-escape-format=[unicode|bytes] Select how to escape non-printable-ASCII bytes in the source for diagnostics that suggest it.
1501
478dd60d
DM
1502; Required for these enum values.
1503SourceInclude
1504diagnostic.h
1505
004bb936
LH
1506Enum
1507Name(diagnostics_column_unit) Type(int)
1508
1509EnumValue
1510Enum(diagnostics_column_unit) String(display) Value(DIAGNOSTICS_COLUMN_UNIT_DISPLAY)
1511
1512EnumValue
1513Enum(diagnostics_column_unit) String(byte) Value(DIAGNOSTICS_COLUMN_UNIT_BYTE)
1514
bd5e882c
DM
1515Enum
1516Name(diagnostics_escape_format) Type(int)
1517
1518EnumValue
1519Enum(diagnostics_escape_format) String(unicode) Value(DIAGNOSTICS_ESCAPE_FORMAT_UNICODE)
1520
1521EnumValue
1522Enum(diagnostics_escape_format) String(bytes) Value(DIAGNOSTICS_ESCAPE_FORMAT_BYTES)
1523
478dd60d
DM
1524Enum
1525Name(diagnostics_output_format) Type(int)
1526
1527EnumValue
1528Enum(diagnostics_output_format) String(text) Value(DIAGNOSTICS_OUTPUT_FORMAT_TEXT)
1529
6cf276dd
DM
1530EnumValue
1531Enum(diagnostics_output_format) String(sarif-stderr) Value(DIAGNOSTICS_OUTPUT_FORMAT_SARIF_STDERR)
1532
1533EnumValue
1534Enum(diagnostics_output_format) String(sarif-file) Value(DIAGNOSTICS_OUTPUT_FORMAT_SARIF_FILE)
1535
a93eac6a
DM
1536fdiagnostics-parseable-fixits
1537Common Var(flag_diagnostics_parseable_fixits)
8135a004 1538Print fix-it hints in machine-readable form.
a93eac6a 1539
717ebe91
DM
1540fdiagnostics-generate-patch
1541Common Var(flag_diagnostics_generate_patch)
1542Print fix-it hints to stderr in unified diff format.
1543
ccf08a6e 1544fdiagnostics-show-option
c7d0de89 1545Common Var(flag_diagnostics_show_option) Init(1)
a7b2e184 1546Amend appropriate diagnostic messages with the command line option that controls them.
ccf08a6e 1547
6d4a35ca
DM
1548fdiagnostics-show-cwe
1549Common Var(flag_diagnostics_show_cwe) Init(1)
1550Print CWE identifiers for diagnostic messages, where available.
1551
0b14f590
DM
1552fdiagnostics-show-rules
1553Common Var(flag_diagnostics_show_rules) Init(1)
1554Print any rules associated with diagnostic messages.
1555
7d73c01c
DM
1556fdiagnostics-show-highlight-colors
1557Common Var(flag_diagnostics_show_highlight_colors) Init(1)
1558Use color within diagnostic messages to highlight pertinent information.
1559
4bc1899b
DM
1560fdiagnostics-path-format=
1561Common Joined RejectNegative Var(flag_diagnostics_path_format) Enum(diagnostic_path_format) Init(DPF_INLINE_EVENTS)
1562Specify how to print any control-flow path associated with a diagnostic.
1563
129a1319
LH
1564fdiagnostics-plain-output
1565Driver Common RejectNegative
1566Turn off any diagnostics features that complicate the output, such as line numbers, color, and warning URLs.
1567
004bb936
LH
1568ftabstop=
1569Common Joined RejectNegative UInteger
1570-ftabstop=<number> Distance between tab stops for column reporting.
1571
4bc1899b
DM
1572Enum
1573Name(diagnostic_path_format) Type(int)
1574
1575EnumValue
1576Enum(diagnostic_path_format) String(none) Value(DPF_NONE)
1577
1578EnumValue
1579Enum(diagnostic_path_format) String(separate-events) Value(DPF_SEPARATE_EVENTS)
1580
1581EnumValue
1582Enum(diagnostic_path_format) String(inline-events) Value(DPF_INLINE_EVENTS)
1583
1584fdiagnostics-show-path-depths
1585Common Var(flag_diagnostics_show_path_depths) Init(0)
1586Show stack depths of events in paths.
1587
4f01ae37
DM
1588fdiagnostics-text-art-charset=
1589Driver Common Joined RejectNegative Var(flag_diagnostics_text_art_charset) Enum(diagnostic_text_art_charset) Init(DIAGNOSTICS_TEXT_ART_CHARSET_EMOJI)
1590-fdiagnostics-text-art-charset=[none|ascii|unicode|emoji] Determine which characters to use in text arg diagrams.
1591
4f01ae37
DM
1592Enum
1593Name(diagnostic_text_art_charset) Type(int)
1594
1595EnumValue
1596Enum(diagnostic_text_art_charset) String(none) Value(DIAGNOSTICS_TEXT_ART_CHARSET_NONE)
1597
1598EnumValue
1599Enum(diagnostic_text_art_charset) String(ascii) Value(DIAGNOSTICS_TEXT_ART_CHARSET_ASCII)
1600
1601EnumValue
1602Enum(diagnostic_text_art_charset) String(unicode) Value(DIAGNOSTICS_TEXT_ART_CHARSET_UNICODE)
1603
1604EnumValue
1605Enum(diagnostic_text_art_charset) String(emoji) Value(DIAGNOSTICS_TEXT_ART_CHARSET_EMOJI)
1606
0141ab44
DM
1607fdiagnostics-minimum-margin-width=
1608Common Joined UInteger Var(diagnostics_minimum_margin_width) Init(6)
04e5c73d 1609Set minimum width of left margin of source code when showing source.
0141ab44 1610
226c52aa
XDL
1611fdisable-
1612Common Joined RejectNegative Var(common_deferred_options) Defer
b408e010 1613-fdisable-[tree|rtl|ipa]-<pass>=range1+range2 Disable an optimization pass.
226c52aa
XDL
1614
1615fenable-
1616Common Joined RejectNegative Var(common_deferred_options) Defer
b408e010 1617-fenable-[tree|rtl|ipa]-<pass>=range1+range2 Enable an optimization pass.
226c52aa 1618
6de9cd9a 1619fdump-
21bf1558 1620Common Joined RejectNegative Var(common_deferred_options) Defer
a7b2e184 1621-fdump-<type> Dump various compiler internals to a file.
6de9cd9a 1622
d1583032
JM
1623fdump-final-insns
1624Driver RejectNegative
1625
2153915d
AO
1626fdump-final-insns=
1627Common RejectNegative Joined Var(flag_dump_final_insns)
a7b2e184 1628-fdump-final-insns=filename Dump to filename the insns at the end of translation.
2153915d 1629
c6a13190
ILT
1630fdump-go-spec=
1631Common RejectNegative Joined Var(flag_dump_go_spec)
a7b2e184 1632-fdump-go-spec=filename Write all declarations to file as Go code.
c6a13190 1633
24a7799e 1634fdump-noaddr
eece52b5 1635Common Var(flag_dump_noaddr)
a7b2e184 1636Suppress output of addresses in debugging dumps.
24a7799e 1637
dc10fd96
JJ
1638freport-bug
1639Common Driver Var(flag_report_bug)
1640Collect and dump debug information into temporary file if ICE in C/C++
bd2c6270 1641compiler occurred.
dc10fd96 1642
ba4ad400
DM
1643fdump-internal-locations
1644Common Var(flag_dump_locations) Init(0)
a7b2e184 1645Dump detailed information on GCC's internal representation of source code locations.
ba4ad400 1646
deced1e2
XDL
1647fdump-passes
1648Common Var(flag_dump_passes) Init(0)
a7b2e184 1649Dump optimization passes.
deced1e2 1650
6ff3a151 1651fdump-unnumbered
eece52b5 1652Common Var(flag_dump_unnumbered)
a7b2e184 1653Suppress output of instruction numbers, line number notes and addresses in debugging dumps.
6ff3a151 1654
2aa7c49b 1655fdump-unnumbered-links
eece52b5 1656Common Var(flag_dump_unnumbered_links)
a7b2e184 1657Suppress output of previous and next insn numbers in debugging dumps.
2aa7c49b 1658
b5b8b0ac 1659fdwarf2-cfi-asm
eece52b5 1660Common Var(flag_dwarf2_cfi_asm) Init(HAVE_GAS_CFI_DIRECTIVE)
b5b8b0ac
AO
1661Enable CFI tables via GAS assembler directives.
1662
355866de 1663fearly-inlining
eece52b5 1664Common Var(flag_early_inlining) Init(1) Optimization
a7b2e184 1665Perform early inlining.
355866de 1666
de32c0cb 1667feliminate-dwarf2-dups
1823c4f6
RB
1668Common Ignore
1669Does nothing. Preserved for backward compatibility.
de32c0cb 1670
07ffa034 1671fipa-sra
eece52b5 1672Common Var(flag_ipa_sra) Init(0) Optimization
a7b2e184 1673Perform interprocedural reduction of aggregates.
07ffa034 1674
6a08f7b3 1675feliminate-unused-debug-symbols
eece52b5 1676Common Var(flag_debug_only_used_symbols) Init(1)
a7b2e184 1677Perform unused symbol elimination in debug info.
6a08f7b3 1678
de32c0cb 1679feliminate-unused-debug-types
eece52b5 1680Common Var(flag_eliminate_unused_debug_types) Init(1)
a7b2e184 1681Perform unused type elimination in debug info.
de32c0cb 1682
e713adf6 1683femit-class-debug-always
eece52b5 1684Common Var(flag_emit_class_debug_always) Init(0)
e713adf6
CD
1685Do not suppress C++ class debug information.
1686
6ff3a151 1687fexceptions
1313111f 1688Common Var(flag_exceptions) Optimization EnabledBy(fnon-call-exceptions)
a7b2e184 1689Enable exception handling.
6ff3a151 1690
de32c0cb 1691fexpensive-optimizations
eece52b5 1692Common Var(flag_expensive_optimizations) Optimization
a7b2e184 1693Perform a number of minor, expensive optimizations.
de32c0cb 1694
8ce94e44 1695fexcess-precision=
df375b03 1696Common Joined RejectNegative Enum(excess_precision) Var(flag_excess_precision) Init(EXCESS_PRECISION_DEFAULT) Optimization SetByCombined
f19a3270 1697-fexcess-precision=[fast|standard|16] Specify handling of excess floating-point precision.
8ce94e44 1698
e6d4b984
JM
1699Enum
1700Name(excess_precision) Type(enum excess_precision) UnknownError(unknown excess precision style %qs)
1701
1702EnumValue
1703Enum(excess_precision) String(fast) Value(EXCESS_PRECISION_FAST)
1704
1705EnumValue
1706Enum(excess_precision) String(standard) Value(EXCESS_PRECISION_STANDARD)
1707
f19a3270 1708EnumValue
1709Enum(excess_precision) String(16) Value(EXCESS_PRECISION_FLOAT16)
1710
04f0fcf7
JG
1711; Whether we permit the extended set of values for FLT_EVAL_METHOD
1712; introduced in ISO/IEC TS 18661-3, or limit ourselves to those in C99/C11.
1713fpermitted-flt-eval-methods=
1714Common Joined RejectNegative Enum(permitted_flt_eval_methods) Var(flag_permitted_flt_eval_methods) Init(PERMITTED_FLT_EVAL_METHODS_DEFAULT)
1715-fpermitted-flt-eval-methods=[c11|ts-18661] Specify which values of FLT_EVAL_METHOD are permitted.
1716
1717Enum
1718Name(permitted_flt_eval_methods) Type(enum permitted_flt_eval_methods) UnknownError(unknown specification for the set of FLT_EVAL_METHOD values to permit %qs)
1719
1720EnumValue
1721Enum(permitted_flt_eval_methods) String(c11) Value(PERMITTED_FLT_EVAL_METHODS_C11)
1722
1723EnumValue
1724Enum(permitted_flt_eval_methods) String(ts-18661-3) Value(PERMITTED_FLT_EVAL_METHODS_TS_18661)
1725
058de654 1726ffast-math
bfd67b47 1727Common Optimization
058de654 1728
cc8547a7 1729ffat-lto-objects
e9f67e62 1730Common Var(flag_fat_lto_objects)
cc8547a7
AK
1731Output lto objects containing both the intermediate language and binary output.
1732
6ff3a151 1733ffinite-math-only
eece52b5 1734Common Var(flag_finite_math_only) Optimization SetByCombined
a7b2e184 1735Assume no NaNs or infinities are generated.
6ff3a151 1736
c29c92c7 1737ffinite-loops
eece52b5 1738Common Var(flag_finite_loops) Optimization Init(0)
c29c92c7
FX
1739Assume that loops with an exit will terminate and not loop indefinitely.
1740
058de654 1741ffixed-
21bf1558 1742Common Joined RejectNegative Var(common_deferred_options) Defer
a7b2e184 1743-ffixed-<register> Mark <register> as being unavailable to the compiler.
058de654 1744
de32c0cb 1745ffloat-store
eece52b5 1746Common Var(flag_float_store) Optimization
a7b2e184 1747Don't allocate floats and doubles in extended-precision registers.
de32c0cb
NB
1748
1749fforce-addr
2d2bd949 1750Common Ignore
3de5e93a 1751Does nothing. Preserved for backward compatibility.
de32c0cb 1752
2ca2b607 1753fforward-propagate
eece52b5 1754Common Var(flag_forward_propagate) Optimization
a7b2e184 1755Perform a forward propagation pass on RTL.
a52b023a 1756
16949072 1757ffp-contract=
bea30e0d 1758Common Joined RejectNegative Enum(fp_contract_mode) Var(flag_fp_contract_mode) Init(FP_CONTRACT_FAST) Optimization
6a825afe 1759-ffp-contract=[off|on|fast] Perform floating-point expression contraction.
16949072 1760
e6d4b984
JM
1761Enum
1762Name(fp_contract_mode) Type(enum fp_contract_mode) UnknownError(unknown floating point contraction style %qs)
1763
1764EnumValue
1765Enum(fp_contract_mode) String(off) Value(FP_CONTRACT_OFF)
1766
e6d4b984 1767EnumValue
1c1dd396 1768Enum(fp_contract_mode) String(on) Value(FP_CONTRACT_ON)
e6d4b984
JM
1769
1770EnumValue
1771Enum(fp_contract_mode) String(fast) Value(FP_CONTRACT_FAST)
1772
0d2f700f 1773ffp-int-builtin-inexact
eece52b5 1774Common Var(flag_fp_int_builtin_inexact) Init(1) Optimization
0d2f700f
JM
1775Allow built-in functions ceil, floor, round, trunc to raise \"inexact\" exceptions.
1776
31b66477
KC
1777; Nonzero means don't put addresses of constant functions in registers.
1778; Used for compiling the Unix kernel, where strange substitutions are
1779; done on the assembly output.
de32c0cb 1780ffunction-cse
eece52b5 1781Common Var(flag_no_function_cse,0) Optimization
a7b2e184 1782Allow function addresses to be held in registers.
de32c0cb 1783
6ff3a151 1784ffunction-sections
eece52b5 1785Common Var(flag_function_sections)
a7b2e184 1786Place each function into its own section.
6ff3a151 1787
de32c0cb 1788fgcse
eece52b5 1789Common Var(flag_gcse) Optimization
a7b2e184 1790Perform global common subexpression elimination.
de32c0cb
NB
1791
1792fgcse-lm
eece52b5 1793Common Var(flag_gcse_lm) Init(1) Optimization
a7b2e184 1794Perform enhanced load motion during global common subexpression elimination.
de32c0cb
NB
1795
1796fgcse-sm
eece52b5 1797Common Var(flag_gcse_sm) Init(0) Optimization
a7b2e184 1798Perform store motion after global common subexpression elimination.
de32c0cb 1799
1d8de1e9
KE
1800favoid-store-forwarding
1801Common Var(flag_avoid_store_forwarding) Init(0) Optimization
1802Try to avoid store forwarding.
1803
f5f2e3cd 1804fgcse-las
eece52b5 1805Common Var(flag_gcse_las) Init(0) Optimization
f9957958 1806Perform redundant load after store elimination in global common subexpression
a7b2e184 1807elimination.
f9957958
MH
1808
1809fgcse-after-reload
eece52b5 1810Common Var(flag_gcse_after_reload) Optimization
a7b2e184
MS
1811Perform global common subexpression elimination after register allocation has
1812finished.
f5f2e3cd 1813
6592d14b
PMR
1814Enum
1815Name(dwarf_gnat_encodings) Type(int)
1816
1817EnumValue
1818Enum(dwarf_gnat_encodings) String(all) Value(DWARF_GNAT_ENCODINGS_ALL)
1819
1820EnumValue
1821Enum(dwarf_gnat_encodings) String(gdb) Value(DWARF_GNAT_ENCODINGS_GDB)
1822
1823EnumValue
1824Enum(dwarf_gnat_encodings) String(minimal) Value(DWARF_GNAT_ENCODINGS_MINIMAL)
1825
1826fgnat-encodings=
eece52b5 1827Common Enum(dwarf_gnat_encodings) Joined RejectNegative Undocumented Var(gnat_encodings)
04e5c73d 1828-fgnat-encodings=[all|gdb|minimal] Select the balance between GNAT encodings and standard DWARF emitted in the debug information.
6592d14b 1829
d0a58904 1830; This option is not documented yet as its semantics will change.
f8bf9252 1831fgraphite
eece52b5 1832Common Var(flag_graphite) Optimization
a7b2e184 1833Enable in and out of Graphite representation.
f8bf9252 1834
204b560f 1835fgraphite-identity
eece52b5 1836Common Var(flag_graphite_identity) Optimization
a7b2e184 1837Enable Graphite Identity transformation.
204b560f 1838
372a6eb8 1839fhoist-adjacent-loads
eece52b5 1840Common Var(flag_hoist_adjacent_loads) Optimization
372a6eb8 1841Enable hoisting adjacent loads to encourage generating conditional move
a7b2e184 1842instructions.
372a6eb8 1843
1a218fc9 1844fkeep-gc-roots-live
eece52b5 1845Common Undocumented Var(flag_keep_gc_roots_live) Optimization
1a218fc9
ILT
1846; Always keep a pointer to a live memory block
1847
530b4409 1848flarge-source-files
d9cdc500
LH
1849Common Ignore
1850Does nothing. Preserved for backward compatibility.
530b4409 1851
792f97b4
RS
1852flate-combine-instructions
1853Common Var(flag_late_combine_instructions) Optimization Init(0)
1854Run two instruction combination passes late in the pass pipeline;
1855one before register allocation and one after.
1856
3cf0e270 1857floop-parallelize-all
eece52b5 1858Common Var(flag_loop_parallelize_all) Optimization
a7b2e184 1859Mark all loops as parallel.
204b560f 1860
f8bf9252 1861floop-strip-mine
d6bb5ccf 1862Common Alias(floop-nest-optimize)
a7b2e184 1863Enable loop nest transforms. Same as -floop-nest-optimize.
f8bf9252
SP
1864
1865floop-interchange
eece52b5 1866Common Var(flag_loop_interchange) Optimization
fbdec14e 1867Enable loop interchange on trees.
f8bf9252
SP
1868
1869floop-block
d6bb5ccf 1870Common Alias(floop-nest-optimize)
a7b2e184 1871Enable loop nest transforms. Same as -floop-nest-optimize.
f8bf9252 1872
20d3465b 1873floop-unroll-and-jam
eece52b5 1874Common Var(flag_unroll_jam) Optimization
dc236397 1875Perform unroll-and-jam on loops.
a7b2e184 1876
0a35513e 1877fgnu-tm
eece52b5 1878Common Var(flag_tm)
a7b2e184 1879Enable support for GNU transactional memory.
0a35513e 1880
da34ade5 1881fgnu-unique
eece52b5 1882Common Var(flag_gnu_unique) Init(1)
a7b2e184 1883Use STB_GNU_UNIQUE if supported by the assembler.
da34ade5 1884
98af4c9f 1885floop-flatten
093193be
MK
1886Common Ignore
1887Does nothing. Preserved for backward compatibility.
98af4c9f 1888
b60cc080 1889floop-nest-optimize
eece52b5 1890Common Var(flag_loop_nest_optimize) Optimization
e357a5e0 1891Enable the loop nest optimizer.
b60cc080 1892
6a78b724 1893fstrict-volatile-bitfields
eece52b5 1894Common Var(flag_strict_volatile_bitfields) Init(-1) Optimization
a7b2e184 1895Force bitfield accesses to match their type width.
6a78b724 1896
f663d9ad 1897fstore-merging
eece52b5 1898Common Var(flag_store_merging) Optimization
f663d9ad
KT
1899Merge adjacent stores.
1900
6ff3a151 1901fguess-branch-probability
eece52b5 1902Common Var(flag_guess_branch_prob) Optimization
a7b2e184 1903Enable guessing of branch probabilities.
6ff3a151 1904
24592abd
MP
1905fhardened
1906Common Driver Var(flag_hardened)
1907Enable various security-relevant flags.
1908
95bb87b2
AO
1909fharden-compares
1910Common Var(flag_harden_compares) Optimization
1911Harden conditionals not used in branches, checking reversed conditions.
1912
1913fharden-conditional-branches
1914Common Var(flag_harden_conditional_branches) Optimization
1915Harden conditional branches by checking reversed conditions.
1916
551935d1
AO
1917fharden-control-flow-redundancy
1918Common Var(flag_harden_control_flow_redundancy) Optimization
1919Harden control flow by recording and checking execution paths.
1920
1921fhardcfr-skip-leaf
1922Common Var(flag_harden_control_flow_redundancy_skip_leaf) Optimization
1923Disable CFR in leaf functions.
1924
1925fhardcfr-check-returning-calls
1926Common Var(flag_harden_control_flow_redundancy_check_returning_calls) Init(-1) Optimization
1927Check CFR execution paths also before calls followed by returns of their results.
1928
1929fhardcfr-check-exceptions
1930Common Var(flag_harden_control_flow_redundancy_check_exceptions) Init(-1) Optimization
1931Check CFR execution paths also when exiting a function through an exception.
1932
1933fhardcfr-check-noreturn-calls=
1934Common Joined RejectNegative Enum(hardcfr_check_noreturn_calls) Var(flag_harden_control_flow_redundancy_check_noreturn) Init(HCFRNR_UNSPECIFIED) Optimization
1935-fhardcfr-check-noreturn-calls=[always|no-xthrow|nothrow|never] Check CFR execution paths also before calling noreturn functions.
1936
1937Enum
1938Name(hardcfr_check_noreturn_calls) Type(enum hardcfr_noret) UnknownError(unknown hardcfr noreturn checking level %qs)
1939
1940EnumValue
1941Enum(hardcfr_check_noreturn_calls) String(never) Value(HCFRNR_NEVER)
1942
1943EnumValue
1944Enum(hardcfr_check_noreturn_calls) String(nothrow) Value(HCFRNR_NOTHROW)
1945
1946EnumValue
1947Enum(hardcfr_check_noreturn_calls) String(no-xthrow) Value(HCFRNR_NO_XTHROW)
1948
1949EnumValue
1950Enum(hardcfr_check_noreturn_calls) String(always) Value(HCFRNR_ALWAYS)
1951
31b66477
KC
1952; Nonzero means ignore `#ident' directives. 0 means handle them.
1953; Generate position-independent code for executables if possible
1954; On SVR4 targets, it also controls whether or not to emit a
1955; string identifying the compiler.
6ff3a151 1956fident
eece52b5 1957Common Var(flag_no_ident,0)
a7b2e184 1958Process #ident directives.
6ff3a151 1959
de32c0cb 1960fif-conversion
eece52b5 1961Common Var(flag_if_conversion) Optimization
a7b2e184 1962Perform conversion of conditional jumps to branchless equivalents.
de32c0cb
NB
1963
1964fif-conversion2
eece52b5 1965Common Var(flag_if_conversion2) Optimization
a7b2e184 1966Perform conversion of conditional jumps to conditional execution.
de32c0cb 1967
87e2a8fd 1968fstack-reuse=
082908e3 1969Common Joined RejectNegative Enum(stack_reuse_level) Var(flag_stack_reuse) Init(SR_ALL) Optimization
6a825afe 1970-fstack-reuse=[all|named_vars|none] Set stack reuse level for local variables.
87e2a8fd
XDL
1971
1972Enum
1973Name(stack_reuse_level) Type(enum stack_reuse_level) UnknownError(unknown Stack Reuse Level %qs)
1974
1975EnumValue
1976Enum(stack_reuse_level) String(all) Value(SR_ALL)
1977
1978EnumValue
1979Enum(stack_reuse_level) String(named_vars) Value(SR_NAMED_VARS)
1980
1981EnumValue
1982Enum(stack_reuse_level) String(none) Value(SR_NONE)
1983
384a5197 1984ftree-loop-if-convert
eece52b5 1985Common Var(flag_tree_loop_if_convert) Init(-1) Optimization
a7b2e184 1986Convert conditional jumps in innermost loops to branchless equivalents.
384a5197 1987
bd544141 1988ftree-loop-if-convert-stores
bef69eb5
RB
1989Common Ignore
1990Does nothing. Preserved for backward compatibility.
bd544141 1991
31b66477
KC
1992; -finhibit-size-directive inhibits output of .size for ELF.
1993; This is used only for compiling crtstuff.c,
1994; and it may be extended to other effects
1995; needed for crtstuff.c on other systems.
6ff3a151 1996finhibit-size-directive
eece52b5 1997Common Var(flag_inhibit_size_directive)
a7b2e184 1998Do not generate .size directives.
6ff3a151 1999
3e293154 2000findirect-inlining
eece52b5 2001Common Var(flag_indirect_inlining) Optimization
a7b2e184 2002Perform indirect inlining.
3e293154 2003
99ea07f8
RG
2004; General flag to enable inlining. Specifying -fno-inline will disable
2005; all inlining apart from always-inline functions.
de32c0cb 2006finline
eece52b5 2007Common Var(flag_no_inline,0) Init(0) Optimization
a7b2e184 2008Enable inlining of function declared \"inline\", disabling disables all inlining.
de32c0cb 2009
4d4b8cb9 2010finline-small-functions
eece52b5 2011Common Var(flag_inline_small_functions) Optimization
a7b2e184 2012Integrate functions into their callers when code size is known not to grow.
4d4b8cb9 2013
de32c0cb 2014finline-functions
eece52b5 2015Common Var(flag_inline_functions) Optimization
a7b2e184 2016Integrate functions not declared \"inline\" into their callers when profitable.
de32c0cb 2017
355866de 2018finline-functions-called-once
eece52b5 2019Common Var(flag_inline_functions_called_once) Optimization
a7b2e184 2020Integrate functions only required by their single caller.
d63db217 2021
d302c9d6 2022finline-limit-
5de8299c 2023Common RejectNegative Joined Alias(finline-limit=)
d302c9d6
NB
2024
2025finline-limit=
2026Common RejectNegative Joined UInteger
a7b2e184 2027-finline-limit=<number> Limit the size of inlined functions to <number>.
d302c9d6 2028
86951993 2029finline-atomics
eece52b5 2030Common Var(flag_inline_atomics) Init(1) Optimization
86951993
AM
2031Inline __atomic operations when a lock free instruction sequence is available.
2032
1ff6d9f7
AO
2033finline-stringops
2034Common RejectNegative Enum(ilsop_fn) Var(flag_inline_stringops, ILSOP_ALL) Enum(ilsop_fn) Init(ILSOP_NONE) Optimization Undocumented
2035
2036fno-inline-stringops
2037Common RejectNegative Enum(ilsop_fn) Var(flag_inline_stringops, ILSOP_NONE) Enum(ilsop_fn) Optimization Undocumented
2038
2039finline-stringops=
2040Common Joined Var(flag_inline_stringops) EnumSet Enum(ilsop_fn) Optimization
2041-finline-stringops[=memcmp|memcpy|memmove|memset]
2042Expand supported mem/str operations inline, even if against optimization.
2043
2044Enum
2045Name(ilsop_fn) Type(enum ilsop_fn) UnknownError(unavailable stringop for inlining %qs)
2046
2047; This is not part of any set.
2048; EnumValue
2049; Enum(ilsop_fn) String(none) Value(ILSOP_NONE)
2050
2051EnumValue
2052Enum(ilsop_fn) String(memcmp) Value(ILSOP_MEMCMP) Set(1)
2053
2054EnumValue
2055Enum(ilsop_fn) String(memcpy) Value(ILSOP_MEMCPY) Set(2)
2056
2057EnumValue
2058Enum(ilsop_fn) String(memmove) Value(ILSOP_MEMMOVE) Set(3)
2059
2060EnumValue
2061Enum(ilsop_fn) String(memset) Value(ILSOP_MEMSET) Set(4)
2062
2063; This is not part of any set either.
2064; EnumValue
2065; Enum(ilsop_fn) String(all) Value(ILSOP_ALL)
2066
5c5f0b65
IT
2067fcf-protection
2068Common RejectNegative Alias(fcf-protection=,full)
3026daa8 2069Equivalent to -fcf-protection=full.
5c5f0b65
IT
2070
2071fcf-protection=
1c6231c0 2072Common Joined RejectNegative Enum(cf_protection_level) EnumSet Var(flag_cf_protection) Init(CF_NONE)
c4c22e83 2073-fcf-protection=[full|branch|return|none|check] Instrument functions with checks to verify jump/call/return control-flow transfer
5c5f0b65
IT
2074instructions have valid targets.
2075
2076Enum
cefc0906 2077Name(cf_protection_level) Type(enum cf_protection_level) UnknownError(unknown Control-Flow Protection Level %qs)
5c5f0b65
IT
2078
2079EnumValue
1c6231c0 2080Enum(cf_protection_level) String(full) Value(CF_FULL) Set(1)
5c5f0b65
IT
2081
2082EnumValue
1c6231c0 2083Enum(cf_protection_level) String(branch) Value(CF_BRANCH) Set(2)
5c5f0b65
IT
2084
2085EnumValue
1c6231c0 2086Enum(cf_protection_level) String(return) Value(CF_RETURN) Set(3)
5c5f0b65 2087
c4c22e83 2088EnumValue
1c6231c0 2089Enum(cf_protection_level) String(check) Value(CF_CHECK) Set(4)
c4c22e83 2090
5c5f0b65 2091EnumValue
1c6231c0 2092Enum(cf_protection_level) String(none) Value(CF_NONE) Set(1)
5c5f0b65 2093
6ff3a151 2094finstrument-functions
3b598848 2095Common Var(flag_instrument_function_entry_exit,1)
a7b2e184 2096Instrument function entry and exit with profiling calls.
6ff3a151 2097
3b598848
EB
2098finstrument-functions-once
2099Common Var(flag_instrument_function_entry_exit,2)
2100Instrument function entry and exit with profiling calls invoked once.
2101
8d5a7d1f
ILT
2102finstrument-functions-exclude-function-list=
2103Common RejectNegative Joined
b408e010 2104-finstrument-functions-exclude-function-list=name,... Do not instrument listed functions.
8d5a7d1f
ILT
2105
2106finstrument-functions-exclude-file-list=
2107Common RejectNegative Joined
b408e010 2108-finstrument-functions-exclude-file-list=filename,... Do not instrument functions listed in files.
8d5a7d1f 2109
d6e14e8f 2110fipa-cp
eece52b5 2111Common Var(flag_ipa_cp) Optimization
a7b2e184 2112Perform interprocedural constant propagation.
d6e14e8f 2113
5e45130d 2114fipa-cp-clone
eece52b5 2115Common Var(flag_ipa_cp_clone) Optimization
a7b2e184 2116Perform cloning to make Interprocedural constant propagation stronger.
5e45130d 2117
3c99176a 2118fipa-cp-alignment
78117646
MJ
2119Common Ignore
2120Does nothing. Preserved for backward compatibility.
3c99176a 2121
209ca542 2122fipa-bit-cp
eece52b5 2123Common Var(flag_ipa_bit_cp) Optimization
209ca542
PK
2124Perform interprocedural bitwise constant propagation.
2125
d119f34c 2126fipa-modref
eece52b5 2127Common Var(flag_ipa_modref) Optimization
466b907f 2128Perform interprocedural modref analysis.
d119f34c 2129
6d9fdf4b
KT
2130fipa-reorder-for-locality
2131Common Var(flag_ipa_reorder_for_locality) Init(0) Optimization
2132Perform reordering and cloning of functions to maximize locality.
2133
e65bb9be 2134fipa-profile
eece52b5 2135Common Var(flag_ipa_profile) Init(0) Optimization
a7b2e184 2136Perform interprocedural profile propagation.
ea900239 2137
4cf4d6a3 2138fipa-pta
eece52b5 2139Common Var(flag_ipa_pta) Init(0) Optimization
a7b2e184 2140Perform interprocedural points-to analysis.
4cf4d6a3 2141
e65bb9be 2142fipa-pure-const
eece52b5 2143Common Var(flag_ipa_pure_const) Init(0) Optimization
a7b2e184 2144Discover pure and const functions.
e65bb9be 2145
b84d4347 2146fipa-icf
eece52b5 2147Common Var(flag_ipa_icf) Optimization
a7b2e184 2148Perform Identical Code Folding for functions and read-only variables.
b84d4347
ML
2149
2150fipa-icf-functions
eece52b5 2151Common Var(flag_ipa_icf_functions) Optimization
a7b2e184 2152Perform Identical Code Folding for functions.
b84d4347
ML
2153
2154fipa-icf-variables
eece52b5 2155Common Var(flag_ipa_icf_variables) Optimization
a7b2e184 2156Perform Identical Code Folding for variables.
b84d4347 2157
ea900239 2158fipa-reference
eece52b5 2159Common Var(flag_ipa_reference) Init(0) Optimization
2e14744f
ML
2160Discover read-only and non addressable static variables.
2161
2162fipa-reference-addressable
eece52b5 2163Common Var(flag_ipa_reference_addressable) Init(0) Optimization
2e14744f 2164Discover read-only, write-only and non-addressable static variables.
ea900239 2165
47b840eb 2166fipa-stack-alignment
eece52b5 2167Common Var(flag_ipa_stack_alignment) Init(1) Optimization
47b840eb
ML
2168Reduce stack alignment on call sites if possible.
2169
43d861a5 2170fipa-matrix-reorg
04f92ff4
RG
2171Common Ignore
2172Does nothing. Preserved for backward compatibility.
43d861a5 2173
e1dc98b2 2174fipa-struct-reorg
b8beb4d1
RG
2175Common Ignore
2176Does nothing. Preserved for backward compatibility.
e1dc98b2 2177
8bc5448f 2178fipa-vrp
eece52b5 2179Common Var(flag_ipa_vrp) Optimization
8bc5448f
KV
2180Perform IPA Value Range Propagation.
2181
058e97ec 2182fira-algorithm=
b16650ac 2183Common Joined RejectNegative Enum(ira_algorithm) Var(flag_ira_algorithm) Init(IRA_ALGORITHM_CB) Optimization
6a825afe 2184-fira-algorithm=[CB|priority] Set the used IRA algorithm.
7db7ed3c 2185
16c84809
JH
2186fipa-strict-aliasing
2187Common Var(flag_ipa_strict_aliasing) Init(1) Optimization
2188Assume strict aliasing rules apply across (uninlined) function boundaries.
2189
e6d4b984
JM
2190Enum
2191Name(ira_algorithm) Type(enum ira_algorithm) UnknownError(unknown IRA algorithm %qs)
2192
2193EnumValue
2194Enum(ira_algorithm) String(CB) Value(IRA_ALGORITHM_CB)
2195
2196EnumValue
2197Enum(ira_algorithm) String(priority) Value(IRA_ALGORITHM_PRIORITY)
2198
7db7ed3c 2199fira-region=
6b7a246d 2200Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_ONE) Optimization
6a825afe 2201-fira-region=[one|all|mixed] Set regions for IRA.
058e97ec 2202
e6d4b984
JM
2203Enum
2204Name(ira_region) Type(enum ira_region) UnknownError(unknown IRA region %qs)
2205
2206EnumValue
2207Enum(ira_region) String(one) Value(IRA_REGION_ONE)
2208
2209EnumValue
2210Enum(ira_region) String(all) Value(IRA_REGION_ALL)
2211
2212EnumValue
2213Enum(ira_region) String(mixed) Value(IRA_REGION_MIXED)
2214
b11f0116 2215fira-hoist-pressure
eece52b5 2216Common Var(flag_ira_hoist_pressure) Init(1) Optimization
b11f0116
BC
2217Use IRA based register pressure calculation
2218in RTL hoist optimizations.
2219
1833192f 2220fira-loop-pressure
eece52b5 2221Common Var(flag_ira_loop_pressure) Optimization
1833192f
VM
2222Use IRA based register pressure calculation
2223in RTL loop optimizations.
2224
058e97ec 2225fira-share-save-slots
eece52b5 2226Common Var(flag_ira_share_save_slots) Init(1) Optimization
058e97ec
VM
2227Share slots for saving different hard registers.
2228
2229fira-share-spill-slots
eece52b5 2230Common Var(flag_ira_share_spill_slots) Init(1) Optimization
058e97ec
VM
2231Share stack slots for spilled pseudo-registers.
2232
2233fira-verbose=
5498f011 2234Common RejectNegative Joined UInteger Var(flag_ira_verbose) Init(5)
f94e1d66 2235-fira-verbose=<number> Control IRA's level of diagnostic messages.
058e97ec 2236
8b11a64c 2237fivopts
eece52b5 2238Common Var(flag_ivopts) Init(1) Optimization
a7b2e184 2239Optimize induction variables on trees.
8b11a64c 2240
82c0180d 2241fjump-tables
06bc3a73 2242Common Var(flag_jump_tables) Init(0) Optimization
a7b2e184 2243Use jump tables for sufficiently large switch statements.
82c0180d 2244
9b11203e 2245fbit-tests
06bc3a73 2246Common Var(flag_bit_tests) Init(0) Optimization
9b11203e
ML
2247Use bit tests for sufficiently large switch statements.
2248
de32c0cb 2249fkeep-inline-functions
eece52b5 2250Common Var(flag_keep_inline_functions)
a7b2e184 2251Generate code for functions even if they are fully inlined.
de32c0cb 2252
787da5fd 2253fkeep-static-functions
eece52b5 2254Common Var(flag_keep_static_functions)
a7b2e184 2255Generate code for static functions even if they are never called.
787da5fd 2256
de32c0cb 2257fkeep-static-consts
eece52b5 2258Common Var(flag_keep_static_consts) Init(1)
a7b2e184 2259Emit static const variables even if they are not used.
de32c0cb 2260
6ff3a151 2261fleading-underscore
eece52b5 2262Common Var(flag_leading_underscore) Init(-1)
a7b2e184 2263Give external symbols a leading underscore.
6ff3a151 2264
efa1cdf0 2265floop-optimize
2d2bd949 2266Common Ignore
c0220ea4 2267Does nothing. Preserved for backward compatibility.
efa1cdf0 2268
d9cf932c 2269flra-remat
eece52b5 2270Common Var(flag_lra_remat) Optimization
a7b2e184 2271Do CFG-sensitive rematerialization in LRA.
d9cf932c 2272
d7f09764 2273flto
014d92e1 2274Common
d7f09764
DN
2275Enable link-time optimization.
2276
014d92e1
JH
2277flto=
2278Common RejectNegative Joined Var(flag_lto)
2279Link-time optimization with number of parallel jobs or jobserver.
2280
8b1a5728
MJ
2281flto-incremental=
2282Common Joined Var(flag_lto_incremental)
2283Enable incremental LTO, with its cache in given directory.
2284
2285flto-incremental-cache-size=
2286Common Joined RejectNegative UInteger Var(flag_lto_incremental_cache_size) Init(2048)
2287Number of cache entries in incremental LTO after which to prune old entries.
2288
783dab6b
RB
2289Enum
2290Name(lto_partition_model) Type(enum lto_partition_model) UnknownError(unknown LTO partitioning model %qs)
852e4bd2 2291
783dab6b
RB
2292EnumValue
2293Enum(lto_partition_model) String(none) Value(LTO_PARTITION_NONE)
852e4bd2 2294
783dab6b
RB
2295EnumValue
2296Enum(lto_partition_model) String(one) Value(LTO_PARTITION_ONE)
2297
2298EnumValue
2299Enum(lto_partition_model) String(balanced) Value(LTO_PARTITION_BALANCED)
2300
2301EnumValue
2302Enum(lto_partition_model) String(1to1) Value(LTO_PARTITION_1TO1)
2303
2304EnumValue
2305Enum(lto_partition_model) String(max) Value(LTO_PARTITION_MAX)
c3c445e1 2306
5b6d5a88
MJ
2307EnumValue
2308Enum(lto_partition_model) String(cache) Value(LTO_PARTITION_CACHE)
2309
783dab6b 2310flto-partition=
040f94d1 2311Common Joined RejectNegative Enum(lto_partition_model) Var(flag_lto_partition) Init(LTO_PARTITION_BALANCED)
a7b2e184 2312Specify the algorithm to partition symbols and vars at linktime.
014d92e1 2313
d7f09764
DN
2314; The initial value of -1 comes from Z_DEFAULT_COMPRESSION in zlib.h.
2315flto-compression-level=
87741e51 2316Common Joined RejectNegative UInteger Var(flag_lto_compression_level) Init(-1) IntegerRange(0, 19)
65162572 2317Use zlib/zstd compression level <number> for IL.
d7f09764 2318
1ee85ee1 2319flto-odr-type-merging
686a56a8
JH
2320Common Ignore
2321Does nothing. Preserved for backward compatibility.
1ee85ee1 2322
d7f09764 2323flto-report
eece52b5 2324Common Var(flag_lto_report) Init(0)
a7b2e184 2325Report various link-time optimization statistics.
d7f09764 2326
057f8f20 2327flto-report-wpa
eece52b5 2328Common Var(flag_lto_report_wpa) Init(0)
a7b2e184 2329Report various link-time optimization statistics for WPA only.
057f8f20 2330
6ff3a151 2331fmath-errno
eece52b5 2332Common Var(flag_errno_math) Init(1) Optimization SetByCombined
a7b2e184 2333Set errno after built-in math functions.
6ff3a151 2334
3a789837
NF
2335fmax-errors=
2336Common Joined RejectNegative UInteger Var(flag_max_errors)
a7b2e184 2337-fmax-errors=<number> Maximum number of errors to report.
3a789837 2338
7828dc07
JH
2339fmalloc-dce
2340Common Var(flag_malloc_dce,2) Init(2) Optimization
2341Allow removal of malloc and free pairs when allocated block is unused.
2342
2343fmalloc-dce=
2344Common Joined RejectNegative UInteger Var(flag_malloc_dse) Optimization IntegerRange(0, 2)
2345
6ff3a151 2346fmem-report
eece52b5 2347Common Var(mem_report)
a7b2e184 2348Report on permanent memory allocation.
6ff3a151 2349
b3e44629 2350fmem-report-wpa
eece52b5 2351Common Var(mem_report_wpa)
a7b2e184 2352Report on permanent memory allocation in WPA only.
b3e44629 2353
31b66477
KC
2354; This will attempt to merge constant section constants, if 1 only
2355; string constants and constants from constant pool, if 2 also constant
2356; variables.
6ff3a151 2357fmerge-all-constants
eece52b5 2358Common Var(flag_merge_constants,2) Init(1)
a7b2e184 2359Attempt to merge identical constants and constant variables.
6ff3a151
NB
2360
2361fmerge-constants
eece52b5 2362Common Var(flag_merge_constants,1)
a7b2e184 2363Attempt to merge identical constants across compilation units.
6ff3a151 2364
28a08168 2365fmerge-debug-strings
eece52b5 2366Common Var(flag_merge_debug_strings) Init(1)
a7b2e184 2367Attempt to merge identical debug strings across compilation units.
28a08168 2368
de32c0cb
NB
2369fmessage-length=
2370Common RejectNegative Joined UInteger
a7b2e184 2371-fmessage-length=<number> Limit diagnostics to <number> characters per line. 0 suppresses line-wrapping.
de32c0cb 2372
0f5a9a00
JH
2373fmin-function-alignment=
2374Common Joined RejectNegative UInteger Var(flag_min_function_alignment) Optimization
2375Align the start of every function.
2376
e5626198 2377fmodulo-sched
eece52b5 2378Common Var(flag_modulo_sched) Optimization
a7b2e184 2379Perform SMS based modulo scheduling before the first scheduling pass.
e5626198 2380
517d76fa 2381fmodulo-sched-allow-regmoves
eece52b5 2382Common Var(flag_modulo_sched_allow_regmoves) Optimization
a7b2e184 2383Perform SMS based modulo scheduling with register moves allowed.
517d76fa 2384
5e962776 2385fmove-loop-invariants
eece52b5 2386Common Var(flag_move_loop_invariants) Optimization
a7b2e184 2387Move loop invariant computations out of loops.
5e962776 2388
9f489a57
RB
2389fmove-loop-stores
2390Common Var(flag_move_loop_stores) Optimization
2391Move stores out of loops.
2392
6b1a2474 2393fmultiflags
c4e5789c 2394Common Driver RejectNegative
6b1a2474
AO
2395Building block for specs-based multilib-aware TFLAGS.
2396
6fb5fa3c 2397fdce
6ae4be32 2398Common Var(flag_dce) Init(1) Optimization
a7b2e184 2399Use the RTL dead code elimination pass.
6fb5fa3c
DB
2400
2401fdse
c0fe6bce 2402Common Var(flag_dse) Init(0) Optimization
a7b2e184 2403Use the RTL dead store elimination pass.
6fb5fa3c 2404
d72372e4 2405freschedule-modulo-scheduled-loops
eece52b5 2406Common Var(flag_resched_modulo_sched) Optimization
a7b2e184 2407Enable/Disable the traditional scheduling in loops that already passed modulo scheduling.
d72372e4 2408
6ff3a151 2409fnon-call-exceptions
eece52b5 2410Common Var(flag_non_call_exceptions) Optimization
a7b2e184 2411Support synchronous non-call exceptions.
6ff3a151 2412
c713ddc0 2413foffload=
33c4e466 2414Driver Joined MissingArgError(targets missing after %qs)
33c4e466
TB
2415
2416foffload-options=
2417Common Driver Joined MissingArgError(options or targets=options missing after %qs)
a3ce7d75 2418-foffload-options=<targets>=<options> Specify options for the offloading targets.
c713ddc0
BS
2419
2420foffload-abi=
2a700fb8 2421Common Joined RejectNegative Enum(offload_abi)
b408e010 2422-foffload-abi=[lp64|ilp32] Set the ABI to use in an offload compiler.
c713ddc0
BS
2423
2424Enum
2425Name(offload_abi) Type(enum offload_abi) UnknownError(unknown offload ABI %qs)
2426
2427EnumValue
2428Enum(offload_abi) String(ilp32) Value(OFFLOAD_ABI_ILP32)
2429
2430EnumValue
2431Enum(offload_abi) String(lp64) Value(OFFLOAD_ABI_LP64)
2432
e783a4a6
PK
2433foffload-abi-host-opts=
2434Common Joined MissingArgError(option missing after %qs)
2435-foffload-abi-host-opts=<options> Specify host ABI options.
2436
de32c0cb 2437fomit-frame-pointer
eece52b5 2438Common Var(flag_omit_frame_pointer) Optimization
a7b2e184 2439When possible do not generate stack frames.
de32c0cb 2440
309e2d95
SL
2441fopenmp-target-simd-clone
2442Common Alias(fopenmp-target-simd-clone=,any,none)
2443
2444fopenmp-target-simd-clone=
2445Common Joined RejectNegative Enum(target_simd_clone_device) Var(flag_openmp_target_simd_clone) Init(OMP_TARGET_SIMD_CLONE_NONE) Optimization
2446Generate SIMD clones for functions with the OpenMP declare target directive.
2447
2448Enum
2449Name(target_simd_clone_device) Type(int)
2450
2451EnumValue
2452Enum(target_simd_clone_device) String(none) Value(OMP_TARGET_SIMD_CLONE_NONE)
2453
2454EnumValue
2455Enum(target_simd_clone_device) String(host) Value(OMP_TARGET_SIMD_CLONE_HOST)
2456
2457EnumValue
2458Enum(target_simd_clone_device) String(nohost) Value(OMP_TARGET_SIMD_CLONE_NOHOST)
2459
2460EnumValue
2461Enum(target_simd_clone_device) String(any) Value(OMP_TARGET_SIMD_CLONE_ANY)
2462
78c60e3d 2463fopt-info
eece52b5 2464Common Var(flag_opt_info) Optimization
a7b2e184 2465Enable all optimization info dumps on stderr.
78c60e3d
SS
2466
2467fopt-info-
2468Common Joined RejectNegative Var(common_deferred_options) Defer
a7b2e184 2469-fopt-info[-<type>=filename] Dump compiler optimization details.
78c60e3d 2470
4a4412b9 2471fsave-optimization-record
eece52b5 2472Common Var(flag_save_optimization_record) Optimization
4a4412b9
DM
2473Write a SRCFILE.opt-record.json file detailing what optimizations were performed.
2474
062ad209
MA
2475foptimize-crc
2476Common Var(flag_optimize_crc) Optimization
2477Detect loops calculating CRC and replace with faster implementation.
2478If the target supports CRC instruction and the CRC loop uses the same
2479polynomial as the one used in the CRC instruction, directly replace with the
2480corresponding CRC instruction.
2481Otherwise, if the target supports carry-less-multiplication instruction,
2482generate CRC using it.
2483If neither case applies, generate table-based CRC.
2484
6ff3a151 2485foptimize-register-move
3b6d1699
VM
2486Common Ignore
2487Does nothing. Preserved for backward compatibility.
6ff3a151 2488
de32c0cb 2489foptimize-sibling-calls
eece52b5 2490Common Var(flag_optimize_sibling_calls) Optimization
a7b2e184 2491Optimize sibling and tail recursive calls.
de32c0cb 2492
8ed2d5d2
JK
2493fpath-coverage
2494Common Var(path_coverage_flag)
2495Insert path profiling code.
2496
3e485f62 2497fpartial-inlining
eece52b5 2498Common Var(flag_partial_inlining) Optimization
a7b2e184 2499Perform partial inlining.
3e485f62 2500
a5573239 2501fpre-ipa-mem-report
eece52b5 2502Common Var(pre_ipa_mem_report)
a7b2e184 2503Report on memory allocation before interprocedural optimization.
a5573239
JH
2504
2505fpost-ipa-mem-report
eece52b5 2506Common Var(post_ipa_mem_report)
a7b2e184 2507Report on memory allocation before interprocedural optimization.
a5573239 2508
6ff3a151 2509fpack-struct
eece52b5 2510Common Var(flag_pack_struct) Optimization
a7b2e184 2511Pack structure members together without holes.
6ff3a151 2512
467cecf3 2513fpack-struct=
c662432e 2514Common RejectNegative Joined UInteger Optimization
a7b2e184 2515-fpack-struct=<number> Set initial maximum structure member alignment.
467cecf3 2516
de32c0cb 2517fpcc-struct-return
b7483de9 2518Common Var(flag_pcc_struct_return,1) Init(DEFAULT_PCC_STRUCT_RETURN) Optimization
a7b2e184 2519Return small aggregates in memory, not registers.
de32c0cb
NB
2520
2521fpeel-loops
eece52b5 2522Common Var(flag_peel_loops) Optimization
a7b2e184 2523Perform loop peeling.
de32c0cb
NB
2524
2525fpeephole
eece52b5 2526Common Var(flag_no_peephole,0) Optimization
a7b2e184 2527Enable machine specific peephole optimizations.
de32c0cb 2528
6ff3a151 2529fpeephole2
eece52b5 2530Common Var(flag_peephole2) Optimization
a7b2e184 2531Enable an RTL peephole pass before sched2.
6ff3a151 2532
31b66477 2533fPIC
eece52b5 2534Common Var(flag_pic,2) Negative(fPIE) Init(-1)
a7b2e184 2535Generate position-independent code if possible (large mode).
31b66477
KC
2536
2537fPIE
eece52b5 2538Common Var(flag_pie,2) Negative(fpic) Init(-1)
a7b2e184 2539Generate position-independent code for executables if possible (large mode).
31b66477 2540
6ff3a151 2541fpic
eece52b5 2542Common Var(flag_pic,1) Negative(fpie) Init(-1)
a7b2e184 2543Generate position-independent code if possible (small mode).
6ff3a151
NB
2544
2545fpie
eece52b5 2546Common Var(flag_pie,1) Negative(fPIC) Init(-1)
a7b2e184 2547Generate position-independent code for executables if possible (small mode).
6ff3a151 2548
b91fd3c7 2549fplt
eece52b5 2550Common Var(flag_plt) Init(1) Optimization
a7b2e184 2551Use PLT for PIC calls (-fno-plt: load the address from GOT at call site).
b91fd3c7 2552
68a607d8 2553fplugin=
21bf1558 2554Common Joined RejectNegative Var(common_deferred_options) Defer
a7b2e184 2555Specify a plugin to load.
68a607d8
DN
2556
2557fplugin-arg-
21bf1558 2558Common Joined RejectNegative Var(common_deferred_options) Defer
a7b2e184 2559-fplugin-arg-<name>-<key>[=<value>] Specify argument <key>=<value> for plugin <name>.
68a607d8 2560
bbc8a8dc 2561fpredictive-commoning
eece52b5 2562Common Var(flag_predictive_commoning) Optimization
bbc8a8dc
ZD
2563Run predictive commoning optimization.
2564
de32c0cb 2565fprefetch-loop-arrays
eece52b5 2566Common Var(flag_prefetch_loop_arrays) Init(-1) Optimization
a7b2e184 2567Generate prefetch instructions, if available, for arrays in loops.
de32c0cb 2568
6ff3a151 2569fprofile
eece52b5 2570Common Var(profile_flag)
a7b2e184 2571Enable basic program profiling code.
6ff3a151 2572
676519f7 2573fprofile-abs-path
eece52b5 2574Common Var(profile_abs_path_flag)
676519f7
BE
2575Generate absolute source path names for gcov.
2576
6ff3a151 2577fprofile-arcs
eece52b5 2578Common Var(profile_arc_flag)
a7b2e184 2579Insert arc-based program profiling code.
6ff3a151 2580
08a52331
JK
2581fcondition-coverage
2582Common Var(condition_coverage_flag)
2583Insert condition coverage profiling code.
2584
2f908293 2585fprofile-dir=
0576d21f 2586Common Joined RejectNegative Var(profile_data_prefix)
2f908293
SP
2587Set the top-level directory for storing the profile data.
2588The default is 'pwd'.
2589
8e37c995
ML
2590fprofile-note=
2591Common Joined RejectNegative Var(profile_note_location)
2592Select the name for storing the profile note file.
2593
52c76998 2594fprofile-correction
eece52b5 2595Common Var(flag_profile_correction)
a7b2e184 2596Enable correction of flow inconsistent profile data input.
52c76998 2597
22063dbc
ML
2598fprofile-update=
2599Common Joined RejectNegative Enum(profile_update) Var(flag_profile_update) Init(PROFILE_UPDATE_SINGLE)
4d209853 2600-fprofile-update=[single|atomic|prefer-atomic] Set the profile update method.
22063dbc 2601
e18240ff
ML
2602fprofile-filter-files=
2603Common Joined RejectNegative Var(flag_profile_filter_files)
8ca43e4e 2604Instrument only functions from files whose name matches any of the regular expressions (separated by semi-colons).
e18240ff
ML
2605
2606fprofile-exclude-files=
2607Common Joined RejectNegative Var(flag_profile_exclude_files)
8ca43e4e 2608Instrument only functions from files whose name does not match any of the regular expressions (separated by semi-colons).
e18240ff 2609
ea0b1252
ML
2610Enum
2611Name(profile_reproducibility) Type(enum profile_reproducibility) UnknownError(unknown profile reproducibility method %qs)
2612
2613EnumValue
2614Enum(profile_reproducibility) String(serial) Value(PROFILE_REPRODUCIBILITY_SERIAL)
2615
2616EnumValue
2617Enum(profile_reproducibility) String(parallel-runs) Value(PROFILE_REPRODUCIBILITY_PARALLEL_RUNS)
2618
2619EnumValue
2620Enum(profile_reproducibility) String(multithreaded) Value(PROFILE_REPRODUCIBILITY_MULTITHREADED)
2621
5089df53 2622fprofile-reproducible=
ea0b1252 2623Common Joined RejectNegative Var(flag_profile_reproducible) Enum(profile_reproducibility) Init(PROFILE_REPRODUCIBILITY_SERIAL)
b408e010 2624-fprofile-reproducible=[serial|parallel-runs|multithreaded] Control level of reproducibility of profile gathered by -fprofile-generate.
ea0b1252 2625
22063dbc
ML
2626Enum
2627Name(profile_update) Type(enum profile_update) UnknownError(unknown profile update method %qs)
2628
2629EnumValue
2630Enum(profile_update) String(single) Value(PROFILE_UPDATE_SINGLE)
2631
2632EnumValue
2633Enum(profile_update) String(atomic) Value(PROFILE_UPDATE_ATOMIC)
2634
4d209853
ML
2635EnumValue
2636Enum(profile_update) String(prefer-atomic) Value(PROFILE_UPDATE_PREFER_ATOMIC)
2637
44b32683
JH
2638fprofile-prefix-path=
2639Common Joined RejectNegative Var(profile_prefix_path)
850322df 2640Remove prefix from absolute path before mangling name for -fprofile-generate= and -fprofile-use=.
44b32683 2641
cde87638
ML
2642fprofile-prefix-map=
2643Common Joined RejectNegative Var(common_deferred_options) Defer
2644-fprofile-prefix-map=<old>=<new> Map one directory name to another in GCOV coverage result.
2645
a8a5f53a
JH
2646fprofile-generate
2647Common
a7b2e184 2648Enable common options for generating profile info for profile feedback directed optimizations.
a8a5f53a 2649
2f908293
SP
2650fprofile-generate=
2651Common Joined RejectNegative
a7b2e184 2652Enable common options for generating profile info for profile feedback directed optimizations, and set -fprofile-dir=.
2f908293 2653
27f7fb79
SH
2654fprofile-info-section
2655Common RejectNegative
2656Register the profile information in the .gcov_info section instead of using a constructor/destructor.
2657
2658fprofile-info-section=
2659Common Joined RejectNegative Var(profile_info_section)
2660Register the profile information in the specified section instead of using a constructor/destructor.
2661
34fbe3f0 2662fprofile-partial-training
eece52b5 2663Common Var(flag_profile_partial_training) Optimization
c86b722b 2664Do not assume that functions never executed during the train run are cold.
34fbe3f0 2665
a8a5f53a 2666fprofile-use
2f908293 2667Common Var(flag_profile_use)
a7b2e184 2668Enable common options for performing profile feedback directed optimizations.
a8a5f53a 2669
2f908293
SP
2670fprofile-use=
2671Common Joined RejectNegative
a7b2e184 2672Enable common options for performing profile feedback directed optimizations, and set -fprofile-dir=.
2f908293 2673
fca9dc00 2674fprofile-values
eece52b5 2675Common Var(flag_profile_values)
a7b2e184 2676Insert code to profile values of expressions.
fca9dc00 2677
37e5402b 2678fprofile-report
eece52b5 2679Common Var(profile_report)
a7b2e184 2680Report on consistency of profile.
37e5402b 2681
9cec31f4 2682fprofile-reorder-functions
eece52b5 2683Common Var(flag_profile_reorder_functions) Optimization
a7b2e184 2684Enable function reordering that improves code placement.
9cec31f4 2685
417ca011 2686fpatchable-function-entry=
0d701e3e 2687Common Var(flag_patchable_function_entry) Joined Optimization
417ca011
TD
2688Insert NOP instructions at each function entry.
2689
de32c0cb 2690frandom-seed
299404a1 2691Common Var(common_deferred_options) Defer
de32c0cb
NB
2692
2693frandom-seed=
299404a1 2694Common Joined RejectNegative Var(common_deferred_options) Defer
4bfede85 2695-frandom-seed=<string> Make compile reproducible using <string>.
de32c0cb 2696
e0d9d0dd
NC
2697; This switch causes the command line that was used to create an
2698; object file to be recorded into the object file. The exact format
2699; of this recording is target and binary file format dependent.
2700; It is related to the -fverbose-asm switch, but that switch only
2701; records information in the assembler output file as comments, so
2702; they never reach the object file.
2703frecord-gcc-switches
eece52b5 2704Common Var(flag_record_gcc_switches)
e0d9d0dd
NC
2705Record gcc command line switches in the object file.
2706
de32c0cb 2707freg-struct-return
b7483de9 2708Common NegativeAlias Alias(fpcc_struct_return) Optimization
a7b2e184 2709Return small aggregates in registers.
de32c0cb 2710
6ff3a151 2711fregmove
3b6d1699
VM
2712Common Ignore
2713Does nothing. Preserved for backward compatibility.
6ff3a151 2714
f522930c 2715flifetime-dse
eece52b5 2716Common Var(flag_lifetime_dse,2) Init(2) Optimization
f522930c
JM
2717Tell DSE that the storage for a C++ object is dead when the constructor
2718starts and when the destructor finishes.
2719
a021961c 2720flifetime-dse=
63010089 2721Common Joined RejectNegative UInteger Var(flag_lifetime_dse) Optimization IntegerRange(0, 2)
a021961c 2722
0f5a9a00
JH
2723flimit-function-alignment
2724Common Var(flag_limit_function_alignment) Optimization Init(0)
2725
6fd6a2ff
QZ
2726flive-patching
2727Common RejectNegative Alias(flive-patching=,inline-clone) Optimization
2728
2729flive-patching=
eece52b5 2730Common Joined RejectNegative Enum(live_patching_level) Var(flag_live_patching) Init(LIVE_PATCHING_NONE) Optimization
6fd6a2ff
QZ
2731-flive-patching=[inline-only-static|inline-clone] Control IPA
2732optimizations to provide a safe compilation for live-patching. At the same
2733time, provides multiple-level control on the enabled IPA optimizations.
2734
2735Enum
2736Name(live_patching_level) Type(enum live_patching_level) UnknownError(unknown Live-Patching Level %qs)
2737
2738EnumValue
2739Enum(live_patching_level) String(inline-only-static) Value(LIVE_PATCHING_INLINE_ONLY_STATIC)
2740
2741EnumValue
2742Enum(live_patching_level) String(inline-clone) Value(LIVE_PATCHING_INLINE_CLONE)
2743
6343b6bf 2744fallocation-dce
eece52b5 2745Common Var(flag_allocation_dce) Init(1) Optimization
6343b6bf
ML
2746Tell DCE to remove unused C++ allocations.
2747
f20f2613 2748flive-range-shrinkage
eece52b5 2749Common Var(flag_live_range_shrinkage) Init(0) Optimization
a7b2e184 2750Relief of register pressure through live range shrinkage.
f20f2613 2751
6ff3a151 2752frename-registers
e415bc4c 2753Common Var(flag_rename_registers) Optimization EnabledBy(funroll-loops)
a7b2e184 2754Perform a register renaming optimization pass.
6ff3a151 2755
b16abbcb 2756fschedule-fusion
eece52b5 2757Common Var(flag_schedule_fusion) Init(2) Optimization
a7b2e184 2758Perform a target dependent instruction fusion optimization pass.
b16abbcb 2759
6ff3a151 2760freorder-blocks
eece52b5 2761Common Var(flag_reorder_blocks) Optimization
a7b2e184 2762Reorder basic blocks to improve code placement.
6ff3a151 2763
59faab7c
SB
2764freorder-blocks-algorithm=
2765Common Joined RejectNegative Enum(reorder_blocks_algorithm) Var(flag_reorder_blocks_algorithm) Init(REORDER_BLOCKS_ALGORITHM_SIMPLE) Optimization
6a825afe 2766-freorder-blocks-algorithm=[simple|stc] Set the used basic block reordering algorithm.
59faab7c
SB
2767
2768Enum
2769Name(reorder_blocks_algorithm) Type(enum reorder_blocks_algorithm) UnknownError(unknown basic block reordering algorithm %qs)
2770
2771EnumValue
2772Enum(reorder_blocks_algorithm) String(simple) Value(REORDER_BLOCKS_ALGORITHM_SIMPLE)
2773
2774EnumValue
2775Enum(reorder_blocks_algorithm) String(stc) Value(REORDER_BLOCKS_ALGORITHM_STC)
2776
750054a2 2777freorder-blocks-and-partition
eece52b5 2778Common Var(flag_reorder_blocks_and_partition) Optimization
a7b2e184 2779Reorder basic blocks and partition into hot and cold sections.
750054a2 2780
6ff3a151 2781freorder-functions
eece52b5 2782Common Var(flag_reorder_functions) Optimization
a7b2e184 2783Reorder functions to improve code placement.
6ff3a151 2784
de32c0cb 2785frerun-cse-after-loop
eece52b5 2786Common Var(flag_rerun_cse_after_loop) Optimization
a7b2e184 2787Add a common subexpression elimination pass after loop optimizations.
de32c0cb 2788
efa1cdf0 2789frerun-loop-opt
2d2bd949 2790Common Ignore
c0220ea4 2791Does nothing. Preserved for backward compatibility.
efa1cdf0 2792
039c3d42 2793frounding-math
eece52b5 2794Common Var(flag_rounding_math) Optimization SetByCombined
a7b2e184 2795Disable optimizations that assume default FP rounding behavior.
039c3d42 2796
6ff3a151 2797fsched-interblock
eece52b5 2798Common Var(flag_schedule_interblock) Init(1) Optimization
a7b2e184 2799Enable scheduling across basic blocks.
6ff3a151 2800
ce18efcb 2801fsched-pressure
eece52b5 2802Common Var(flag_sched_pressure) Init(0) Optimization
a7b2e184 2803Enable register pressure sensitive insn scheduling.
ce18efcb 2804
6ff3a151 2805fsched-spec
eece52b5 2806Common Var(flag_schedule_speculative) Init(1) Optimization
a7b2e184 2807Allow speculative motion of non-loads.
6ff3a151
NB
2808
2809fsched-spec-load
eece52b5 2810Common Var(flag_schedule_speculative_load) Optimization
a7b2e184 2811Allow speculative motion of some loads.
6ff3a151
NB
2812
2813fsched-spec-load-dangerous
eece52b5 2814Common Var(flag_schedule_speculative_load_dangerous) Optimization
a7b2e184 2815Allow speculative motion of more loads.
6ff3a151 2816
de32c0cb 2817fsched-verbose=
4111f1c9 2818Common RejectNegative Joined UInteger Var(sched_verbose_param) Init(1)
a7b2e184 2819-fsched-verbose=<number> Set the verbosity level of the scheduler.
de32c0cb 2820
6ff3a151 2821fsched2-use-superblocks
eece52b5 2822Common Var(flag_sched2_use_superblocks) Optimization
a7b2e184 2823If scheduling post reload, do superblock scheduling.
6ff3a151
NB
2824
2825fsched2-use-traces
2d2bd949 2826Common Ignore
57257f0d 2827Does nothing. Preserved for backward compatibility.
6ff3a151 2828
de32c0cb 2829fschedule-insns
eece52b5 2830Common Var(flag_schedule_insns) Optimization
a7b2e184 2831Reschedule instructions before register allocation.
de32c0cb
NB
2832
2833fschedule-insns2
eece52b5 2834Common Var(flag_schedule_insns_after_reload) Optimization
a7b2e184 2835Reschedule instructions after register allocation.
de32c0cb 2836
e855c69d
AB
2837; This flag should be on when a target implements non-trivial
2838; scheduling hooks, maybe saving some information for its own sake.
a7b2e184 2839; On IA64, for example, this is used for correct bundling.
e855c69d 2840fselective-scheduling
eece52b5 2841Common Var(flag_selective_scheduling) Optimization
a7b2e184 2842Schedule instructions using selective scheduling algorithm.
e855c69d
AB
2843
2844fselective-scheduling2
eece52b5 2845Common Var(flag_selective_scheduling2) Optimization
a7b2e184 2846Run selective scheduling after reload.
e855c69d 2847
ecfc21ff
DM
2848fself-test=
2849Common Undocumented Joined Var(flag_self_test)
2850Run self-tests, using the given path to locate test files.
d9b950dd 2851
e855c69d 2852fsel-sched-pipelining
eece52b5 2853Common Var(flag_sel_sched_pipelining) Init(0) Optimization
a7b2e184 2854Perform software pipelining of inner loops during selective scheduling.
e855c69d
AB
2855
2856fsel-sched-pipelining-outer-loops
eece52b5 2857Common Var(flag_sel_sched_pipelining_outer_loops) Init(0) Optimization
a7b2e184 2858Perform software pipelining of outer loops during selective scheduling.
e855c69d
AB
2859
2860fsel-sched-reschedule-pipelined
eece52b5 2861Common Var(flag_sel_sched_reschedule_pipelined) Init(0) Optimization
a7b2e184 2862Reschedule pipelined regions without pipelining.
e855c69d 2863
e288a46c 2864fsemantic-interposition
75ac95f6 2865Common Var(flag_semantic_interposition) Init(1) Optimization
a7b2e184 2866Allow interposing function (or variables) by ones with different semantics (or initializer) respectively by dynamic linker.
e288a46c 2867
31b66477
KC
2868; sched_stalled_insns means that insns can be moved prematurely from the queue
2869; of stalled insns into the ready list.
569fa502 2870fsched-stalled-insns
eece52b5 2871Common Var(flag_sched_stalled_insns) Optimization UInteger
a7b2e184 2872Allow premature scheduling of queued insns.
569fa502
DN
2873
2874fsched-stalled-insns=
b16650ac 2875Common RejectNegative Joined UInteger Optimization
a7b2e184 2876-fsched-stalled-insns=<number> Set number of queued insns that can be prematurely scheduled.
569fa502 2877
31b66477
KC
2878; sched_stalled_insns_dep controls how many recently scheduled cycles will
2879; be examined for a dependency on a stalled insn that is candidate for
2880; premature removal from the queue of stalled insns into the ready list (has
2881; an effect only if the flag 'sched_stalled_insns' is set).
569fa502 2882fsched-stalled-insns-dep
eece52b5 2883Common Var(flag_sched_stalled_insns_dep,1) Init(1) Optimization UInteger
a7b2e184 2884Set dependence distance checking in premature scheduling of queued insns.
569fa502
DN
2885
2886fsched-stalled-insns-dep=
b16650ac 2887Common RejectNegative Joined UInteger Optimization
a7b2e184 2888-fsched-stalled-insns-dep=<number> Set dependence distance checking in premature scheduling of queued insns.
569fa502 2889
ee4764a8 2890fsched-group-heuristic
eece52b5 2891Common Var(flag_sched_group_heuristic) Init(1) Optimization
a7b2e184 2892Enable the group heuristic in the scheduler.
ee4764a8
GS
2893
2894fsched-critical-path-heuristic
eece52b5 2895Common Var(flag_sched_critical_path_heuristic) Init(1) Optimization
a7b2e184 2896Enable the critical path heuristic in the scheduler.
ee4764a8
GS
2897
2898fsched-spec-insn-heuristic
eece52b5 2899Common Var(flag_sched_spec_insn_heuristic) Init(1) Optimization
a7b2e184 2900Enable the speculative instruction heuristic in the scheduler.
ee4764a8 2901
ee4764a8 2902fsched-rank-heuristic
eece52b5 2903Common Var(flag_sched_rank_heuristic) Init(1) Optimization
a7b2e184 2904Enable the rank heuristic in the scheduler.
ee4764a8
GS
2905
2906fsched-last-insn-heuristic
eece52b5 2907Common Var(flag_sched_last_insn_heuristic) Init(1) Optimization
a7b2e184 2908Enable the last instruction heuristic in the scheduler.
ee4764a8
GS
2909
2910fsched-dep-count-heuristic
eece52b5 2911Common Var(flag_sched_dep_count_heuristic) Init(1) Optimization
a7b2e184 2912Enable the dependent count heuristic in the scheduler.
ee4764a8 2913
aacd3885 2914fsection-anchors
eece52b5 2915Common Var(flag_section_anchors) Optimization
a7b2e184 2916Access data in the same section from shared anchor points.
aacd3885 2917
8cd37d0b 2918fsee
2d2bd949 2919Common Ignore
8393a9c8 2920Does nothing. Preserved for backward compatibility.
8cd37d0b 2921
87a0ebfd 2922fzee
26cd9add
EI
2923Common Ignore
2924Does nothing. Preserved for backward compatibility.
2925
2926free
eece52b5 2927Common Var(flag_ree) Init(0) Optimization
26cd9add 2928Turn on Redundant Extensions Elimination pass.
87a0ebfd 2929
8abb6b22 2930fshow-column
eece52b5 2931Common Var(flag_show_column) Init(1)
a7b2e184 2932Show column numbers in diagnostics, when available. Default on.
8abb6b22 2933
484db665 2934fshrink-wrap
eece52b5 2935Common Var(flag_shrink_wrap) Optimization
484db665
BS
2936Emit function prologues only before parts of the function that need it,
2937rather than at the top of the function.
2938
20a6ece0 2939fshrink-wrap-separate
eece52b5 2940Common Var(flag_shrink_wrap_separate) Init(1) Optimization
20a6ece0
SB
2941Shrink-wrap parts of the prologue and epilogue separately.
2942
6ff3a151 2943fsignaling-nans
eece52b5 2944Common Var(flag_signaling_nans) Optimization SetByCombined
a7b2e184 2945Disable optimizations observable by IEEE signaling NaNs.
6ff3a151 2946
db02da79 2947fsigned-zeros
eece52b5 2948Common Var(flag_signed_zeros) Init(1) Optimization SetByCombined
a7b2e184 2949Disable floating point optimizations that ignore the IEEE signedness of zero.
db02da79 2950
6ff3a151 2951fsingle-precision-constant
eece52b5 2952Common Var(flag_single_precision_constant) Optimization
a7b2e184 2953Convert floating point constants to single precision constants.
6ff3a151 2954
113d659a 2955fsplit-ivs-in-unroller
eece52b5 2956Common Var(flag_split_ivs_in_unroller) Init(1) Optimization
a7b2e184 2957Split lifetimes of induction variables when loops are unrolled.
113d659a 2958
7458026b 2959fsplit-stack
eece52b5 2960Common Var(flag_split_stack) Init(-1)
a7b2e184 2961Generate discontiguous stack frames.
7458026b 2962
e53a16e7 2963fsplit-wide-types
eece52b5 2964Common Var(flag_split_wide_types) Optimization
a7b2e184 2965Split wide types into independent registers.
e53a16e7 2966
b18081df 2967fsplit-wide-types-early
eece52b5 2968Common Var(flag_split_wide_types_early) Optimization
b18081df
SB
2969Split wide types into independent registers earlier.
2970
6a75d560 2971fssa-backprop
eece52b5 2972Common Var(flag_ssa_backprop) Init(1) Optimization
6a75d560
RS
2973Enable backward propagation of use properties at the SSA level.
2974
68f6df73 2975fssa-phiopt
eece52b5 2976Common Var(flag_ssa_phiopt) Optimization
a7b2e184 2977Optimize conditional patterns using SSA PHI nodes.
68f6df73 2978
98ce9490 2979fstdarg-opt
eece52b5 2980Common Var(flag_stdarg_opt) Init(1) Optimization
a7b2e184 2981Optimize amount of stdarg registers saved to stack at start of function.
98ce9490 2982
f37a4f14 2983fvariable-expansion-in-unroller
eece52b5 2984Common Var(flag_variable_expansion_in_unroller) Optimization
a7b2e184 2985Apply variable expansion when loops are unrolled.
f37a4f14 2986
b38f3813 2987fstack-check=
eece52b5 2988Common RejectNegative Joined Optimization
a7b2e184 2989-fstack-check=[no|generic|specific] Insert stack checking code into the program.
b38f3813 2990
6ff3a151 2991fstack-check
5de8299c 2992Common Alias(fstack-check=, specific, no)
a7b2e184 2993Insert stack checking code into the program. Same as -fstack-check=specific.
6ff3a151 2994
ee8f15c6 2995fstack-clash-protection
eece52b5 2996Common Var(flag_stack_clash_protection) Optimization
ee8f15c6
JL
2997Insert code to probe each page of stack space as it is allocated to protect
2998from stack-clash style attacks.
2999
de32c0cb 3000fstack-limit
21bf1558 3001Common Var(common_deferred_options) Defer
de32c0cb 3002
058de654 3003fstack-limit-register=
21bf1558 3004Common RejectNegative Joined Var(common_deferred_options) Defer
a7b2e184 3005-fstack-limit-register=<register> Trap if the stack goes past <register>.
058de654
NB
3006
3007fstack-limit-symbol=
21bf1558 3008Common RejectNegative Joined Var(common_deferred_options) Defer
a7b2e184 3009-fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>.
058de654 3010
7d69de61 3011fstack-protector
eece52b5 3012Common Var(flag_stack_protect, 1) Init(-1) Optimization
a7b2e184 3013Use propolice as a stack protection method.
7d69de61
RH
3014
3015fstack-protector-all
eece52b5 3016Common RejectNegative Var(flag_stack_protect, 2) Init(-1) Optimization
a7b2e184 3017Use a stack protection method for every function.
7d69de61 3018
f6bc1c4a 3019fstack-protector-strong
eece52b5 3020Common RejectNegative Var(flag_stack_protect, 3) Init(-1) Optimization
a7b2e184 3021Use a smart stack protection method for certain functions.
f6bc1c4a 3022
5434dc07 3023fstack-protector-explicit
eece52b5 3024Common RejectNegative Var(flag_stack_protect, 4) Optimization
a7b2e184 3025Use stack protection method only for functions with the stack_protect attribute.
5434dc07 3026
d3c12306
EB
3027fstack-usage
3028Common RejectNegative Var(flag_stack_usage)
a7b2e184 3029Output stack usage information on a per-function basis.
d3c12306 3030
de32c0cb 3031fstrength-reduce
2d2bd949 3032Common Ignore
c0220ea4 3033Does nothing. Preserved for backward compatibility.
de32c0cb 3034
31b66477
KC
3035; Nonzero if we should do (language-dependent) alias analysis.
3036; Typically, this analysis will assume that expressions of certain
3037; types do not alias expressions of certain other types. Only used
3038; if alias analysis (in general) is enabled.
6ff3a151 3039fstrict-aliasing
eece52b5 3040Common Var(flag_strict_aliasing) Optimization
a7b2e184 3041Assume strict aliasing rules apply.
6ff3a151 3042
eeef0e45 3043fstrict-overflow
eece52b5 3044Common
3fccbb9e 3045Treat signed overflow as undefined. Negated as -fwrapv -fwrapv-pointer.
eeef0e45 3046
f0a90c7d
AO
3047fstrub=disable
3048Common RejectNegative Var(flag_strub, 0)
3049Disable stack scrub entirely, disregarding strub attributes.
3050
3051fstrub=strict
3052Common RejectNegative Var(flag_strub, -4)
3053Enable stack scrub as per attributes, with strict call checking.
3054
3055; If any strub-enabling attribute is seen when the default or strict
3056; initializer values are in effect, flag_strub is bumped up by 2. The
3057; scrub mode gate function will then bump these initializer values to
3058; 0 if no strub-enabling attribute is seen. This minimizes the strub
3059; overhead.
3060fstrub=relaxed
3061Common RejectNegative Var(flag_strub, -3) Init(-3)
3062Restore default strub mode: as per attributes, with relaxed checking.
3063
3064fstrub=all
3065Common RejectNegative Var(flag_strub, 3)
3066Enable stack scrubbing for all viable functions.
3067
3068fstrub=at-calls
3069Common RejectNegative Var(flag_strub, 1)
3070Enable at-calls stack scrubbing for all viable functions.
3071
3072fstrub=internal
3073Common RejectNegative Var(flag_strub, 2)
3074Enable internal stack scrubbing for all viable functions.
3075
e8053cf5 3076fsync-libcalls
eece52b5 3077Common Var(flag_sync_libcalls) Init(1)
a7b2e184 3078Implement __atomic operations via libcalls to legacy __sync functions.
e8053cf5 3079
de32c0cb 3080fsyntax-only
eece52b5 3081Common Var(flag_syntax_only)
a7b2e184 3082Check for syntax errors, then stop.
de32c0cb 3083
6ff3a151 3084ftest-coverage
eece52b5 3085Common Var(flag_test_coverage)
a7b2e184 3086Create data files needed by \"gcov\".
6ff3a151 3087
de32c0cb 3088fthread-jumps
eece52b5 3089Common Var(flag_thread_jumps) Optimization
a7b2e184 3090Perform jump threading optimizations.
de32c0cb 3091
6ff3a151 3092ftime-report
eece52b5 3093Common Var(time_report)
a7b2e184 3094Report the time taken by each compiler pass.
6ff3a151 3095
8df06bd0 3096ftime-report-details
eece52b5 3097Common Var(time_report_details)
8df06bd0
RB
3098Record times taken by sub-phases separately.
3099
058de654 3100ftls-model=
e6d4b984 3101Common Joined RejectNegative Enum(tls_model) Var(flag_tls_default) Init(TLS_MODEL_GLOBAL_DYNAMIC)
a7b2e184 3102-ftls-model=[global-dynamic|local-dynamic|initial-exec|local-exec] Set the default thread-local storage code generation model.
058de654 3103
e6d4b984
JM
3104Enum
3105Name(tls_model) Type(enum tls_model) UnknownError(unknown TLS model %qs)
3106
3107EnumValue
3108Enum(tls_model) String(global-dynamic) Value(TLS_MODEL_GLOBAL_DYNAMIC)
3109
3110EnumValue
3111Enum(tls_model) String(local-dynamic) Value(TLS_MODEL_LOCAL_DYNAMIC)
3112
3113EnumValue
3114Enum(tls_model) String(initial-exec) Value(TLS_MODEL_INITIAL_EXEC)
3115
3116EnumValue
3117Enum(tls_model) String(local-exec) Value(TLS_MODEL_LOCAL_EXEC)
3118
474eccc6 3119ftoplevel-reorder
eece52b5 3120Common Var(flag_toplevel_reorder) Init(2) Optimization
a7b2e184 3121Reorder top level functions, variables, and asms.
474eccc6 3122
de32c0cb 3123ftracer
eece52b5 3124Common Var(flag_tracer) Optimization
a7b2e184 3125Perform superblock formation via tail duplication.
de32c0cb 3126
4c640e26 3127ftrampolines
28d8c680 3128Common Var(flag_trampolines) Init(HEAP_TRAMPOLINES_INIT)
4c640e26
EB
3129For targets that normally need trampolines for nested functions, always
3130generate them instead of using descriptors.
3131
28d8c680
AB
3132ftrampoline-impl=
3133Common Joined RejectNegative Enum(trampoline_impl) Var(flag_trampoline_impl) Init(HEAP_TRAMPOLINES_INIT ? TRAMPOLINE_IMPL_HEAP : TRAMPOLINE_IMPL_STACK)
3134Whether trampolines are generated in executable memory rather than
3135executable stack.
3136
3137Enum
3138Name(trampoline_impl) Type(enum trampoline_impl) UnknownError(unknown trampoline implementation %qs)
3139
3140EnumValue
3141Enum(trampoline_impl) String(stack) Value(TRAMPOLINE_IMPL_STACK)
3142
3143EnumValue
3144Enum(trampoline_impl) String(heap) Value(TRAMPOLINE_IMPL_HEAP)
3145
3146
31b66477
KC
3147; Zero means that floating-point math operations cannot generate a
3148; (user-visible) trap. This is the case, for example, in nonstop
3149; IEEE 754 arithmetic.
6ff3a151 3150ftrapping-math
eece52b5 3151Common Var(flag_trapping_math) Init(1) Optimization SetByCombined
a7b2e184 3152Assume floating-point operations can trap.
6ff3a151
NB
3153
3154ftrapv
eece52b5 3155Common Var(flag_trapv) Optimization
a7b2e184 3156Trap for signed overflow in addition, subtraction and multiplication.
6ff3a151 3157
6de9cd9a 3158ftree-ccp
eece52b5 3159Common Var(flag_tree_ccp) Optimization
a7b2e184 3160Enable SSA-CCP optimization on trees.
6de9cd9a 3161
0b4b14ac 3162ftree-bit-ccp
eece52b5 3163Common Var(flag_tree_bit_ccp) Optimization
a7b2e184 3164Enable SSA-BIT-CCP optimization on trees.
0b4b14ac 3165
0bca51f0 3166ftree-store-ccp
2d2bd949 3167Common Ignore
dce2b2f6 3168Does nothing. Preserved for backward compatibility.
0bca51f0 3169
6de9cd9a 3170ftree-ch
eece52b5 3171Common Var(flag_tree_ch) Optimization
a7b2e184 3172Enable loop header copying on trees.
6de9cd9a 3173
21d01365 3174ftree-coalesce-inlined-vars
1f9ceff1
AO
3175Common Ignore RejectNegative
3176Does nothing. Preserved for backward compatibility.
21d01365
AO
3177
3178ftree-coalesce-vars
eece52b5 3179Common Var(flag_tree_coalesce_vars) Optimization
a7b2e184 3180Enable SSA coalescing of user variables.
21d01365 3181
6de9cd9a 3182ftree-copyrename
1f9ceff1
AO
3183Common Ignore
3184Does nothing. Preserved for backward compatibility.
6de9cd9a 3185
0bca51f0 3186ftree-copy-prop
eece52b5 3187Common Var(flag_tree_copy_prop) Optimization
a7b2e184 3188Enable copy propagation on trees.
0bca51f0
DN
3189
3190ftree-store-copy-prop
2d2bd949 3191Common Ignore
e9033855 3192Does nothing. Preserved for backward compatibility.
0bca51f0 3193
a5828d1e 3194ftree-cselim
177b800f 3195Common Var(flag_tree_cselim) Optimization
a7b2e184 3196Transform condition stores into unconditional ones.
a5828d1e 3197
b6e99746 3198ftree-switch-conversion
eece52b5 3199Common Var(flag_tree_switch_conversion) Optimization
b6e99746
MJ
3200Perform conversions of switch initializations.
3201
6de9cd9a 3202ftree-dce
eece52b5 3203Common Var(flag_tree_dce) Optimization
a7b2e184 3204Enable SSA dead code elimination optimization on trees.
6de9cd9a
DN
3205
3206ftree-dominator-opts
eece52b5 3207Common Var(flag_tree_dom) Optimization
a7b2e184 3208Enable dominator optimizations.
6de9cd9a 3209
c9e93168 3210ftree-tail-merge
eece52b5 3211Common Var(flag_tree_tail_merge) Optimization
a7b2e184 3212Enable tail merging on trees.
c9e93168 3213
6de9cd9a 3214ftree-dse
eece52b5 3215Common Var(flag_tree_dse) Optimization
a7b2e184 3216Enable dead store elimination.
6de9cd9a 3217
248fc9f3 3218ftree-forwprop
eece52b5 3219Common Var(flag_tree_forwprop) Init(1) Optimization
a7b2e184 3220Enable forward propagation on trees.
248fc9f3 3221
ff2ad0f7 3222ftree-fre
eece52b5 3223Common Var(flag_tree_fre) Optimization
a7b2e184 3224Enable Full Redundancy Elimination (FRE) on trees.
ff2ad0f7 3225
8b57bfeb 3226foptimize-strlen
eece52b5 3227Common Var(flag_optimize_strlen) Optimization
a7b2e184 3228Enable string length optimizations on trees.
8b57bfeb 3229
ae93744d 3230fisolate-erroneous-paths-dereference
eece52b5 3231Common Var(flag_isolate_erroneous_paths_dereference) Optimization
408e8aa4
SL
3232Detect paths that trigger erroneous or undefined behavior due to
3233dereferencing a null pointer. Isolate those paths from the main control
3234flow and turn the statement with erroneous or undefined behavior into a trap.
ae93744d
JL
3235
3236fisolate-erroneous-paths-attribute
eece52b5 3237Common Var(flag_isolate_erroneous_paths_attribute) Optimization
51956afe 3238Detect paths that trigger erroneous or undefined behavior due to a null value
408e8aa4 3239being used in a way forbidden by a returns_nonnull or nonnull
ae93744d 3240attribute. Isolate those paths from the main control flow and turn the
a7b2e184 3241statement with erroneous or undefined behavior into a trap.
8fdc414d 3242
dea61d92 3243ftree-loop-distribution
eece52b5 3244Common Var(flag_tree_loop_distribution) Optimization
a7b2e184 3245Enable loop distribution on trees.
dea61d92 3246
20769d5e 3247ftree-loop-distribute-patterns
eece52b5 3248Common Var(flag_tree_loop_distribute_patterns) Optimization
a7b2e184 3249Enable loop distribution for patterns transformed into a library call.
20769d5e 3250
1b08d87d 3251ftree-loop-im
eece52b5 3252Common Var(flag_tree_loop_im) Init(1) Optimization
a7b2e184 3253Enable loop invariant motion on trees.
a7e5372d 3254
599eabdb 3255ftree-loop-linear
d6bb5ccf 3256Common Alias(floop-nest-optimize)
a7b2e184 3257Enable loop nest transforms. Same as -floop-nest-optimize.
599eabdb 3258
1b08d87d 3259ftree-loop-ivcanon
eece52b5 3260Common Var(flag_tree_loop_ivcanon) Init(1) Optimization
a7b2e184 3261Create canonical induction variables in loops.
1b08d87d 3262
c66b6c66 3263ftree-loop-optimize
eece52b5 3264Common Var(flag_tree_loop_optimize) Init(1) Optimization
a7b2e184 3265Enable loop optimizations on tree level.
c66b6c66 3266
5f40b3cb 3267ftree-parallelize-loops=
eece52b5 3268Common Joined RejectNegative UInteger Var(flag_tree_parallelize_loops) Init(1) Optimization
9453ba0a 3269-ftree-parallelize-loops=<number> Enable automatic parallelization of loops.
5f40b3cb 3270
248fc9f3 3271ftree-phiprop
eece52b5 3272Common Var(flag_tree_phiprop) Init(1) Optimization
248fc9f3
RG
3273Enable hoisting loads from conditional pointers.
3274
6de9cd9a 3275ftree-pre
eece52b5 3276Common Var(flag_tree_pre) Optimization
a7b2e184 3277Enable SSA-PRE optimization on trees.
6de9cd9a 3278
fa06ad0d 3279ftree-partial-pre
eece52b5 3280Common Var(flag_tree_partial_pre) Optimization
a7b2e184 3281In SSA-PRE optimization on trees, enable partial-partial redundancy elimination.
fa06ad0d 3282
248fc9f3 3283ftree-pta
eece52b5 3284Common Var(flag_tree_pta) Optimization
248fc9f3
RG
3285Perform function-local points-to analysis on trees.
3286
13c59415 3287ftree-reassoc
eece52b5 3288Common Var(flag_tree_reassoc) Init(1) Optimization
a7b2e184 3289Enable reassociation on tree level.
13c59415 3290
c75ab022 3291ftree-salias
2d2bd949 3292Common Ignore
1353232d 3293Does nothing. Preserved for backward compatibility.
c75ab022 3294
fa555252 3295ftree-sink
eece52b5 3296Common Var(flag_tree_sink) Optimization
a7b2e184 3297Enable SSA code sinking on trees.
fa555252 3298
75cfe445 3299ftree-slsr
eece52b5 3300Common Var(flag_tree_slsr) Optimization
a7b2e184 3301Perform straight-line strength reduction.
75cfe445 3302
6de9cd9a 3303ftree-sra
eece52b5 3304Common Var(flag_tree_sra) Optimization
a7b2e184 3305Perform scalar replacement of aggregates.
6de9cd9a
DN
3306
3307ftree-ter
eece52b5 3308Common Var(flag_tree_ter) Optimization
a7b2e184 3309Replace temporary expressions in the SSA->normal pass.
6de9cd9a 3310
c662432e 3311ftree-lrs
eece52b5 3312Common Var(flag_tree_live_range_split) Optimization
a7b2e184 3313Perform live range splitting during the SSA->normal pass.
c662432e 3314
0bca51f0 3315ftree-vrp
eece52b5 3316Common Var(flag_tree_vrp) Init(0) Optimization
a7b2e184 3317Perform Value Range Propagation on trees.
0bca51f0 3318
8fe17e23 3319fsplit-paths
eece52b5 3320Common Var(flag_split_paths) Init(0) Optimization
8fe17e23
AA
3321Split paths leading to loop backedges.
3322
71017a7b
AL
3323funconstrained-commons
3324Common Var(flag_unconstrained_commons) Optimization
3325Assume common declarations may be overridden with ones with a larger
3326trailing array.
3327
de32c0cb 3328funit-at-a-time
eece52b5 3329Common Var(flag_unit_at_a_time) Init(1)
a7b2e184 3330Compile whole compilation unit at a time.
de32c0cb 3331
d68d3664
JM
3332funreachable-traps
3333Common Var(flag_unreachable_traps) Optimization
3334Trap on __builtin_unreachable instead of using it for optimization.
3335
de32c0cb 3336funroll-loops
e415bc4c 3337Common Var(flag_unroll_loops) Optimization EnabledBy(funroll-all-loops)
a7b2e184 3338Perform loop unrolling when iteration count is known.
de32c0cb
NB
3339
3340funroll-all-loops
eece52b5 3341Common Var(flag_unroll_all_loops) Optimization
a7b2e184 3342Perform loop unrolling for all loops.
de32c0cb 3343
71489d8e 3344funroll-completely-grow-size
fe9458c2 3345Undocumented Var(flag_cunroll_grow_size) Optimization
71489d8e 3346; Internal undocumented flag, allow size growth during complete unrolling
3347
f9cc1a70
PB
3348; Nonzero means that loop optimizer may assume that the induction variables
3349; that control loops do not overflow and that the loops with nontrivial
3350; exit condition are not infinite
3351funsafe-loop-optimizations
78f63b79
BC
3352Common Ignore
3353Does nothing. Preserved for backward compatibility.
f9cc1a70 3354
a1a82611 3355fassociative-math
eece52b5 3356Common Var(flag_associative_math) SetByCombined Optimization
a1a82611
RE
3357Allow optimization for floating-point arithmetic which may change the
3358result of the operation due to rounding.
3359
3360freciprocal-math
eece52b5 3361Common Var(flag_reciprocal_math) SetByCombined Optimization
a1a82611
RE
3362Same as -fassociative-math for expressions which include division.
3363
31b66477
KC
3364; Nonzero means that unsafe floating-point math optimizations are allowed
3365; for the sake of speed. IEEE compliance is not guaranteed, and operations
3366; are allowed to assume that their arguments and results are "normal"
3367; (e.g., nonnegative for SQRT).
6ff3a151 3368funsafe-math-optimizations
eece52b5 3369Common Var(flag_unsafe_math_optimizations) Optimization SetByCombined
a7b2e184 3370Allow math optimizations that may violate IEEE or ISO standards.
6ff3a151 3371
de32c0cb 3372funswitch-loops
eece52b5 3373Common Var(flag_unswitch_loops) Optimization
a7b2e184 3374Perform loop unswitching.
de32c0cb 3375
28df8730 3376fsplit-loops
eece52b5 3377Common Var(flag_split_loops) Optimization
28df8730
MM
3378Perform loop splitting.
3379
13e08dc9 3380fversion-loops-for-strides
eece52b5 3381Common Var(flag_version_loops_for_strides) Optimization
13e08dc9
RS
3382Version loops based on whether indices have a stride of one.
3383
6ff3a151 3384funwind-tables
eece52b5 3385Common Var(flag_unwind_tables) Optimization
a7b2e184 3386Just generate unwind tables for exception handling.
6ff3a151 3387
b352afba 3388fuse-ld=bfd
b78e932d 3389Common Driver Negative(fuse-ld=gold)
a7b2e184 3390Use the bfd linker instead of the default linker.
b352afba
NC
3391
3392fuse-ld=gold
b78e932d 3393Common Driver Negative(fuse-ld=bfd)
a7b2e184 3394Use the gold linker instead of the default linker.
b352afba 3395
d69ac8b7
RG
3396fuse-ld=lld
3397Common Driver Negative(fuse-ld=lld)
3398Use the lld LLVM linker instead of the default linker.
3399
ad964f7e
ML
3400fuse-ld=mold
3401Common Driver Negative(fuse-ld=mold)
3402Use the Modern linker (MOLD) linker instead of the default linker.
3403
da18ea94 3404fuse-linker-plugin
063d671d 3405Common Undocumented Var(flag_use_linker_plugin)
da18ea94 3406
e90afde6
JM
3407; Positive if we should track variables, negative if we should run
3408; the var-tracking pass only to discard debug annotations, zero if
4cb52980 3409; we're not to run it.
014a1138 3410fvar-tracking
4cb52980 3411Common Var(flag_var_tracking) PerFunction EnabledBy(fvar-tracking-uninit)
a7b2e184 3412Perform variable tracking.
014a1138 3413
e90afde6
JM
3414; Positive if we should track variables at assignments, negative if
3415; we should run the var-tracking pass only to discard debug
4cb52980 3416; annotations.
b5b8b0ac 3417fvar-tracking-assignments
4cb52980 3418Common Var(flag_var_tracking_assignments) PerFunction
a7b2e184 3419Perform variable tracking by annotating assignments.
b5b8b0ac 3420
e90afde6
JM
3421; Nonzero if we should toggle flag_var_tracking_assignments after
3422; processing options and computing its default. */
b5b8b0ac 3423fvar-tracking-assignments-toggle
eece52b5 3424Common Var(flag_var_tracking_assignments_toggle) PerFunction
a7b2e184 3425Toggle -fvar-tracking-assignments.
b5b8b0ac 3426
1267ca30
EB
3427; Positive if we should track uninitialized variables, negative if
3428; we should run the var-tracking pass only to discard debug
4cb52980 3429; annotations.
62760ffd 3430fvar-tracking-uninit
eece52b5 3431Common Var(flag_var_tracking_uninit) PerFunction
a7b2e184 3432Perform variable tracking and also tag variables that are uninitialized.
62760ffd 3433
26d476cd 3434; Alias to enable both -ftree-loop-vectorize and -ftree-slp-vectorize.
79fe1b3b 3435ftree-vectorize
2b8453c4 3436Common Var(flag_tree_vectorize) Optimization
a7b2e184 3437Enable vectorization on trees.
79fe1b3b 3438
78c60e3d 3439ftree-vectorizer-verbose=
477e804b
SS
3440Common Joined RejectNegative Ignore
3441Does nothing. Preserved for backward compatibility.
78c60e3d 3442
ea0f3e87 3443ftree-loop-vectorize
eece52b5 3444Common Var(flag_tree_loop_vectorize) Optimization EnabledBy(ftree-vectorize)
a7b2e184 3445Enable loop vectorization on trees.
ea0f3e87 3446
a70d6342 3447ftree-slp-vectorize
eece52b5 3448Common Var(flag_tree_slp_vectorize) Optimization EnabledBy(ftree-vectorize)
a7b2e184 3449Enable basic block vectorization (SLP) on trees.
a70d6342 3450
d6d11272 3451fvect-cost-model=
b16650ac 3452Common Joined RejectNegative Enum(vect_cost_model) Var(flag_vect_cost_model) Init(VECT_COST_MODEL_DEFAULT) Optimization
0b0061f4 3453-fvect-cost-model=[unlimited|dynamic|cheap|very-cheap] Specifies the cost model for vectorization.
a7b2e184 3454
8b5e1202 3455fsimd-cost-model=
b16650ac 3456Common Joined RejectNegative Enum(vect_cost_model) Var(flag_simd_cost_model) Init(VECT_COST_MODEL_UNLIMITED) Optimization
0b0061f4 3457-fsimd-cost-model=[unlimited|dynamic|cheap|very-cheap] Specifies the vectorization cost model for code marked with a simd directive.
8b5e1202 3458
d6d11272
XDL
3459Enum
3460Name(vect_cost_model) Type(enum vect_cost_model) UnknownError(unknown vectorizer cost model %qs)
3461
3462EnumValue
3463Enum(vect_cost_model) String(unlimited) Value(VECT_COST_MODEL_UNLIMITED)
3464
3465EnumValue
3466Enum(vect_cost_model) String(dynamic) Value(VECT_COST_MODEL_DYNAMIC)
3467
3468EnumValue
3469Enum(vect_cost_model) String(cheap) Value(VECT_COST_MODEL_CHEAP)
3470
0b0061f4
RS
3471EnumValue
3472Enum(vect_cost_model) String(very-cheap) Value(VECT_COST_MODEL_VERY_CHEAP)
3473
792ed98b 3474fvect-cost-model
205d7111 3475Common Alias(fvect-cost-model=,dynamic,unlimited)
d6d11272
XDL
3476Enables the dynamic vectorizer cost model. Preserved for backward compatibility.
3477
c12cc930 3478ftree-vect-loop-version
d6d11272
XDL
3479Common Ignore
3480Does nothing. Preserved for backward compatibility.
c12cc930 3481
fbf798fc 3482ftree-scev-cprop
eece52b5 3483Common Var(flag_tree_scev_cprop) Init(1) Optimization
fbf798fc
DN
3484Enable copy propagation of scalar-evolution information.
3485
a25e0b5e 3486ftrivial-auto-var-init=
3487Common Joined RejectNegative Enum(auto_init_type) Var(flag_auto_var_init) Init(AUTO_INIT_UNINITIALIZED) Optimization
3488-ftrivial-auto-var-init=[uninitialized|pattern|zero] Add initializations to automatic variables.
3489
3490Enum
3491Name(auto_init_type) Type(enum auto_init_type) UnknownError(unrecognized automatic variable initialization type %qs)
3492
3493EnumValue
3494Enum(auto_init_type) String(uninitialized) Value(AUTO_INIT_UNINITIALIZED)
3495
3496EnumValue
3497Enum(auto_init_type) String(pattern) Value(AUTO_INIT_PATTERN)
3498
3499EnumValue
3500Enum(auto_init_type) String(zero) Value(AUTO_INIT_ZERO)
3501
31b66477
KC
3502; -fverbose-asm causes extra commentary information to be produced in
3503; the generated assembly code (to make it more readable). This option
3504; is generally only of use to those who actually need to read the
3505; generated assembly code (perhaps while debugging the compiler itself).
3506; -fno-verbose-asm, the default, causes the extra information
3507; to not be added and is useful when comparing two assembler files.
6ff3a151 3508fverbose-asm
eece52b5 3509Common Var(flag_verbose_asm)
a7b2e184 3510Add extra commentary to assembler output.
6ff3a151 3511
d7afec4b 3512fvisibility=
e6d4b984 3513Common Joined RejectNegative Enum(symbol_visibility) Var(default_visibility) Init(VISIBILITY_DEFAULT)
a7b2e184 3514-fvisibility=[default|internal|hidden|protected] Set the default symbol visibility.
d7afec4b 3515
e6d4b984
JM
3516Enum
3517Name(symbol_visibility) Type(enum symbol_visibility) UnknownError(unrecognized visibility value %qs)
3518
3519EnumValue
3520Enum(symbol_visibility) String(default) Value(VISIBILITY_DEFAULT)
3521
3522EnumValue
3523Enum(symbol_visibility) String(internal) Value(VISIBILITY_INTERNAL)
3524
3525EnumValue
3526Enum(symbol_visibility) String(hidden) Value(VISIBILITY_HIDDEN)
3527
3528EnumValue
3529Enum(symbol_visibility) String(protected) Value(VISIBILITY_PROTECTED)
d7afec4b 3530
2077db1b
CT
3531fvtable-verify=
3532Common Joined RejectNegative Enum(vtv_priority) Var(flag_vtable_verify) Init(VTV_NO_PRIORITY)
3533Validate vtable pointers before using them.
3534
3535Enum
3536Name(vtv_priority) Type(enum vtv_priority) UnknownError(unknown vtable verify initialization priority %qs)
3537
3538EnumValue
3539Enum(vtv_priority) String(none) Value(VTV_NO_PRIORITY)
3540
3541EnumValue
3542Enum(vtv_priority) String(std) Value(VTV_STANDARD_PRIORITY)
3543
3544EnumValue
3545Enum(vtv_priority) String(preinit) Value(VTV_PREINIT_PRIORITY)
3546
3547fvtv-counts
3548Common Var(flag_vtv_counts)
3549Output vtable verification counters.
3550
3551fvtv-debug
3552Common Var(flag_vtv_debug)
3553Output vtable verification pointer sets information.
3554
fca9dc00 3555fvpt
eece52b5 3556Common Var(flag_value_profile_transformations) Optimization
a7b2e184 3557Use expression value profiles in optimizations.
fca9dc00 3558
62551c66 3559fweb
e415bc4c 3560Common Var(flag_web) Optimization EnabledBy(funroll-loops)
a7b2e184 3561Construct webs and split unrelated uses of single variable.
62551c66 3562
c2699190 3563ftree-builtin-call-dce
eece52b5 3564Common Var(flag_tree_builtin_call_dce) Init(0) Optimization
a7b2e184 3565Enable conditional dead code elimination for builtin calls.
c2699190 3566
ce91e74c 3567fwhole-program
eece52b5 3568Common Var(flag_whole_program) Init(0)
a7b2e184 3569Perform whole program optimizations.
ce91e74c 3570
3fccbb9e 3571fwrapv-pointer
eece52b5 3572Common Var(flag_wrapv_pointer) Optimization
3fccbb9e
JJ
3573Assume pointer overflow wraps around.
3574
6ff3a151 3575fwrapv
eece52b5 3576Common Var(flag_wrapv) Optimization
a7b2e184 3577Assume signed arithmetic overflow wraps around.
6ff3a151 3578
6ff3a151 3579fzero-initialized-in-bss
eece52b5 3580Common Var(flag_zero_initialized_in_bss) Init(1)
a7b2e184 3581Put zero initialized data in the bss section.
6ff3a151 3582
d10f3e90 3583fzero-call-used-regs=
eece52b5 3584Common RejectNegative Joined
d10f3e90 3585Clear call-used registers upon function return.
3586
0547dbb7
JJ
3587fzero-init-padding-bits=
3588Common Joined RejectNegative Enum(zero_init_padding_bits_kind) Var(flag_zero_init_padding_bits) Init(ZERO_INIT_PADDING_BITS_STANDARD)
3589-fzero-init-padding-bits=[standard|unions|all] Zero padding bits in initializers.
3590
3591Enum
3592Name(zero_init_padding_bits_kind) Type(enum zero_init_padding_bits_kind) UnknownError(unrecognized zero init padding bits kind %qs)
3593
3594EnumValue
3595Enum(zero_init_padding_bits_kind) String(standard) Value(ZERO_INIT_PADDING_BITS_STANDARD)
3596
3597EnumValue
3598Enum(zero_init_padding_bits_kind) String(unions) Value(ZERO_INIT_PADDING_BITS_UNIONS)
3599
3600EnumValue
3601Enum(zero_init_padding_bits_kind) String(all) Value(ZERO_INIT_PADDING_BITS_ALL)
3602
e01cc6dc 3603g
9ed32e27 3604Common Driver RejectNegative JoinedOrMissing
a7b2e184 3605Generate debug information in default format.
df38ffef 3606
924c9e3e 3607gas-loc-support
4cb52980 3608Common Driver Var(dwarf2out_as_loc_support)
04e5c73d 3609Assume assembler support for (DWARF2+) .loc directives.
924c9e3e
AO
3610
3611gas-locview-support
4cb52980 3612Common Driver Var(dwarf2out_as_locview_support)
04e5c73d 3613Assume assembler support for view in (DWARF2+) .loc directives.
924c9e3e 3614
2f7e7bfa
MH
3615gcodeview
3616Common Driver JoinedOrMissing
3617Generate debug information in CodeView format.
3618
e7e95821 3619gcoff
68a57628 3620Common Driver WarnRemoved
e7e95821
JW
3621Does nothing. Preserved for backward compatibility.
3622
3623gcoff1
68a57628 3624Common Driver WarnRemoved
e7e95821
JW
3625Does nothing. Preserved for backward compatibility.
3626
3627gcoff2
68a57628 3628Common Driver WarnRemoved
e7e95821
JW
3629Does nothing. Preserved for backward compatibility.
3630
3631gcoff3
68a57628 3632Common Driver WarnRemoved
e7e95821
JW
3633Does nothing. Preserved for backward compatibility.
3634
0029b929 3635gcolumn-info
8008dd1c 3636Common Driver Var(debug_column_info,1) Init(1)
0029b929
JJ
3637Record DW_AT_decl_column and DW_AT_call_column in DWARF.
3638
b7e215a8
IB
3639; The CTF generation process feeds off DWARF dies. This option implicitly
3640; updates the debug_info_level to DINFO_LEVEL_NORMAL.
3641gctf
3642Common Driver RejectNegative JoinedOrMissing
3643Generate CTF debug information at default level.
3644
3645gbtf
3646Common Driver RejectNegative JoinedOrMissing
3647Generate BTF debug information at default level.
3648
b8977d92
DF
3649gprune-btf
3650Common Driver Var(debug_prune_btf) Init(0)
3651Generate pruned BTF when emitting BTF info.
3652
6782438d 3653gdwarf
33312336 3654Common Driver JoinedOrMissing RejectNegative
a7b2e184 3655Generate debug information in default version of DWARF format.
6782438d 3656
53b2323e 3657gdwarf-
cc4b7d6b 3658Common Driver Joined UInteger Var(dwarf_version) Init(DWARF_VERSION_DEFAULT) RejectNegative
a7b2e184 3659Generate debug information in DWARF v2 (or later) format.
df38ffef 3660
65312dfc
JJ
3661gdwarf32
3662Common Driver Var(dwarf_offset_size,4) Init(4) RejectNegative
3663Use 32-bit DWARF format when emitting DWARF debug information.
3664
3665gdwarf64
3666Common Driver Var(dwarf_offset_size,8) RejectNegative
3667Use 64-bit DWARF format when emitting DWARF debug information.
3668
df38ffef 3669ggdb
cc4b7d6b 3670Common Driver JoinedOrMissing RejectNegative
a7b2e184 3671Generate debug information in default extended format.
df38ffef 3672
924c9e3e 3673ginline-points
4cb52980 3674Common Driver Var(debug_inline_points)
04e5c73d 3675Generate extended entry point information for inlined functions.
924c9e3e
AO
3676
3677ginternal-reset-location-views
3678Common Driver Var(debug_internal_reset_location_views) Init(2)
04e5c73d 3679Compute locview reset points based on insn length estimates.
924c9e3e 3680
9ed32e27
AO
3681gno-
3682RejectNegative Joined Undocumented
3683; Catch the gno- prefix, so it doesn't backtrack to g<level>.
3684
5175cbaf 3685gno-pubnames
1c70261c 3686Common Driver Negative(gpubnames) Var(debug_generate_pub_sections, 0) Init(-1)
5175cbaf
SA
3687Don't generate DWARF pubnames and pubtypes sections.
3688
3689gpubnames
1c70261c 3690Common Driver Negative(ggnu-pubnames) Var(debug_generate_pub_sections, 1)
5175cbaf
SA
3691Generate DWARF pubnames and pubtypes sections.
3692
7a1dd0fa 3693ggnu-pubnames
1c70261c 3694Common Driver Negative(gno-pubnames) Var(debug_generate_pub_sections, 2)
7a1dd0fa
SA
3695Generate DWARF pubnames and pubtypes sections with GNU extensions.
3696
e967adf4 3697grecord-gcc-switches
9ed32e27 3698Common Driver Var(dwarf_record_gcc_switches) Init(1)
e967adf4
JJ
3699Record gcc command line switches in DWARF DW_AT_producer.
3700
99ea153e 3701gsplit-dwarf
9ed32e27 3702Common Driver Var(dwarf_split_debug_info) Init(0)
a7b2e184 3703Generate debug information in separate .dwo files.
99ea153e 3704
df38ffef 3705gstabs
7e0db0cd
ML
3706Common Driver WarnRemoved
3707Does nothing. Preserved for backward compatibility.
df38ffef
NB
3708
3709gstabs+
7e0db0cd
ML
3710Common Driver WarnRemoved
3711Does nothing. Preserved for backward compatibility.
df38ffef 3712
8697bf9f 3713gstatement-frontiers
b4702276 3714Common Driver Var(debug_nonbind_markers_p) PerFunction
8697bf9f
AO
3715Emit progressive recommended breakpoint locations.
3716
65f753a0 3717gstrict-dwarf
eece52b5 3718Common Driver Var(dwarf_strict) Init(0)
a7b2e184 3719Don't emit DWARF additions beyond selected version.
65f753a0 3720
03e992ac 3721gdescribe-dies
eece52b5 3722Common Driver Var(flag_describe_dies) Init(0)
03e992ac
TV
3723Add description attributes to some DWARF DIEs that have no name attribute.
3724
2153915d 3725gtoggle
eece52b5 3726Common Driver Var(flag_gtoggle)
a7b2e184 3727Toggle debug information generation.
2153915d 3728
bd2b9f1e 3729gvariable-location-views
4cb52980 3730Common Driver Var(debug_variable_location_views, 1)
bd2b9f1e
AO
3731Augment variable location lists with progressive views.
3732
3733gvariable-location-views=incompat5
3734Common Driver RejectNegative Var(debug_variable_location_views, -1) Init(2)
3735
df38ffef 3736gvms
cc4b7d6b 3737Common Driver JoinedOrMissing RejectNegative
a7b2e184 3738Generate debug information in VMS format.
df38ffef
NB
3739
3740gxcoff
7e0db0cd
ML
3741Common Driver WarnRemoved
3742Does nothing. Preserved for backward compatibility.
df38ffef
NB
3743
3744gxcoff+
7e0db0cd
ML
3745Common Driver JoinedOrMissing WarnRemoved
3746Does nothing. Preserved for backward compatibility.
e01cc6dc 3747
29d7cbd1
RO
3748Enum
3749Name(compressed_debug_sections) Type(int)
3750
3751; Since -gz= is completely handled in specs, the values aren't used and we
3752; assign arbitrary constants.
3753EnumValue
3754Enum(compressed_debug_sections) String(none) Value(0)
3755
3756EnumValue
3757Enum(compressed_debug_sections) String(zlib) Value(1)
3758
3759EnumValue
b7723e13
ML
3760Enum(compressed_debug_sections) String(zstd) Value(2)
3761
3762EnumValue
3763Enum(compressed_debug_sections) String(zlib-gnu) Value(3)
29d7cbd1
RO
3764
3765gz
3766Common Driver
a7b2e184 3767Generate compressed debug sections.
29d7cbd1
RO
3768
3769gz=
9ed32e27 3770Common Driver RejectNegative Joined Enum(compressed_debug_sections)
a7b2e184 3771-gz=<format> Generate compressed debug sections in format <format>.
29d7cbd1 3772
6d721f67
JM
3773h
3774Driver Joined Separate
3775
4adbd5dd
MK
3776iplugindir=
3777Common Joined Var(plugindir_string) Init(0)
a7b2e184 3778-iplugindir=<dir> Set <dir> to be the default plugin directory.
4adbd5dd 3779
e0cdc09f
MK
3780imultiarch
3781Common Joined Separate RejectDriver Var(imultiarch) Init(0)
a7b2e184 3782-imultiarch <dir> Set <dir> to be the multiarch include subdirectory.
e0cdc09f 3783
603349bf
JM
3784l
3785Driver Joined Separate
3786
dd9f93dc
JM
3787n
3788Driver
3789
603349bf
JM
3790no-canonical-prefixes
3791Driver
3792
d9d16a19
JM
3793nodefaultlibs
3794Driver
3795
bab79a40
JM
3796nostartfiles
3797Driver
3798
f37866e8
OH
3799nolibc
3800Driver
3801
d9d16a19
JM
3802nostdlib
3803Driver
3804
fc2fb4fd
AO
3805nostdlib++
3806Driver
3807
d185d268 3808o
d5478783 3809Common Driver Joined Separate Var(asm_file_name) MissingArgError(missing filename after %qs)
a7b2e184 3810-o <file> Place output into <file>.
d185d268
NB
3811
3812p
50431bc4 3813Common Var(profile_flag)
a7b2e184 3814Enable function profiling.
d185d268 3815
603349bf
JM
3816pass-exit-codes
3817Driver Var(pass_exit_codes)
3818
d185d268 3819pedantic
c1771a20 3820Common Alias(Wpedantic)
d185d268
NB
3821
3822pedantic-errors
d5478783 3823Common Var(flag_pedantic_errors)
0acac6c4 3824Like -pedantic but issue errors instead of warnings.
d185d268 3825
d9d16a19
JM
3826pg
3827Driver
3828
603349bf
JM
3829pipe
3830Driver Var(use_pipes)
3831
3832print-file-name=
3833Driver JoinedOrMissing Var(print_file_name)
3834
3835print-libgcc-file-name
3836Driver
3837
3838print-multi-directory
3839Driver Var(print_multi_directory)
3840
3841print-multi-lib
3842Driver Var(print_multi_lib)
3843
3844print-multi-os-directory
3845Driver Var(print_multi_os_directory)
a7b2e184 3846
e0cdc09f
MK
3847print-multiarch
3848Driver Var(print_multiarch)
603349bf
JM
3849
3850print-prog-name=
3851Driver JoinedOrMissing Var(print_prog_name)
3852
3853print-search-dirs
3854Driver Var(print_search_dirs)
3855
3856print-sysroot
3857Driver Var(print_sysroot)
3858
3859print-sysroot-headers-suffix
3860Driver Var(print_sysroot_headers_suffix)
3861
d7b42618 3862quiet
603349bf 3863Common Var(quiet_flag) RejectDriver
a7b2e184 3864Do not display functions compiled or elapsed time.
d7b42618 3865
dd9f93dc
JM
3866r
3867Driver
3868
3869s
3870Driver
3871
603349bf
JM
3872save-temps
3873Driver
3874
3875save-temps=
3876Driver Joined
3877
dd9f93dc
JM
3878t
3879Driver
3880
603349bf
JM
3881time
3882Driver Var(report_times)
3883
3884time=
3885Driver JoinedOrMissing
3886
e200444e
JM
3887u
3888Driver Joined Separate
3889
5642f5d5
JM
3890undef
3891Driver
3892; C option, but driver must not handle as "-u ndef".
3893
603349bf 3894v
d5478783 3895Common Driver Var(verbose_flag)
a7b2e184 3896Enable verbose output.
603349bf 3897
d185d268 3898version
603349bf 3899Common Var(version_flag) RejectDriver
a7b2e184 3900Display the compiler's version.
d185d268
NB
3901
3902w
50431bc4 3903Common Var(inhibit_warnings)
a7b2e184 3904Suppress warnings.
d185d268 3905
603349bf
JM
3906wrapper
3907Driver Separate Var(wrapper_string)
3908
3909x
3910Driver Joined Separate
3911
528dc603 3912shared
b4fed890 3913Driver RejectNegative Negative(static-pie)
a7b2e184 3914Create a shared library.
528dc603 3915
603349bf
JM
3916shared-libgcc
3917Driver
3918
3919specs
5de8299c 3920Driver Separate Alias(specs=)
603349bf
JM
3921
3922specs=
3923Driver Joined
3924
d9d16a19
JM
3925static
3926Driver
3927
603349bf
JM
3928static-libgcc
3929Driver
3930
3931static-libgfortran
3932Driver
3933; Documented for Fortran, but always accepted by driver.
3934
86ff23c9
JL
3935static-libgcobol
3936Driver
3937; Documented for COBOL, but always accepted by driver.
3938
dd77b049
IS
3939static-libgm2
3940Driver
3941; Documented for Modula-2, but always accepted by driver.
3942
185b307b
IB
3943static-libphobos
3944Driver
3945; Documented for D, but always accepted by driver.
3946
745be54b
JJ
3947static-libquadmath
3948Driver
3949; Documented for Fortran, but always accepted by driver.
3950
603349bf
JM
3951static-libstdc++
3952Driver
3953
7a938933
ILT
3954static-libgo
3955Driver
3956; Documented for Go, but always accepted by driver.
3957
7e8d1b2d
L
3958static-libasan
3959Driver
3960
3bd87832
MM
3961static-libhwasan
3962Driver
3963
32b4b7f5
DV
3964static-libtsan
3965Driver
3966
9065ada9
JJ
3967static-liblsan
3968Driver
3969
de5a5fa1
MP
3970static-libubsan
3971Driver
3972
e200444e
JM
3973symbolic
3974Driver
3975
428b3812 3976no-pie
5460e1fc 3977Driver RejectNegative Negative(shared)
b4fed890 3978Don't create a dynamically linked position independent executable.
428b3812
L
3979
3980pie
3981Driver RejectNegative Negative(no-pie)
b4fed890
L
3982Create a dynamically linked position independent executable.
3983
3984static-pie
3985Driver RejectNegative Negative(pie)
3986Create a static position independent executable.
528dc603 3987
6d721f67
JM
3988z
3989Driver Joined Separate
3990
1e288103 3991fipa-ra
eece52b5 3992Common Var(flag_ipa_ra) Optimization
a7b2e184 3993Use caller save register across calls if possible.
d996e61a 3994
98914f9e
JL
3995fext-dce
3996Common Var(flag_ext_dce, 1) Optimization Init(0)
3997Perform dead code elimination on zero and sign extensions with special dataflow analysis.
3998
d7b42618 3999; This comment is to ensure we retain the blank line above.