gcc/gcc
Martin Liska 811c7fbd14 Support --compress-debug-sections for ld.mold.
gcc/ChangeLog:

	* configure.ac: Enable compressed debug sections for mold
	linker.
	* configure: Regenerate.
2022-04-21 10:18:15 +02:00
..
ada Daily bump. 2022-03-25 00:17:18 +00:00
analyzer Daily bump. 2022-04-15 00:16:48 +00:00
c Daily bump. 2022-04-09 00:16:56 +00:00
c-family Daily bump. 2022-04-12 00:16:37 +00:00
common IBM zSystems: Add support for z16 as CPU name. 2022-04-12 07:58:57 +02:00
config sparc: Preserve ORIGINAL_REGNO in epilogue_renumber [PR105257] 2022-04-19 18:58:59 +02:00
cp Daily bump. 2022-04-21 00:16:32 +00:00
d Daily bump. 2022-04-14 00:16:40 +00:00
doc doc/install.texi: CRIS: Remove gone websites. Adjust CRIS targets 2022-04-19 00:30:43 +02:00
fortran Daily bump. 2022-04-14 00:16:40 +00:00
ginclude
go runtime: use correct field name for PPC32 GLIBC registers 2022-04-20 17:49:44 -07:00
jit Daily bump. 2022-04-15 00:16:48 +00:00
lto Daily bump. 2022-03-24 00:16:44 +00:00
objc
objcp
po Daily bump. 2022-04-15 00:16:48 +00:00
rtl-ssa rtl-ssa: Fix prev/next_def confusion [PR104869] 2022-03-21 10:51:56 +00:00
testsuite emit-rtl: Fix -fcompare-debug bug with label references in debug insns [PR105203] 2022-04-21 09:43:30 +02:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
adjust-alignment.cc
alias.cc rtl-optimization/104498: Fix comparing symbol reference 2022-02-21 09:41:53 +00:00
alias.h
align.h
alloc-pool.cc
alloc-pool.h
array-traits.h
asan.cc asan: Mark instrumented vars addressable [PR102656] 2022-02-19 09:03:57 +01:00
asan.h
attr-fnspec.h
attribs.cc attribs: Restrict decl_attributes DECL_FUNCTION_SPECIFIC_TARGET changes to targets that care about target attributes/pragmas [PR105234] 2022-04-13 10:12:56 +02:00
attribs.h
auto-inc-dec.cc
auto-profile.cc AutoFDO: Don't try to promote indirect calls that result in recursive direct calls 2022-02-09 23:33:10 -08:00
auto-profile.h
backend.h
BASE-VER
basic-block.h
bb-reorder.cc
bb-reorder.h
bitmap.cc
bitmap.h
btfout.cc
builtin-attrs.def
builtin-types.def
builtins.cc builtins: Fix up expand_builtin_int_roundingfn_2 [PR105211] 2022-04-12 09:16:06 +02:00
builtins.def
builtins.h PR tree-optimization/98335: Improvements to DSE's compute_trims. 2022-03-11 17:51:18 +00:00
caller-save.cc
calls.cc PR middle-end/104885: Fix ICE with large stack frame on powerpc64. 2022-03-26 08:10:27 -10:00
calls.h
ccmp.cc
ccmp.h
cfg-flags.def
cfg.cc cfg: Dump goto_locus if -fdump-*-*-blocks-details 2022-03-02 10:48:55 +01:00
cfg.h
cfganal.cc Assert that backedges are available in path solver. 2022-02-03 14:06:45 +01:00
cfganal.h Assert that backedges are available in path solver. 2022-02-03 14:06:45 +01:00
cfgbuild.cc
cfgbuild.h
cfgcleanup.cc
cfgcleanup.h
cfgexpand.cc Restore INDIRECT_REF asm operand heuristic with MEM_REF 2022-03-09 15:56:23 +01:00
cfgexpand.h
cfghooks.cc
cfghooks.h
cfgloop.cc tree-optimization/104528 - free niter estimates after DSE 2022-02-14 14:31:06 +01:00
cfgloop.h
cfgloopanal.cc
cfgloopmanip.cc
cfgloopmanip.h
cfgrtl.cc cfgrtl: Fix up -g vs. -g0 code generation -flto differences in fixup_reorder_chain [PR104589] 2022-03-02 10:48:14 +01:00
cfgrtl.h
cgraph.cc cgraph: Fix up semantic_interposition handling [PR105306] 2022-04-20 09:24:18 +02:00
cgraph.h
cgraphbuild.cc
cgraphclones.cc cgraph: Fix up semantic_interposition handling [PR105306] 2022-04-20 09:24:18 +02:00
cgraphunit.cc Update semantic_interposition flag at analysis time 2022-04-09 21:22:58 +02:00
ChangeLog Daily bump. 2022-04-21 00:16:32 +00:00
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog-2021
ChangeLog.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
cif-code.def
collect2-aix.cc
collect2-aix.h
collect2.cc
collect2.h
collect-utils.cc
collect-utils.h
color-macros.h
combine-stack-adj.cc
combine.cc combine: Don't record for UNDO_MODE pointers into regno_reg_rtx array [PR104985] 2022-04-06 18:42:52 +02:00
common.md
common.opt --target-help: align with --help=target 2022-04-06 17:38:15 +02:00
compare-elim.cc
conditions.h
config.build
config.gcc IBM zSystems: Add support for z16 as CPU name. 2022-04-12 07:58:57 +02:00
config.host
config.in
configure Support --compress-debug-sections for ld.mold. 2022-04-21 10:18:15 +02:00
configure.ac Support --compress-debug-sections for ld.mold. 2022-04-21 10:18:15 +02:00
context.cc
context.h
convert.cc
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coroutine-builtins.def
coroutine-passes.cc
coverage.cc
coverage.h
cppbuiltin.cc
cppbuiltin.h
cppdefault.cc
cppdefault.h
cprop.cc
cse.cc
cselib.cc
cselib.h
cstamp-h.in
ctfc.cc CTF for extern variable fix [PR105089] 2022-04-14 10:03:52 -07:00
ctfc.h CTF for extern variable fix [PR105089] 2022-04-14 10:03:52 -07:00
ctfout.cc CTF for extern variable fix [PR105089] 2022-04-14 10:03:52 -07:00
data-streamer-in.cc
data-streamer-out.cc
data-streamer.cc
data-streamer.h
DATESTAMP Daily bump. 2022-04-21 00:16:32 +00:00
dbgcnt.cc
dbgcnt.def
dbgcnt.h
dbxout.cc
dbxout.h
dce.cc
dce.h
ddg.cc
ddg.h
debug.cc
debug.h
defaults.h
DEV-PHASE
df-core.cc
df-problems.cc
df-scan.cc df: Don't set bbs dirty because of debug insn moves [PR104459] 2022-02-11 11:21:24 +01:00
df.h
dfp.cc
dfp.h
diagnostic-color.cc
diagnostic-color.h
diagnostic-core.h
diagnostic-event-id.h
diagnostic-format-json.cc
diagnostic-metadata.h
diagnostic-path.h
diagnostic-show-locus.cc
diagnostic-spec.cc
diagnostic-spec.h
diagnostic-url.h
diagnostic.cc selftest: Move C-specific tests to c_family 2022-03-19 14:29:43 -04:00
diagnostic.def
diagnostic.h
digraph.cc
digraph.h
dojump.cc
dojump.h
dominance.cc
dominance.h
domwalk.cc
domwalk.h
double-int.cc
double-int.h
dse.cc
dump-context.h
dumpfile.cc
dumpfile.h
dwarf2asm.cc
dwarf2asm.h
dwarf2cfi.cc Cope with NULL dw_cfi_cfa_loc 2022-02-24 22:03:34 -03:00
dwarf2ctf.cc CTF for extern variable fix [PR105089] 2022-04-14 10:03:52 -07:00
dwarf2ctf.h
dwarf2out.cc dwarf2out: Don't call expand_expr during early_dwarf [PR104407] 2022-02-09 15:17:52 +01:00
dwarf2out.h
early-remat.cc
edit-context.cc
edit-context.h
emit-rtl.cc emit-rtl: Fix -fcompare-debug bug with label references in debug insns [PR105203] 2022-04-21 09:43:30 +02:00
emit-rtl.h
errors.cc
errors.h
escaped_string.h
et-forest.cc
et-forest.h
except.cc
except.h
exec-tool.in
explow.cc
explow.h
expmed.cc PR middle-end/80270: ICE in extract_bit_field_1 2022-02-28 22:26:43 +00:00
expmed.h
expr.cc Revert commit r12-5852-g50e8b0c9bca6cdc57804f860ec5311b641753fbb 2022-02-24 22:16:56 -03:00
expr.h
fibonacci_heap.cc
fibonacci_heap.h
file-find.cc
file-find.h
file-prefix-map.cc
file-prefix-map.h
final.cc
fixed-value.cc
fixed-value.h
flag-types.h aarch64: Add compiler support for Shadow Call Stack 2022-02-21 20:01:14 +00:00
flags.h
fold-const-call.cc
fold-const-call.h
fold-const.cc tree-optimization/105250 - adjust fold_convertible_p PR105140 fix 2022-04-13 09:55:56 +02:00
fold-const.h Implement constant-folding simplifications of reductions. 2022-02-22 12:32:22 +00:00
fp-test.cc
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function-abi.cc
function-abi.h
function-tests.cc
function.cc Add an assertion: the zeroed_hardregs set is a subset of all call used regs. 2022-04-01 16:09:43 +00:00
function.h
fwprop.cc
gcc-ar.cc
gcc-main.cc
gcc-plugin.h
gcc-rich-location.cc
gcc-rich-location.h
gcc-symtab.h
gcc.cc --target-help: align with --help=target 2022-04-06 17:38:15 +02:00
gcc.h
gcov-counter.def
gcov-dump.cc
gcov-io.cc gcov: Reword comment for gcov_read_string() 2022-03-31 08:12:43 +02:00
gcov-io.h
gcov-tool.cc
gcov.cc
gcse-common.cc
gcse-common.h
gcse.cc
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk
genattr-common.cc
genattr.cc
genattrtab.cc
genautomata.cc
gencfn-macros.cc
gencheck.cc
genchecksum.cc
gencodes.cc
genconditions.cc
genconfig.cc
genconstants.cc
genemit.cc
genenums.cc
generic-match-head.cc
generic-match.h
genextract.cc
genflags.cc
gengenrtl.cc
gengtype-lex.l
gengtype-parse.cc
gengtype-state.cc
gengtype.cc
gengtype.h
genhooks.cc
genmatch.cc middle-end/104644 - recursion with bswap match.pd pattern 2022-02-23 13:51:43 +01:00
genmddeps.cc
genmddump.cc
genmodes.cc arm: Implement MVE predicates as vectors of booleans 2022-02-22 15:55:07 +00:00
genmultilib
genopinit.cc
genoutput.cc
genpeep.cc
genpreds.cc
genrecog.cc
gensupport.cc
gensupport.h
gentarget-def.cc
genversion.cc
ggc-common.cc
ggc-internal.h
ggc-none.cc
ggc-page.cc
ggc-tests.cc
ggc.h
gimple-array-bounds.cc Enable pointer_query caching in -Warray-bounds. 2022-02-03 13:58:28 -07:00
gimple-array-bounds.h Enable pointer_query caching in -Warray-bounds. 2022-02-03 13:58:28 -07:00
gimple-builder.cc
gimple-builder.h
gimple-expr.cc rtl-optimization/105091 - wrong DSE with missed TREE_ADDRESSABLE 2022-03-31 09:18:42 +02:00
gimple-expr.h
gimple-fold.cc c++: Handle __builtin_clear_padding on non-trivially-copyable types [PR102586] 2022-04-07 09:14:07 +02:00
gimple-fold.h tree-optimization/105142 - wrong code with maybe_fold_{and,or}_comparisons 2022-04-06 08:14:32 +02:00
gimple-harden-conditionals.cc hardened conditionals: drop copied identifiers 2022-03-24 10:02:29 -03:00
gimple-if-to-switch.cc
gimple-isel.cc tree-optimization/105312 - fix ISEL VCOND expansion 2022-04-20 13:27:24 +02:00
gimple-iterator.cc
gimple-iterator.h
gimple-laddress.cc
gimple-loop-interchange.cc
gimple-loop-jam.cc tree-optimization/104543 - fix unroll-and-jam precondition 2022-02-15 13:22:15 +01:00
gimple-loop-versioning.cc
gimple-low.cc
gimple-low.h
gimple-match-head.cc Performance/size improvement to single_use when matching GIMPLE. 2022-03-16 09:27:33 +00:00
gimple-match.h
gimple-predicate-analysis.cc
gimple-predicate-analysis.h
gimple-predict.h
gimple-pretty-print.cc
gimple-pretty-print.h
gimple-range-cache.cc Always use dominators in the cache when available. 2022-03-17 16:43:21 -04:00
gimple-range-cache.h Register non-null side effects properly. 2022-02-09 09:09:54 -05:00
gimple-range-edge.cc
gimple-range-edge.h
gimple-range-fold.cc ranger: Fix up REALPART_EXPR/IMAGPART_EXPR handling [PR104604] 2022-02-22 10:43:13 +01:00
gimple-range-fold.h
gimple-range-gori.cc Fix up duplicated duplicated words in comments 2022-03-07 15:00:20 +01:00
gimple-range-gori.h Use GORI to evaluate arguments of a COND_EXPR. 2022-02-15 17:03:27 -05:00
gimple-range-path.cc Register non-null side effects properly. 2022-02-09 09:09:54 -05:00
gimple-range-path.h
gimple-range-tests.cc
gimple-range-trace.cc
gimple-range-trace.h
gimple-range.cc Register non-null side effects properly. 2022-02-09 09:09:54 -05:00
gimple-range.h Register non-null side effects properly. 2022-02-09 09:09:54 -05:00
gimple-ssa-backprop.cc
gimple-ssa-evrp-analyze.cc
gimple-ssa-evrp-analyze.h
gimple-ssa-evrp.cc
gimple-ssa-isolate-paths.cc
gimple-ssa-nonnull-compare.cc
gimple-ssa-split-paths.cc
gimple-ssa-sprintf.cc Constrain conservative string lengths to array sizes [PR104119]. 2022-02-03 13:27:16 -07:00
gimple-ssa-store-merging.cc store-merging: Avoid ICEs on roughly ~0ULL/8 sized stores [PR105094] 2022-03-30 10:21:16 +02:00
gimple-ssa-strength-reduction.cc
gimple-ssa-warn-access.cc Avoid -Wdangling-pointer for by-transparent-reference arguments [PR104436]. 2022-03-14 18:26:05 -06:00
gimple-ssa-warn-access.h
gimple-ssa-warn-alloca.cc
gimple-ssa-warn-restrict.cc Enable pointer_query caching in -Wrestrict. 2022-02-03 13:59:39 -07:00
gimple-ssa-warn-restrict.h Enable pointer_query caching in -Wrestrict. 2022-02-03 13:59:39 -07:00
gimple-ssa.h
gimple-streamer-in.cc
gimple-streamer-out.cc
gimple-streamer.h
gimple-walk.cc
gimple-walk.h
gimple-warn-recursion.cc warn-recursion: Don't warn for __builtin_calls in gnu_inline extern inline functions [PR104633] 2022-02-23 12:03:55 +01:00
gimple.cc gimple.cc: Follow-up to adjust gimple_call_builtin_p and gimple_call_combined_fn [PR105150] 2022-04-06 16:47:47 +02:00
gimple.def
gimple.h Add CLOBBER_EOL to mark storage end-of-life clobbers 2022-02-04 08:16:50 +01:00
gimplify-me.cc
gimplify-me.h
gimplify.cc gimple: Wrong -Wimplicit-fallthrough with if(1) [PR103597] 2022-03-29 14:10:37 -04:00
gimplify.h
glimits.h
godump.cc -fgo-dump-spec: really name alignment field "_" 2022-02-09 09:39:03 -08:00
graph.cc
graph.h
graphds.cc
graphds.h
graphite-dependences.cc
graphite-isl-ast-to-gimple.cc
graphite-optimize-isl.cc
graphite-poly.cc
graphite-scop-detection.cc
graphite-sese-to-poly.cc
graphite.cc
graphite.h
graphviz.cc
graphviz.h
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.cc
hard-reg-set.h
hash-map-tests.cc
hash-map-traits.h
hash-map.h
hash-set-tests.cc
hash-set.h
hash-table.cc
hash-table.h
hash-traits.h [PATCH] gcc: pass-manager: Fix memory leak. [PR jit/63854] 2022-03-19 13:43:02 -04:00
highlev-plugin-common.h
hooks.cc
hooks.h
host-default.cc
hosthooks-def.h
hosthooks.h
hw-doloop.cc
hw-doloop.h
hwint.cc
hwint.h
ifcvt.cc ifcvt: Punt if not onlyjump_p for find_if_case_{1,2} [PR104814] 2022-03-15 09:12:03 +01:00
ifcvt.h
inchash.cc
inchash.h
incpath.cc
incpath.h
init-regs.cc
input.cc
input.h
insn-addr.h
insn-notes.def
int-vector-builder.h
internal-fn.cc Fix up duplicated duplicated words in comments 2022-03-07 15:00:20 +01:00
internal-fn.def
internal-fn.h
intl.cc
intl.h
ipa-comdats.cc
ipa-cp.cc ipa: Careful processing ANCESTOR jump functions and NULL pointers (PR 103083) 2022-03-31 17:24:22 +02:00
ipa-devirt.cc
ipa-fnsummary.cc ipa/104303 - miscompilation of gnatmake 2022-04-07 15:03:36 +02:00
ipa-fnsummary.h
ipa-free-lang-data.cc ipa: fix comment typos 2022-04-11 17:40:41 -04:00
ipa-icf-gimple.cc
ipa-icf-gimple.h
ipa-icf.cc
ipa-icf.h
ipa-inline-analysis.cc
ipa-inline-transform.cc
ipa-inline.cc
ipa-inline.h
ipa-modref-tree.cc Fix overflows in ipa-modref-tree.cc 2022-04-20 11:00:33 +02:00
ipa-modref-tree.h modref: Comment spelling fixes 2022-03-02 10:25:25 +01:00
ipa-modref.cc Propagate nondeterministic and side_effects flags in modref summary after inlining 2022-04-09 21:07:07 +02:00
ipa-modref.h modref: Comment spelling fixes 2022-03-02 10:25:25 +01:00
ipa-param-manipulation.cc
ipa-param-manipulation.h
ipa-polymorphic-call.cc Fix up duplicated duplicated words in comments 2022-03-07 15:00:20 +01:00
ipa-predicate.cc
ipa-predicate.h
ipa-profile.cc
ipa-prop.cc ipa: Careful processing ANCESTOR jump functions and NULL pointers (PR 103083) 2022-03-31 17:24:22 +02:00
ipa-prop.h ipa: Careful processing ANCESTOR jump functions and NULL pointers (PR 103083) 2022-03-31 17:24:22 +02:00
ipa-pure-const.cc
ipa-ref.cc
ipa-ref.h
ipa-reference.cc
ipa-reference.h
ipa-split.cc
ipa-sra.cc Fix up duplicated duplicated words in comments 2022-03-07 15:00:20 +01:00
ipa-utils.cc
ipa-utils.h
ipa-visibility.cc
ipa.cc
ira-build.cc
ira-color.cc rtl-optimization/105028 - fix compile-time hog in form_threads_from_copies 2022-03-23 15:57:33 +01:00
ira-conflicts.cc
ira-costs.cc
ira-emit.cc
ira-int.h rtl-optimization/104686 - speed up conflict iteration 2022-02-28 08:02:49 +01:00
ira-lives.cc
ira.cc
ira.h
is-a.h
iterator-utils.h
json.cc
json.h
jump.cc
langhooks-def.h c++: Handle __builtin_clear_padding on non-trivially-copyable types [PR102586] 2022-04-07 09:14:07 +02:00
langhooks.cc
langhooks.h c++: Handle __builtin_clear_padding on non-trivially-copyable types [PR102586] 2022-04-07 09:14:07 +02:00
LANGUAGES
lcm.cc
lcm.h
libfuncs.h
limitx.h
limity.h
lists.cc
lock-and-run.sh
loop-doloop.cc
loop-init.cc
loop-invariant.cc
loop-iv.cc
loop-unroll.cc
loop-unroll.h
lower-subreg.cc
lower-subreg.h
lra-assigns.cc [PR105032] LRA: modify loop condition to find reload insns for hard reg splitting 2022-03-30 13:10:45 -04:00
lra-coalesce.cc
lra-constraints.cc [PR103074] LRA: Check new conflicts when splitting hard reg live range. 2022-03-10 16:16:49 -05:00
lra-eliminations.cc
lra-int.h
lra-lives.cc [PR104971] LRA: check live hard regs to remove a dead insn 2022-03-25 12:30:54 -04:00
lra-remat.cc
lra-spills.cc
lra.cc lra: Fix up debug_p handling in lra_substitute_pseudo [PR104778] 2022-03-14 14:49:09 +01:00
lra.h
lto-cgraph.cc
lto-compress.cc
lto-compress.h
lto-opts.cc
lto-section-in.cc
lto-section-names.h
lto-section-out.cc
lto-streamer-in.cc
lto-streamer-out.cc
lto-streamer.cc
lto-streamer.h
lto-wrapper.cc
machmode.def arm: Implement MVE predicates as vectors of booleans 2022-02-22 15:55:07 +00:00
machmode.h
main.cc Fix error recovery in toplev::finalize. 2022-02-28 13:58:41 +01:00
Makefile.in
match.pd Some minor HONOR_NANS improvements to match.pd 2022-03-16 09:25:34 +00:00
mcf.cc
mem-stats-traits.h
mem-stats.h
memmodel.h
memory-block.cc
memory-block.h
mkconfig.sh
mode-classes.def
mode-switching.cc
modulo-sched.cc
multiple_target.cc ipa: Improve error handling for target_clone single value 2022-03-01 10:10:29 +01:00
mux-utils.h
obstack-utils.h
omp-builtins.def
omp-expand.cc
omp-expand.h
omp-general.cc Get rid of 'gcc/omp-oacc-neuter-broadcast.cc:oacc_build_component_ref' 2022-02-22 17:53:10 +01:00
omp-general.h Get rid of 'gcc/omp-oacc-neuter-broadcast.cc:oacc_build_component_ref' 2022-02-22 17:53:10 +01:00
omp-low.cc OpenMP: Fix nested use_device_ptr 2022-04-05 08:31:34 -07:00
omp-low.h
omp-oacc-kernels-decompose.cc OpenACC 'kernels' decomposition: resolve wrong-code cases unless manually making certain variables addressable [PR100280, PR104892] 2022-03-12 15:37:27 +01:00
omp-oacc-neuter-broadcast.cc Get rid of 'gcc/omp-oacc-neuter-broadcast.cc:oacc_build_component_ref' 2022-02-22 17:53:10 +01:00
omp-offload.cc
omp-offload.h
omp-simd-clone.cc
omp-simd-clone.h
ONEWS
opt-functions.awk options: Improve 'LangEnabledBy' option property diagnostics 2022-03-30 08:58:00 +02:00
opt-gather.awk
opt-include.awk
opt-problem.cc selftest: Move C-specific tests to c_family 2022-03-19 14:29:43 -04:00
opt-problem.h
opt-read.awk
opt-suggestions.cc
opt-suggestions.h
optabs-libfuncs.cc
optabs-libfuncs.h
optabs-query.cc vect: fix out-of-bound access in supports_vec_convert_optab_p [PR 104851] 2022-03-09 17:27:23 +08:00
optabs-query.h tree-optimization/104445 - check for vector extraction support 2022-02-09 14:03:31 +01:00
optabs-tree.cc
optabs-tree.h
optabs.cc
optabs.def
optabs.h
optc-gen.awk options: Fix "Multiple different help strings" error diagnostic 2022-03-31 20:29:35 +02:00
optc-save-gen.awk
opth-gen.awk
optinfo-emit-json.cc
optinfo-emit-json.h
optinfo.cc
optinfo.h
opts-common.cc
opts-diagnostic.h
opts-global.cc
opts.cc --target-help: align with --help=target 2022-04-06 17:38:15 +02:00
opts.h
ordered-hash-map-tests.cc
ordered-hash-map.h
output.h
params.opt Allow (void *) 0xdeadbeef accesses without warnings [PR99578] 2022-03-18 19:02:19 +01:00
pass_manager.h [PATCH] gcc: pass-manager: Fix memory leak. [PR jit/63854] 2022-03-19 13:43:02 -04:00
passes.cc [PATCH] gcc: pass-manager: Fix memory leak. [PR jit/63854] 2022-03-19 13:43:02 -04:00
passes.def c/105151 - move early walloca pass 2022-04-05 09:54:46 +02:00
plugin.cc translation: small fixes 2022-03-07 11:03:58 +01:00
plugin.def
plugin.h
pointer-query.cc c++: -Wplacement-new and anon union member [PR100370] 2022-04-11 08:37:03 -04:00
pointer-query.h Use auto_vec for pointer_query cache for auto cleanup. 2022-02-03 19:47:04 -07:00
poly-int-types.h
poly-int.h
postreload-gcse.cc
postreload.cc
predict.cc
predict.def
predict.h
prefix.cc
prefix.h
pretty-print.cc
pretty-print.h
print-rtl-function.cc
print-rtl.cc
print-rtl.h
print-tree.cc print-tree:Avoid warnings of overflow 2022-03-22 13:39:40 +08:00
print-tree.h
profile-count.cc
profile-count.h
profile.cc
profile.h
range-op.cc Spelling fix - cannott -> cannot [PR104899] 2022-03-14 10:40:47 +01:00
range-op.h
range.cc
range.h
read-md.cc
read-md.h
read-rtl-function.cc
read-rtl-function.h
read-rtl.cc
README.Portability
real.cc
real.h
realmpfr.cc
realmpfr.h
recog.cc ecog: Return 1 from insn_invalid_p if REG_INC reg overlaps some stored reg [PR103775] 2022-03-26 16:21:36 +01:00
recog.h
ree.cc
reg-notes.def
reg-stack.cc
regcprop.cc Don't propagate for a more expensive reg-reg move. 2022-02-08 12:39:31 +08:00
regcprop.h
reginfo.cc libgccjit: Add support for register variables [PR104072] 2022-04-12 17:20:30 -04:00
regrename.cc
regrename.h
regs.h try multi-reg dest in default_zero_call_used_regs 2022-04-05 01:28:20 -03:00
regset.h
regstat.cc
reload1.cc
reload.cc reload: Adjust comment in find_reloads about subset, not intersection 2022-03-26 05:31:22 +01:00
reload.h
reorg.cc
resource.cc
resource.h
rtl-error.cc
rtl-error.h
rtl-iter.h
rtl-ssa.h
rtl-tests.cc
rtl.cc rtl: ICE with thread_local and inline asm [PR104777] 2022-03-08 14:00:32 -05:00
rtl.def
rtl.h libgccjit: Add support for register variables [PR104072] 2022-04-12 17:20:30 -04:00
rtlanal.cc
rtlanal.h
rtlhash.cc
rtlhash.h
rtlhooks-def.h
rtlhooks.cc
rtx-vector-builder.cc arm: Implement MVE predicates as vectors of booleans 2022-02-22 15:55:07 +00:00
rtx-vector-builder.h
run-rtl-passes.cc
run-rtl-passes.h
sancov.cc
sanitizer.def
sanopt.cc
sbitmap.cc
sbitmap.h
sched-deps.cc
sched-ebb.cc
sched-int.h
sched-rgn.cc
sel-sched-dump.cc
sel-sched-dump.h
sel-sched-ir.cc
sel-sched-ir.h
sel-sched.cc
sel-sched.h
selftest-diagnostic.cc
selftest-diagnostic.h
selftest-rtl.cc
selftest-rtl.h
selftest-run-tests.cc selftest: Move C-specific tests to c_family 2022-03-19 14:29:43 -04:00
selftest.cc
selftest.h selftest: Move C-specific tests to c_family 2022-03-19 14:29:43 -04:00
sese.cc
sese.h
shortest-paths.h
shrink-wrap.cc
shrink-wrap.h
signop.h
simplify-rtx.cc simplify-rtx: Don't assume shift count has the same mode as the shift [PR105247] 2022-04-14 13:47:34 +02:00
sort.cc
sparseset.cc
sparseset.h
spellcheck-tree.cc
spellcheck-tree.h
spellcheck.cc
spellcheck.h
splay-tree-utils.cc
splay-tree-utils.h
splay-tree-utils.tcc
sreal.cc
sreal.h
ssa-iterators.h
ssa.h
stab.def
stack-ptr-mod.cc
statistics.cc
statistics.h
stmt.cc
stmt.h
stor-layout.cc
stor-layout.h
store-motion.cc
streamer-hooks.cc
streamer-hooks.h
stringpool.cc
stringpool.h
substring-locations.cc
substring-locations.h
symbol-summary.h
symtab-clones.cc
symtab-clones.h
symtab-thunks.cc
symtab-thunks.h
symtab.cc
sync-builtins.def
system.h
target-def.h
target-globals.cc
target-globals.h
target-hooks-macros.h
target-insns.def
target.def Add an assertion: the zeroed_hardregs set is a subset of all call used regs. 2022-04-01 16:09:43 +00:00
target.h
targhooks.cc try multi-reg dest in default_zero_call_used_regs 2022-04-05 01:28:20 -03:00
targhooks.h
timevar.cc
timevar.def
timevar.h
toplev.cc libgccjit: Add support for register variables [PR104072] 2022-04-12 17:20:30 -04:00
toplev.h
tracer.cc
tracer.h
trans-mem.cc ipa/104303 - miscompilation of gnatmake 2022-04-07 15:03:36 +02:00
trans-mem.h
tree-affine.cc
tree-affine.h
tree-call-cdce.cc
tree-cfg.cc middle-end/104402 - split out _Complex compares from COND_EXPRs 2022-02-07 09:37:59 +01:00
tree-cfg.h
tree-cfgcleanup.cc
tree-cfgcleanup.h
tree-chrec.cc
tree-chrec.h
tree-complex.cc middle-end/105165 - sorry instead of ICE for _Complex asm goto 2022-04-07 08:17:05 +02:00
tree-core.h Add 'gcc/tree.cc:user_omp_clause_code_name' [PR65095] 2022-03-12 11:05:29 +01:00
tree-data-ref.cc
tree-data-ref.h vect: Simplify and extend the complex numbers validation routines. 2022-02-02 10:39:03 +00:00
tree-dfa.cc
tree-dfa.h
tree-diagnostic-path.cc
tree-diagnostic.cc
tree-diagnostic.h
tree-dump.cc
tree-dump.h
tree-eh.cc
tree-eh.h
tree-emutls.cc
tree-hash-traits.h
tree-hasher.h
tree-if-conv.cc tree-optimization/105012 - fix ICE from local DSE of if-conversion 2022-03-22 14:05:18 +01:00
tree-if-conv.h
tree-inline.cc Add CLOBBER_EOL to mark storage end-of-life clobbers 2022-02-04 08:16:50 +01:00
tree-inline.h
tree-into-ssa.cc
tree-into-ssa.h
tree-iterator.cc
tree-iterator.h
tree-loop-distribution.cc tree-optimization/104716 - check if we can copy loop in loop distribution 2022-03-01 15:24:31 +01:00
tree-nested.cc C, C++, Fortran, OpenMP: Add 'has_device_addr' clause to 'target' construct. 2022-02-09 23:47:12 -08:00
tree-nested.h
tree-nrv.cc debug/104337 - avoid messing with the abstract origin chain in NRV 2022-02-03 16:02:12 +01:00
tree-object-size.cc tree-optimization/104970: Limit size computation for access attribute 2022-03-24 15:04:31 +05:30
tree-object-size.h
tree-outof-ssa.cc
tree-outof-ssa.h
tree-parloops.cc
tree-parloops.h
tree-pass.h
tree-phinodes.cc
tree-phinodes.h
tree-predcom.cc tree-optimization/105198 - wrong code with predictive commoning 2022-04-08 14:18:31 +02:00
tree-pretty-print.cc C, C++, Fortran, OpenMP: Add 'has_device_addr' clause to 'target' construct. 2022-02-09 23:47:12 -08:00
tree-pretty-print.h
tree-profile.cc
tree-scalar-evolution.cc scev: Fix a comment typo 2022-04-13 09:47:45 +02:00
tree-scalar-evolution.h
tree-sra.cc
tree-sra.h
tree-ssa-address.cc
tree-ssa-address.h
tree-ssa-alias-compare.h
tree-ssa-alias.cc ipa/104303 - miscompilation of gnatmake 2022-04-07 15:03:36 +02:00
tree-ssa-alias.h ipa/104303 - miscompilation of gnatmake 2022-04-07 15:03:36 +02:00
tree-ssa-ccp.cc Add CLOBBER_EOL to mark storage end-of-life clobbers 2022-02-04 08:16:50 +01:00
tree-ssa-ccp.h
tree-ssa-coalesce.cc
tree-ssa-coalesce.h
tree-ssa-copy.cc
tree-ssa-dce.cc ipa/104303 - revert overly conservative DCE change 2022-04-12 16:43:08 +02:00
tree-ssa-dce.h
tree-ssa-dom.cc tree-optimization/102943 - avoid (re-)computing dominance bitmap 2022-03-10 13:40:25 +01:00
tree-ssa-dom.h
tree-ssa-dse.cc ipa/104303 - miscompilation of gnatmake 2022-04-07 15:03:36 +02:00
tree-ssa-dse.h
tree-ssa-forwprop.cc tree-optimization/104511 - avoid FP to DFP conversion for VEC_PACK_TRUNC 2022-02-14 11:26:06 +01:00
tree-ssa-ifcombine.cc tree-optimization/105142 - wrong code with maybe_fold_{and,or}_comparisons 2022-04-06 08:14:32 +02:00
tree-ssa-live.cc
tree-ssa-live.h
tree-ssa-loop-ch.cc Assert that backedges are available in path solver. 2022-02-03 14:06:45 +01:00
tree-ssa-loop-im.cc
tree-ssa-loop-ivcanon.cc
tree-ssa-loop-ivopts.cc tree-optimization/105148 - fix IVOPTs recording uses 2022-04-06 08:21:43 +02:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.cc
tree-ssa-loop-manip.h
tree-ssa-loop-niter.cc Dump when estimating the number of iterations of a loop 2022-03-21 09:41:45 +01:00
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.cc
tree-ssa-loop-split.cc
tree-ssa-loop-unswitch.cc
tree-ssa-loop.cc
tree-ssa-loop.h
tree-ssa-math-opts.cc tree-optimization/105235 - clean EH in execute_cse_conv_1 2022-04-12 11:48:30 +02:00
tree-ssa-math-opts.h
tree-ssa-operands.cc
tree-ssa-operands.h
tree-ssa-phiopt.cc phiopt: Fix up debug handling in the (x != cst1 ? x : cst2) != cst3 opt [PR105218] 2022-04-11 19:06:59 +02:00
tree-ssa-phiprop.cc
tree-ssa-pre.cc Simplify PRE fix 2022-02-28 12:23:22 +01:00
tree-ssa-propagate.cc Fix up duplicated duplicated words in comments 2022-03-07 15:00:20 +01:00
tree-ssa-propagate.h
tree-ssa-reassoc.cc tree-optimization/105263 - reassoc and DFP 2022-04-13 15:59:14 +02:00
tree-ssa-reassoc.h
tree-ssa-sccvn.cc tree-optimization/105185 - simplify modref query in SCCVN 2022-04-07 10:12:55 +02:00
tree-ssa-sccvn.h tree-optimization/103037 - PRE simplifying valueized expressions 2022-02-25 13:20:40 +01:00
tree-ssa-scopedtables.cc
tree-ssa-scopedtables.h
tree-ssa-sink.cc tree-optimization/104960 - unsplit edges after late sinking 2022-03-17 09:51:09 +01:00
tree-ssa-strlen.cc gimple.cc: Adjust gimple_call_builtin_p and gimple_call_combined_fn [PR105150] 2022-04-06 10:07:26 +02:00
tree-ssa-strlen.h Constrain conservative string lengths to array sizes [PR104119]. 2022-02-03 13:27:16 -07:00
tree-ssa-structalias.cc ipa/104303 - miscompilation of gnatmake 2022-04-07 15:03:36 +02:00
tree-ssa-tail-merge.cc
tree-ssa-ter.cc
tree-ssa-ter.h
tree-ssa-threadbackward.cc Assert that backedges are available in path solver. 2022-02-03 14:06:45 +01:00
tree-ssa-threadedge.cc
tree-ssa-threadedge.h
tree-ssa-threadupdate.cc
tree-ssa-threadupdate.h
tree-ssa-uncprop.cc
tree-ssa-uninit.cc Fix up duplicated duplicated words in comments 2022-03-07 15:00:20 +01:00
tree-ssa.cc tree-optimization/105109 - bogus uninit diagnostic with _Complex 2022-03-31 10:35:41 +02:00
tree-ssa.h tree-optimization/104528 - free niter estimates after DSE 2022-02-14 14:31:06 +01:00
tree-ssanames.cc
tree-ssanames.h
tree-stdarg.cc
tree-stdarg.h
tree-streamer-in.cc Add CLOBBER_EOL to mark storage end-of-life clobbers 2022-02-04 08:16:50 +01:00
tree-streamer-out.cc Add CLOBBER_EOL to mark storage end-of-life clobbers 2022-02-04 08:16:50 +01:00
tree-streamer.cc
tree-streamer.h
tree-switch-conversion.cc tree-optimization/105070 - annotate bit cluster tests with locations 2022-03-28 11:34:06 +02:00
tree-switch-conversion.h tree-optimization/105070 - annotate bit cluster tests with locations 2022-03-28 11:34:06 +02:00
tree-tailcall.cc
tree-vect-data-refs.cc
tree-vect-generic.cc tree-optimization/105175 - avoid -Wvector-operation-performance 2022-04-08 08:34:06 +02:00
tree-vect-loop-manip.cc tree-optimization/104912 - ensure cost model is checked first 2022-04-20 13:28:08 +02:00
tree-vect-loop.cc tree-optimization/105053 - fix reduction chain epilogue generation 2022-03-25 15:26:29 +01:00
tree-vect-patterns.cc Restrict the two sources of vect_recog_cond_expr_convert_pattern to be of the same type when convert is extension. 2022-02-17 18:58:22 +08:00
tree-vect-slp-patterns.cc vect: Simplify and extend the complex numbers validation routines. 2022-02-02 10:39:03 +00:00
tree-vect-slp.cc tree-optimization/104010 - fix SLP scalar costing with patterns 2022-04-19 16:42:04 +02:00
tree-vect-stmts.cc middle-end: Prevent the use of the cond inversion detection code when both conditions are external. [PR105197] 2022-04-11 15:09:05 +01:00
tree-vector-builder.cc
tree-vector-builder.h
tree-vectorizer.cc tree-optimization/104582 - make SLP node available in vector cost hook 2022-02-22 07:48:38 +01:00
tree-vectorizer.h tree-optimization/104582 - make SLP node available in vector cost hook 2022-02-22 07:48:38 +01:00
tree-vrp.cc Register non-null side effects properly. 2022-02-09 09:09:54 -05:00
tree-vrp.h
tree.cc tree.cc: Use useless_type_conversion_p in tree_builtin_call_types_compatible_p while in gimple form [PR105253] 2022-04-13 15:44:51 +02:00
tree.def
tree.h libgccjit: Add support for bitcasts [PR104071] 2022-04-12 17:17:50 -04:00
treestruct.def
tristate.cc
tristate.h
tsan.cc
tsan.h
tsystem.h
typeclass.h
typed-splay-tree.cc
typed-splay-tree.h
ubsan.cc ubsan: Fix ICE due to -fsanitize=object-size [PR105093] 2022-03-30 10:49:47 +02:00
ubsan.h
valtrack.cc valtrack: Avoid creating raw SUBREGs with VOIDmode argument [PR104557] 2022-02-17 11:14:38 +01:00
valtrack.h
value-pointer-equiv.cc
value-pointer-equiv.h
value-prof.cc gcov-profile: Allow negative counts of indirect calls [PR105282] 2022-04-19 20:06:47 +01:00
value-prof.h
value-query.cc
value-query.h
value-range-equiv.cc
value-range-equiv.h
value-range.cc
value-range.h
value-relation.cc
value-relation.h Fix up duplicated duplicated words in comments 2022-03-07 15:00:20 +01:00
var-tracking.cc
varasm.cc Fix up duplicated duplicated words in comments 2022-03-07 15:00:20 +01:00
varasm.h
varpool.cc
vec-perm-indices.cc
vec-perm-indices.h
vec.cc
vec.h
vector-builder.h
vmsdbg.h
vmsdbgout.cc
vr-values.cc Fix memory leaks 2022-03-24 11:16:10 +01:00
vr-values.h
vtable-verify.cc
vtable-verify.h
warning-control.cc warning-control: Comment spelling fix 2022-02-25 11:00:39 +01:00
web.cc
wide-int-bitmask.h
wide-int-print.cc
wide-int-print.h
wide-int.cc
wide-int.h
xcoff.h
xcoffout.cc
xcoffout.h

