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