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