Copyright (C) 2000-2022 Free Software Foundation, Inc.

This file is intended to contain a few notes about writing C code
within GCC so that it compiles without error on the full range of
compilers GCC needs to be able to compile on.

The problem is that many ISO-standard constructs are not accepted by
either old or buggy compilers, and we keep getting bitten by them.
This knowledge until now has been sparsely spread around, so I
thought I'd collect it in one useful place.  Please add and correct
any problems as you come across them.

I'm going to start from a base of the ISO C90 standard, since that is
probably what most people code to naturally.  Obviously using
constructs introduced after that is not a good idea.

For the complete coding style conventions used in GCC, please read
http://gcc.gnu.org/codingconventions.html


String literals
---------------

Some compilers like MSVC++ have fairly low limits on the maximum
length of a string literal; 509 is the lowest we've come across.  You
may need to break up a long printf statement into many smaller ones.


Empty macro arguments
---------------------

ISO C (6.8.3 in the 1990 standard) specifies the following:

If (before argument substitution) any argument consists of no
preprocessing tokens, the behavior is undefined.

This was relaxed by ISO C99, but some older compilers emit an error,
so code like

#define foo(x, y) x y
foo (bar, )

needs to be coded in some other way.


Avoid unnecessary test before free
----------------------------------

Since SunOS 4 stopped being a reasonable portability target,
(which happened around 2007) there has been no need to guard
against "free (NULL)".  Thus, any guard like the following
constitutes a redundant test:

  if (P)
    free (P);

It is better to avoid the test.[*]
Instead, simply free P, regardless of whether it is NULL.

[*] However, if your profiling exposes a test like this in a
performance-critical loop, say where P is nearly always NULL, and
the cost of calling free on a NULL pointer would be prohibitively
high, consider using __builtin_expect, e.g., like this:

  if (__builtin_expect (ptr != NULL, 0))
    free (ptr);



Trigraphs
---------

You weren't going to use them anyway, but some otherwise ISO C
compliant compilers do not accept trigraphs.


Suffixes on Integer Constants
-----------------------------

You should never use a 'l' suffix on integer constants ('L' is fine),
since it can easily be confused with the number '1'.


			Common Coding Pitfalls
			======================

errno
-----

errno might be declared as a macro.


Implicit int
------------

In C, the 'int' keyword can often be omitted from type declarations.
For instance, you can write

  unsigned variable;

as shorthand for

  unsigned int variable;

There are several places where this can cause trouble.  First, suppose
'variable' is a long; then you might think

  (unsigned) variable

would convert it to unsigned long.  It does not.  It converts to
unsigned int.  This mostly causes problems on 64-bit platforms, where
long and int are not the same size.

Second, if you write a function definition with no return type at
all:

  operate (int a, int b)
  {
    ...
  }

that function is expected to return int, *not* void.  GCC will warn
about this.

Implicit function declarations always have return type int.  So if you
correct the above definition to

  void
  operate (int a, int b)
  ...

but operate() is called above its definition, you will get an error
about a "type mismatch with previous implicit declaration".  The cure
is to prototype all functions at the top of the file, or in an
appropriate header.

Char vs unsigned char vs int
----------------------------

In C, unqualified 'char' may be either signed or unsigned; it is the
implementation's choice.  When you are processing 7-bit ASCII, it does
not matter.  But when your program must handle arbitrary binary data,
or fully 8-bit character sets, you have a problem.  The most obvious
issue is if you have a look-up table indexed by characters.

For instance, the character '\341' in ISO Latin 1 is SMALL LETTER A
WITH ACUTE ACCENT.  In the proper locale, isalpha('\341') will be
true.  But if you read '\341' from a file and store it in a plain
char, isalpha(c) may look up character 225, or it may look up
character -31.  And the ctype table has no entry at offset -31, so
your program will crash.  (If you're lucky.)

It is wise to use unsigned char everywhere you possibly can.  This
avoids all these problems.  Unfortunately, the routines in <string.h>
take plain char arguments, so you have to remember to cast them back
and forth - or avoid the use of strxxx() functions, which is probably
a good idea anyway.

Another common mistake is to use either char or unsigned char to
receive the result of getc() or related stdio functions.  They may
return EOF, which is outside the range of values representable by
char.  If you use char, some legal character value may be confused
with EOF, such as '\377' (SMALL LETTER Y WITH UMLAUT, in Latin-1).
The correct choice is int.

A more subtle version of the same mistake might look like this:

  unsigned char pushback[NPUSHBACK];
  int pbidx;
  #define unget(c) (assert(pbidx < NPUSHBACK), pushback[pbidx++] = (c))
  #define get(c) (pbidx ? pushback[--pbidx] : getchar())
  ...
  unget(EOF);

which will mysteriously turn a pushed-back EOF into a SMALL LETTER Y
WITH UMLAUT.


Other common pitfalls
---------------------

o Expecting 'plain' char to be either sign or unsigned extending.

o Shifting an item by a negative amount or by greater than or equal to
  the number of bits in a type (expecting shifts by 32 to be sensible
  has caused quite a number of bugs at least in the early days).

o Expecting ints shifted right to be sign extended.

o Modifying the same value twice within one sequence point.

o Host vs. target floating point representation, including emitting NaNs
  and Infinities in a form that the assembler handles.

o qsort being an unstable sort function (unstable in the sense that
  multiple items that sort the same may be sorted in different orders
  by different qsort functions).

o Passing incorrect types to fprintf and friends.

o Adding a function declaration for a module declared in another file to
  a .c file instead of to a .h file.