8sa1-gcc/gcc
Iain Buclaw 8e84a14291 d: Update language attribute support, and implement gcc.attributes
D attribute support has been updated to have a baseline parity with the
LLVM D compiler's own `ldc.attributes'.

The handler that extracts GCC attributes from a list of UDAs has been
improved to take care of some mistakes that could have been warnings.
UDAs attached to field variables are also now processed for any GCC
attributes attached to them.

The following new attributes have been added to the D front-end:

 - @attribute("alloc_size")
 - @attribute("used")
 - @attribute("optimize")
 - @attribute("restrict")
 - @attribute("cold")
 - @attribute("noplt")
 - @attribute("target_clones")
 - @attribute("no_icf")
 - @attribute("noipa")
 - @attribute("symver")

With convenience aliases in a new `gcc.attributes' module to match
the same naming convention as `ldc.attributes':

 - @allocSize()
 - @assumeUsed
 - @fastmath
 - @naked
 - @restrict
 - @cold
 - @noplt
 - @optStrategy()
 - @polly
 - @section()
 - @target()
 - @weak

The old gcc.attribute module has been deprecated, along with the removal
of the following attribute handlers:

 - @attribute("alias"): Has been superseded by `pragma(mangle)'.
 - @attribute("forceinline"): Renamed to always_inline.

gcc/d/ChangeLog:

	* d-attribs.cc: Include fold-const.h and opts.h.
	(attr_noreturn_exclusions): Add alloc_size.
	(attr_const_pure_exclusions): Likewise.
	(attr_inline_exclusions): Add target_clones.
	(attr_noinline_exclusions): Rename forceinline to always_inline.
	(attr_target_exclusions): New array.
	(attr_target_clones_exclusions): New array.
	(attr_alloc_exclusions): New array.
	(attr_cold_hot_exclusions): New array.
	(d_langhook_common_attribute_table): Add new D attribute handlers.
	(build_attributes): Update to look for gcc.attributes.  Issue warning
	if not given a struct literal.  Handle void initialized arguments.
	(handle_always_inline_attribute): Remove function.
	(d_handle_noinline_attribute): Don't extract TYPE_LANG_FRONTEND.
	(d_handle_forceinline_attribute): Rename to...
	(d_handle_always_inline_attribute): ...this.  Remove special handling.
	(d_handle_flatten_attribute): Don't extract TYPE_LANG_FRONTEND.
	(d_handle_target_attribute): Likewise.  Warn about empty arguments.
	(d_handle_target_clones_attribute): New function.
	(optimize_args): New static variable.
	(parse_optimize_options): New function.
	(d_handle_optimize_attribute): New function.
	(d_handle_noclone_attribute): Don't extract TYPE_LANG_FRONTEND.
	(d_handle_alias_attribute): Remove function.
	(d_handle_noicf_attribute): New function.
	(d_handle_noipa_attribute): New function.
	(d_handle_section_attribute): Call the handle_generic_attribute target
	hook after performing target independent processing.
	(d_handle_symver_attribute): New function.
	(d_handle_noplt_attribute): New function.
	(positional_argument): New function.
	(d_handle_alloc_size_attribute): New function.
	(d_handle_cold_attribute): New function.
	(d_handle_restrict_attribute): New function.
	(d_handle_used_attribute): New function.
	* decl.cc (gcc_attribute_p): Update to look for gcc.attributes.
	(get_symbol_decl): Update decl source location of old prototypes to
	the new declaration being merged.
	* types.cc (layout_aggregate_members): Apply user defined attributes
	on fields.

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add
	  gcc/attributes.d.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/gcc/attribute.d: Deprecate module, publicly import
	gcc.attributes.
	* libdruntime/gcc/deh.d: Update imports.
	* libdruntime/gcc/attributes.d: New file.

gcc/testsuite/ChangeLog:

	* gdc.dg/gdc108.d: Update test.
	* gdc.dg/gdc142.d: Likewise.
	* gdc.dg/pr90136a.d: Likewise.
	* gdc.dg/pr90136b.d: Likewise.
	* gdc.dg/pr90136c.d: Likewise.
	* gdc.dg/pr95173.d: Likewise.
	* gdc.dg/attr_allocsize1.d: New test.
	* gdc.dg/attr_allocsize2.d: New test.
	* gdc.dg/attr_alwaysinline1.d: New test.
	* gdc.dg/attr_cold1.d: New test.
	* gdc.dg/attr_exclusions1.d: New test.
	* gdc.dg/attr_exclusions2.d: New test.
	* gdc.dg/attr_flatten1.d: New test.
	* gdc.dg/attr_module.d: New test.
	* gdc.dg/attr_noclone1.d: New test.
	* gdc.dg/attr_noicf1.d: New test.
	* gdc.dg/attr_noinline1.d: New test.
	* gdc.dg/attr_noipa1.d: New test.
	* gdc.dg/attr_noplt1.d: New test.
	* gdc.dg/attr_optimize1.d: New test.
	* gdc.dg/attr_optimize2.d: New test.
	* gdc.dg/attr_optimize3.d: New test.
	* gdc.dg/attr_optimize4.d: New test.
	* gdc.dg/attr_restrict1.d: New test.
	* gdc.dg/attr_section1.d: New test.
	* gdc.dg/attr_symver1.d: New test.
	* gdc.dg/attr_target1.d: New test.
	* gdc.dg/attr_targetclones1.d: New test.
	* gdc.dg/attr_used1.d: New test.
	* gdc.dg/attr_used2.d: New test.
	* gdc.dg/attr_weak1.d: New test.
	* gdc.dg/imports/attributes.d: New test.
2021-04-08 15:30:47 +02:00
..
ada Daily bump. 2021-03-30 00:16:29 +00:00
analyzer Daily bump. 2021-04-06 00:16:43 +00:00
brig
c Daily bump. 2021-03-26 00:16:25 +00:00
c-family Daily bump. 2021-04-06 00:16:43 +00:00
common i386: fix -march=amd crash 2021-03-24 20:45:26 +01:00
config arm: Various MVE vec_duplicate fixes [PR99647] 2021-04-08 09:36:57 +01:00
cp c++: improve specialization mismatch diagnostic [PR94529] 2021-04-08 07:58:40 -04:00
d d: Update language attribute support, and implement gcc.attributes 2021-04-08 15:30:47 +02:00
doc Minor tweak to description of fdelete-dead-exceptions 2021-04-02 10:47:07 +02:00
fortran Daily bump. 2021-04-04 00:16:26 +00:00
ginclude Update copyright years. 2021-01-04 10:26:59 +01:00
go compiler: copy receiver argument for go/defer of method call 2021-03-17 12:17:51 -07:00
jit Daily bump. 2021-03-25 00:16:48 +00:00
lto Daily bump. 2021-03-01 00:16:29 +00:00
objc
objcp Daily bump. 2021-01-06 00:16:55 +00:00
po Daily bump. 2021-04-07 00:16:39 +00:00
rtl-ssa fwprop: Fix single_use_p calculation 2021-03-23 19:44:22 +01:00
testsuite d: Update language attribute support, and implement gcc.attributes 2021-04-08 15:30:47 +02:00
ABOUT-GCC-NLS
acinclude.m4 Update copyright years. 2021-01-04 10:26:59 +01:00
aclocal.m4 build: libcody: Link with -lsocket -lnsl if necessary [PR98316] 2021-01-05 11:32:31 +01:00
addresses.h
adjust-alignment.c Update copyright years. 2021-01-04 10:26:59 +01:00
alias.c alias: Fix offset checks involving section anchors [PR92294] 2021-01-19 17:50:53 +00:00
alias.h Update copyright years. 2021-01-04 10:26:59 +01:00
align.h Update copyright years. 2021-01-04 10:26:59 +01:00
alloc-pool.c Update copyright years. 2021-01-04 10:26:59 +01:00
alloc-pool.h Update copyright years. 2021-01-04 10:26:59 +01:00
array-traits.h Update copyright years. 2021-01-04 10:26:59 +01:00
asan.c [PATCH] Fix typo in gcc/asan.c comment 2021-03-20 09:17:23 -06:00
asan.h
attr-fnspec.h Update copyright years. 2021-01-04 10:26:59 +01:00
attribs.c PR middle-end/97172 - ICE: tree code 'ssa_name' is not supported in LTO streams 2021-02-24 08:57:59 -07:00
attribs.h
auto-inc-dec.c
auto-profile.c Update copyright years. 2021-01-04 10:26:59 +01:00
auto-profile.h Update copyright years. 2021-01-04 10:26:59 +01:00
backend.h
BASE-VER Bump gcc/BASE-VER to 11.0.1 now that we are in stage4. 2021-02-25 11:16:29 +01:00
basic-block.h Update copyright years. 2021-01-04 10:26:59 +01:00
bb-reorder.c
bb-reorder.h
bitmap.c Update copyright years. 2021-01-04 10:26:59 +01:00
bitmap.h Fix statistic accounting for auto_vec and auto_bitmap 2021-02-01 16:51:29 +01:00
brig-builtins.def
builtin-attrs.def
builtin-types.def openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
builtins.c PR tree-optimization/99489 - ICE calling strncat after strcat 2021-03-13 13:45:51 -07:00
builtins.def
builtins.h
caller-save.c Update copyright years. 2021-01-04 10:26:59 +01:00
calls.c Fix internal error on lambda function 2021-03-09 16:22:55 +01:00
calls.h
ccmp.c Update copyright years. 2021-01-04 10:26:59 +01:00
ccmp.h
cfg-flags.def Update copyright years. 2021-01-04 10:26:59 +01:00
cfg.c Update copyright years. 2021-01-04 10:26:59 +01:00
cfg.h Update copyright years. 2021-01-04 10:26:59 +01:00
cfganal.c
cfganal.h
cfgbuild.c expand: Fix up find_bb_boundaries [PR98331] 2021-01-29 10:30:09 +01:00
cfgbuild.h
cfgcleanup.c
cfgcleanup.h
cfgexpand.c Add input_modes parameter to TARGET_MD_ASM_ADJUST hook 2021-03-04 14:33:41 +01:00
cfgexpand.h Update copyright years. 2021-01-04 10:26:59 +01:00
cfghooks.c Update copyright years. 2021-01-04 10:26:59 +01:00
cfghooks.h
cfgloop.c Update copyright years. 2021-01-04 10:26:59 +01:00
cfgloop.h
cfgloopanal.c Update copyright years. 2021-01-04 10:26:59 +01:00
cfgloopmanip.c Update copyright years. 2021-01-04 10:26:59 +01:00
cfgloopmanip.h
cfgrtl.c cfgrtl: Fix up fixup_partitions caused ICE [PR99085] 2021-03-03 09:51:54 +01:00
cfgrtl.h
cgraph.c Fix overvactive check in cgraph_node::release_body 2021-03-31 20:10:31 +02:00
cgraph.h cgraph: flatten and same_body aliases [PR96078] 2021-03-02 23:20:43 -05:00
cgraphbuild.c
cgraphclones.c Small refactoring of cgraph_node::release_body 2021-03-31 11:35:29 +02:00
cgraphunit.c Small refactoring of cgraph_node::release_body 2021-03-31 11:35:29 +02:00
ChangeLog Daily bump. 2021-04-08 00:16:44 +00:00
ChangeLog-1997 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2005
ChangeLog-2006 re PR other/42537 ([PATCH] misc spelling fixes) 2009-12-30 10:53:31 +00:00
ChangeLog-2007 Fix nit 2010-03-26 09:51:32 +00:00
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010 transpose_optimization_2.f90: Cleanup original dump. 2011-02-07 08:34:57 +01:00
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013 Fix old ChangeLog entry to include global variable name that was changed. 2015-09-25 16:55:10 +00:00
ChangeLog-2014
ChangeLog-2015 Minor ChangeLog formatting fixes. 2016-03-02 21:30:48 +01:00
ChangeLog-2016
ChangeLog-2017 gcc.c (process_command): Update copyright notice dates. 2018-01-03 10:17:54 +01:00
ChangeLog-2018 Fix missing name in ChangeLog 2019-06-21 15:02:46 +00:00
ChangeLog-2019
ChangeLog-2020
ChangeLog.dataflow Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ChangeLog.gimple-classes
ChangeLog.graphite Only update ChangeLog.graphite. 2011-07-08 19:15:18 +00:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.lib Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ChangeLog.ptr Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ChangeLog.tree-ssa
ChangeLog.tuples
cif-code.def Make USES_COMDAT_LOCAL CIF_FINAL_NORMAL 2021-03-31 22:44:20 +02:00
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h Update copyright years. 2021-01-04 10:26:59 +01:00
collect-utils.c
collect-utils.h
color-macros.h
combine-stack-adj.c
combine.c Update copyright years. 2021-01-04 10:26:59 +01:00
common.md Update copyright years. 2021-01-04 10:26:59 +01:00
common.opt c++: Add ABI version for PR98481 fix 2021-04-01 10:04:38 -04:00
compare-elim.c
conditions.h
config.build
config.gcc d: Add windows support for D compiler [PR91595] 2021-03-26 16:14:12 +01:00
config.host
config.in i386, debug: Default to -gdwarf-4 on Windows targets with broken ld.bfd [PR98860] 2021-03-31 09:11:29 +02:00
configure i386, debug: Default to -gdwarf-4 on Windows targets with broken ld.bfd [PR98860] 2021-03-31 09:11:29 +02:00
configure.ac i386, debug: Default to -gdwarf-4 on Windows targets with broken ld.bfd [PR98860] 2021-03-31 09:11:29 +02:00
context.c Update copyright years. 2021-01-04 10:26:59 +01:00
context.h Update copyright years. 2021-01-04 10:26:59 +01:00
convert.c
convert.h Update copyright years. 2021-01-04 10:26:59 +01:00
COPYING
COPYING3
COPYING3.LIB COPYING_v3: New file. 2007-07-17 08:37:53 +00:00
COPYING.LIB
coretypes.h
coroutine-builtins.def
coroutine-passes.cc
coverage.c Update copyright years. 2021-01-04 10:26:59 +01:00
coverage.h Update copyright years. 2021-01-04 10:26:59 +01:00
cppbuiltin.c Update copyright years. 2021-01-04 10:26:59 +01:00
cppbuiltin.h Update copyright years. 2021-01-04 10:26:59 +01:00
cppdefault.c Update copyright years. 2021-01-04 10:26:59 +01:00
cppdefault.h Update copyright years. 2021-01-04 10:26:59 +01:00
cprop.c Update copyright years. 2021-01-04 10:26:59 +01:00
cse.c Update copyright years. 2021-01-04 10:26:59 +01:00
cselib.c Update copyright years. 2021-01-04 10:26:59 +01:00
cselib.h
cstamp-h.in
data-streamer-in.c
data-streamer-out.c Update copyright years. 2021-01-04 10:26:59 +01:00
data-streamer.c Update copyright years. 2021-01-04 10:26:59 +01:00
data-streamer.h
DATESTAMP Daily bump. 2021-04-08 00:16:44 +00:00
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c Update copyright years. 2021-01-04 10:26:59 +01:00
debug.h Warn to not add debug hook targets 2021-03-22 14:37:26 +01:00
defaults.h
DEV-PHASE gcc-version.m4: Delete. 2005-03-16 06:04:10 +00:00
df-core.c Fix cast in df_worklist_dataflow_doublequeue 2021-02-15 10:43:30 +01:00
df-problems.c df: Record all definitions in DF_LR_BB_INFO->def [PR98863] 2021-02-12 15:54:48 +00:00
df-scan.c Update copyright years. 2021-01-04 10:26:59 +01:00
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic-event-id.h
diagnostic-format-json.cc Update copyright years. 2021-01-04 10:26:59 +01:00
diagnostic-metadata.h
diagnostic-path.h
diagnostic-show-locus.c diagnostics: fix ICE on fix-it hints on very long lines [PR99323] 2021-03-02 15:46:06 -05:00
diagnostic-url.h
diagnostic.c bootstrap: fix failing diagnostic selftest on Windows [PR98696] 2021-01-15 13:26:39 -05:00
diagnostic.def Update copyright years. 2021-01-04 10:26:59 +01:00
diagnostic.h Add GCC_EXTRA_DIAGNOSTIC_OUTPUT environment variable for fix-it hints 2021-01-14 16:28:38 -05:00
digraph.cc analyzer: support reverse direction in shortest-paths.h 2021-03-11 17:45:10 -05:00
digraph.h Update copyright years. 2021-01-04 10:26:59 +01:00
dojump.c Update copyright years. 2021-01-04 10:26:59 +01:00
dojump.h Update copyright years. 2021-01-04 10:26:59 +01:00
dominance.c Update copyright years. 2021-01-04 10:26:59 +01:00
dominance.h
domwalk.c Update copyright years. 2021-01-04 10:26:59 +01:00
domwalk.h
double-int.c
double-int.h Update copyright years. 2021-01-04 10:26:59 +01:00
dse.c dse: Fix up hard reg conflict checking in replace_read [PR99863] 2021-04-03 10:07:09 +02:00
dump-context.h Update copyright years. 2021-01-04 10:26:59 +01:00
dumpfile.c Update copyright years. 2021-01-04 10:26:59 +01:00
dumpfile.h
dwarf2asm.c dwarf2asm: Fix bootstrap on powerpc*-*-* [PR98839] 2021-01-26 18:13:07 +01:00
dwarf2asm.h
dwarf2cfi.c dwarf2cfi: Defer queued register saves some more [PR99334] 2021-03-27 00:20:42 +01:00
dwarf2out.c dwarf2out: Fix up ranges for -gdwarf-5 -gsplit-dwarf [PR99490] 2021-03-31 21:25:58 +02:00
dwarf2out.h dwarf2cfi: Defer queued register saves some more [PR99334] 2021-03-27 00:20:42 +01:00
early-remat.c
edit-context.c Update copyright years. 2021-01-04 10:26:59 +01:00
edit-context.h
emit-rtl.c Handle CONST_POLY_INTs in CONST_VECTORs [PR97141, PR98726] 2021-03-31 19:34:00 +01:00
emit-rtl.h Update copyright years. 2021-01-04 10:26:59 +01:00
errors.c Update copyright years. 2021-01-04 10:26:59 +01:00
errors.h Update copyright years. 2021-01-04 10:26:59 +01:00
escaped_string.h
et-forest.c
et-forest.h
except.c Update copyright years. 2021-01-04 10:26:59 +01:00
except.h Update copyright years. 2021-01-04 10:26:59 +01:00
exec-tool.in Update copyright years. 2021-01-04 10:26:59 +01:00
explow.c explow, aarch64: Fix force-Pmode-to-mem for ILP32 [PR97269] 2021-01-05 11:29:10 +00:00
explow.h Update copyright years. 2021-01-04 10:26:59 +01:00
expmed.c expand: Fix ICE in store_bit_field_using_insv [PR93235] 2021-03-04 19:38:08 +01:00
expmed.h Update copyright years. 2021-01-04 10:26:59 +01:00
expr.c middle-end/99281 - avoid bitfield stores into addressable types 2021-02-26 12:34:27 +01:00
expr.h expand: Fold x - y < 0 to x < y during expansion [PR94802] 2021-01-05 19:13:29 +01:00
fibonacci_heap.c Update copyright years. 2021-01-04 10:26:59 +01:00
fibonacci_heap.h
file-find.c
file-find.h
file-prefix-map.c
file-prefix-map.h
final.c Reset force_source_line in final.c 2021-01-15 22:53:27 +01:00
fixed-value.c Update copyright years. 2021-01-04 10:26:59 +01:00
fixed-value.h Update copyright years. 2021-01-04 10:26:59 +01:00
flag-types.h Update copyright years. 2021-01-04 10:26:59 +01:00
flags.h Update copyright years. 2021-01-04 10:26:59 +01:00
fold-const-call.c
fold-const-call.h
fold-const.c Improve rtx insn vec output 2021-04-07 21:04:22 -05:00
fold-const.h
fp-test.c
FSFChangeLog Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
FSFChangeLog.10 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
FSFChangeLog.11 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
function-abi.cc Update copyright years. 2021-01-04 10:26:59 +01:00
function-abi.h Fix typo in function-abi.h 2021-01-12 17:58:32 +01:00
function-tests.c Update copyright years. 2021-01-04 10:26:59 +01:00
function.c vregs: Fix up instantiate_virtual_regs_in_insn for asm goto with outputs [PR98603] 2021-01-09 10:48:20 +01:00
function.h Update copyright years. 2021-01-04 10:26:59 +01:00
fwprop.c fwprop: Fix single_use_p calculation 2021-03-23 19:44:22 +01:00
gcc-ar.c Update copyright years. 2021-01-04 10:26:59 +01:00
gcc-main.c Update copyright years. 2021-01-04 10:26:59 +01:00
gcc-plugin.h Update copyright years. 2021-01-04 10:26:59 +01:00
gcc-rich-location.c
gcc-rich-location.h
gcc-symtab.h Update copyright years. 2021-01-04 10:26:59 +01:00
gcc.c driver: error for nonexistent linker inputs [PR 98943] 2021-02-05 05:32:34 -08:00
gcc.h
gcov-counter.def
gcov-dump.c
gcov-io.c
gcov-io.h gcov: use mmap pools for KVP. 2021-03-03 14:21:45 +01:00
gcov-iov.c
gcov-tool.c
gcov.c gcov: fix printf format for 32-bit hosts 2021-01-12 18:16:05 +01:00
gcse-common.c
gcse-common.h
gcse.c gcse, ipa-devirt: Use %wd/%wu instead of HOST_WIDE_INT_PRINT* in diagnostics [PR99288] 2021-02-27 10:43:28 +01:00
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk Update copyright years. 2021-01-04 10:26:59 +01:00
genattr-common.c Update copyright years. 2021-01-04 10:26:59 +01:00
genattr.c Update copyright years. 2021-01-04 10:26:59 +01:00
genattrtab.c
genautomata.c
gencfn-macros.c
gencheck.c Update copyright years. 2021-01-04 10:26:59 +01:00
genchecksum.c
gencodes.c Update copyright years. 2021-01-04 10:26:59 +01:00
genconditions.c
genconfig.c
genconstants.c
genemit.c RTL: Update `const_double_zero' handling for mode and callable insns 2021-01-09 15:46:02 +00:00
genenums.c
generic-match-head.c
generic-match.h
genextract.c Revert: "Don't build insn-extract.o with rtl checking" 2021-02-24 09:39:11 +00:00
genflags.c Update copyright years. 2021-01-04 10:26:59 +01:00
gengenrtl.c
gengtype-lex.l Update copyright years. 2021-01-04 10:26:59 +01:00
gengtype-parse.c Update copyright years. 2021-01-04 10:26:59 +01:00
gengtype-state.c
gengtype.c Update copyright years. 2021-01-04 10:26:59 +01:00
gengtype.h
genhooks.c
genmatch.c
genmddeps.c
genmddump.c
genmodes.c Update copyright years. 2021-01-04 10:26:59 +01:00
genmultilib Update copyright years. 2021-01-04 10:26:59 +01:00
genopinit.c Update copyright years. 2021-01-04 10:26:59 +01:00
genoutput.c [PR99581] Define relaxed memory and use it for aarch64 2021-03-22 13:37:00 -04:00
genpeep.c Update copyright years. 2021-01-04 10:26:59 +01:00
genpreds.c [PR99581] Define relaxed memory and use it for aarch64 2021-03-22 13:37:00 -04:00
genrecog.c Update copyright years. 2021-01-04 10:26:59 +01:00
gensupport.c [PR99581] Define relaxed memory and use it for aarch64 2021-03-22 13:37:00 -04:00
gensupport.h
gentarget-def.c
ggc-common.c Update copyright years. 2021-01-04 10:26:59 +01:00
ggc-internal.h
ggc-none.c
ggc-page.c
ggc-tests.c
ggc.h Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-array-bounds.cc PR middle-end/99502 - missing -Warray-bounds on partial out of bounds 2021-03-18 13:38:00 -06:00
gimple-array-bounds.h Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-builder.c Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-builder.h Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-expr.c Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-expr.h Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-fold.c gimple-fold: Recompute ADDR_EXPR flags after folding a TMR [PR98268] 2021-03-31 19:34:01 +01:00
gimple-fold.h
gimple-if-to-switch.cc if-to-switch: fix memory leak in case merging 2021-02-10 13:20:51 +01:00
gimple-isel.cc
gimple-iterator.c Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-iterator.h
gimple-laddress.c
gimple-loop-interchange.cc fix memory leaks 2021-02-02 20:07:30 +01:00
gimple-loop-jam.c fix memory leaks 2021-02-02 20:07:30 +01:00
gimple-loop-versioning.cc Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-low.c
gimple-low.h
gimple-match-head.c
gimple-match.h
gimple-predict.h
gimple-pretty-print.c
gimple-pretty-print.h
gimple-range-cache.cc Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-range-cache.h
gimple-range-edge.cc
gimple-range-edge.h
gimple-range-gori.cc
gimple-range-gori.h
gimple-range.cc
gimple-range.h
gimple-ssa-backprop.c
gimple-ssa-evrp-analyze.c
gimple-ssa-evrp-analyze.h
gimple-ssa-evrp.c
gimple-ssa-isolate-paths.c
gimple-ssa-nonnull-compare.c
gimple-ssa-split-paths.c Update copyright years. 2021-01-04 10:26:59 +01:00
gimple-ssa-sprintf.c
gimple-ssa-store-merging.c bswap: Fix up bswap_view_convert after the recent change [PR99882] 2021-04-03 10:08:08 +02:00
gimple-ssa-strength-reduction.c
gimple-ssa-warn-alloca.c
gimple-ssa-warn-restrict.c
gimple-ssa-warn-restrict.h
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c
gimple-walk.h
gimple.c Update copyright years. 2021-01-04 10:26:59 +01:00
gimple.def
gimple.h
gimplify-me.c
gimplify-me.h Update copyright years. 2021-01-04 10:26:59 +01:00
gimplify.c tree-optimization/99863 - clear vector CTOR TREE_SIDE_EFFECTS 2021-04-01 12:46:48 +02:00
gimplify.h Update copyright years. 2021-01-04 10:26:59 +01:00
glimits.h Update copyright years. 2021-01-04 10:26:59 +01:00
godump.c
graph.c Update copyright years. 2021-01-04 10:26:59 +01:00
graph.h Update copyright years. 2021-01-04 10:26:59 +01:00
graphds.c Update copyright years. 2021-01-04 10:26:59 +01:00
graphds.h
graphite-dependences.c Update copyright years. 2021-01-04 10:26:59 +01:00
graphite-isl-ast-to-gimple.c
graphite-optimize-isl.c
graphite-poly.c Update copyright years. 2021-01-04 10:26:59 +01:00
graphite-scop-detection.c
graphite-sese-to-poly.c
graphite.c Update copyright years. 2021-01-04 10:26:59 +01:00
graphite.h
graphviz.cc
graphviz.h
gsstruct.def Update copyright years. 2021-01-04 10:26:59 +01:00
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c
hard-reg-set.h
hash-map-tests.c
hash-map-traits.h
hash-map.h Update copyright years. 2021-01-04 10:26:59 +01:00
hash-set-tests.c
hash-set.h
hash-table.c
hash-table.h Update copyright years. 2021-01-04 10:26:59 +01:00
hash-traits.h Update copyright years. 2021-01-04 10:26:59 +01:00
highlev-plugin-common.h Update copyright years. 2021-01-04 10:26:59 +01:00
hooks.c
hooks.h Update copyright years. 2021-01-04 10:26:59 +01:00
host-default.c Update copyright years. 2021-01-04 10:26:59 +01:00
hosthooks-def.h
hosthooks.h Update copyright years. 2021-01-04 10:26:59 +01:00
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h Handle overflow in dependence analysis lambda ops gracefully 2021-01-20 16:32:11 +01:00
ifcvt.c ifcvt: Avoid ICEs trying to force_operand random RTL [PR97487] 2021-02-03 09:10:29 +01:00
ifcvt.h
inchash.c Update copyright years. 2021-01-04 10:26:59 +01:00
inchash.h
incpath.c
incpath.h
init-regs.c rtl-optimization: Fix uninitialized use of opaque mode variable ICE [PR98872] 2021-02-15 10:39:24 -06:00
input.c Update copyright years. 2021-01-04 10:26:59 +01:00
input.h Update copyright years. 2021-01-04 10:26:59 +01:00
insn-addr.h
insn-notes.def Update copyright years. 2021-01-04 10:26:59 +01:00
int-vector-builder.h Update copyright years. 2021-01-04 10:26:59 +01:00
internal-fn.c gimple-isel: Check whether IFN_VCONDEQ is supported [PR98560] 2021-01-07 15:00:39 +00:00
internal-fn.def
internal-fn.h
intl.c
intl.h Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-comdats.c
ipa-cp.c ipa: Check that scalar types that IPA-CP comes up with are sane (PR99122) 2021-03-24 20:27:27 +01:00
ipa-devirt.c gcse, ipa-devirt: Use %wd/%wu instead of HOST_WIDE_INT_PRINT* in diagnostics [PR99288] 2021-02-27 10:43:28 +01:00
ipa-fnsummary.c Fix ICE in compute_fn_summary 2021-03-01 14:36:11 +01:00
ipa-fnsummary.h
ipa-icf-gimple.c icf: Check return type of internal fn calls [PR99517] 2021-03-11 10:59:18 +01:00
ipa-icf-gimple.h
ipa-icf.c IPA ICF + ASAN: do not merge vars with different alignment 2021-02-23 16:03:09 +01:00
ipa-icf.h Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-inline-analysis.c Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-inline-transform.c Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-inline.c Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-inline.h Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-modref-tree.c Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-modref-tree.h Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-modref.c Fix coding style in IPA modref. 2021-03-31 10:52:22 +02:00
ipa-modref.h
ipa-param-manipulation.c Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-param-manipulation.h Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-polymorphic-call.c
ipa-predicate.c
ipa-predicate.h
ipa-profile.c
ipa-prop.c middle-end/38474 - fix alias walk budget accounting in IPA analysis 2021-02-12 12:34:28 +01:00
ipa-prop.h
ipa-pure-const.c ipa/99029 - fix memory leak in propagate_malloc 2021-02-10 10:09:33 +01:00
ipa-ref.c
ipa-ref.h Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-reference.c Fix memory leak in ipa-refernece 2021-02-14 23:24:44 +01:00
ipa-reference.h Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-split.c Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-sra.c
ipa-utils.c Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-utils.h Update copyright years. 2021-01-04 10:26:59 +01:00
ipa-visibility.c
ipa.c typos: Fix various typos - mainly misspelled reference* [PR99304] 2021-02-28 11:12:57 +01:00
ira-build.c
ira-color.c
ira-conflicts.c ira: Make sure allocno copies are ordered [PR98791] 2021-02-22 13:46:29 +00:00
ira-costs.c [PR99766] Consider relaxed memory associated more with memory instead of special memory. 2021-03-26 17:11:30 +00:00
ira-emit.c
ira-int.h
ira-lives.c [PR99581] Define relaxed memory and use it for aarch64 2021-03-22 13:37:00 -04:00
ira.c [PR99766] Consider relaxed memory associated more with memory instead of special memory. 2021-03-26 17:11:30 +00:00
ira.h Update copyright years. 2021-01-04 10:26:59 +01:00
is-a.h
iterator-utils.h Update copyright years. 2021-01-04 10:26:59 +01:00
json.cc Update copyright years. 2021-01-04 10:26:59 +01:00
json.h Update copyright years. 2021-01-04 10:26:59 +01:00
jump.c
langhooks-def.h
langhooks.c Update copyright years. 2021-01-04 10:26:59 +01:00
langhooks.h
LANGUAGES Update copyright years. 2021-01-04 10:26:59 +01:00
lcm.c Update copyright years. 2021-01-04 10:26:59 +01:00
lcm.h
libfuncs.h Update copyright years. 2021-01-04 10:26:59 +01:00
limitx.h
limity.h
lists.c Update copyright years. 2021-01-04 10:26:59 +01:00
lock-and-run.sh
loop-doloop.c Update copyright years. 2021-01-04 10:26:59 +01:00
loop-init.c Update copyright years. 2021-01-04 10:26:59 +01:00
loop-invariant.c Update copyright years. 2021-01-04 10:26:59 +01:00
loop-iv.c Update copyright years. 2021-01-04 10:26:59 +01:00
loop-unroll.c
loop-unroll.h
lower-subreg.c
lower-subreg.h
lra-assigns.c
lra-coalesce.c
lra-constraints.c [PR99781] Update correctly reg notes in LRA for multi-registers and set up biggest mode safely 2021-04-06 09:22:16 -04:00
lra-eliminations.c
lra-int.h
lra-lives.c [PR99781] Update correctly reg notes in LRA for multi-registers and set up biggest mode safely 2021-04-06 09:22:16 -04:00
lra-remat.c [PR96264] LRA: Check output insn hard regs when updating available rematerialization after the insn 2021-02-18 17:51:03 -05:00
lra-spills.c lra: clear lra_insn_recog_data after simplifying a mem subreg 2021-02-03 13:40:19 +01:00
lra.c
lra.h
lto-cgraph.c
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c
lto-section-names.h
lto-section-out.c
lto-streamer-in.c
lto-streamer-out.c Fill up padding in lto_section struct. 2021-02-03 13:18:52 +01:00
lto-streamer.c more memory leak fixes 2021-02-03 10:04:13 +01:00
lto-streamer.h Fill up padding in lto_section struct. 2021-02-03 13:18:52 +01:00
lto-wrapper.c
machmode.def
machmode.h
main.c
Makefile.in analyzer: new implementation of shortest feasible path [PR96374] 2021-03-11 17:46:37 -05:00
match.pd match.pd: Don't optimize vector X + (X << C) -> X * (1 + (1 << C)) if there is no mult support [PR99544] 2021-03-13 08:56:15 +01:00
mcf.c Update copyright years. 2021-01-04 10:26:59 +01:00
mem-stats-traits.h
mem-stats.h
memmodel.h Update copyright years. 2021-01-04 10:26:59 +01:00
memory-block.cc Update copyright years. 2021-01-04 10:26:59 +01:00
memory-block.h
mkconfig.sh Update copyright years. 2021-01-04 10:26:59 +01:00
mode-classes.def Update copyright years. 2021-01-04 10:26:59 +01:00
mode-switching.c
modulo-sched.c
multiple_target.c Update copyright years. 2021-01-04 10:26:59 +01:00
mux-utils.h
obstack-utils.h Update copyright years. 2021-01-04 10:26:59 +01:00
omp-builtins.def
omp-expand.c
omp-expand.h
omp-general.c Update copyright years. 2021-01-04 10:26:59 +01:00
omp-general.h
omp-low.c openmp: Diagnose invalid teams nested in target construct [PR99226] 2021-02-24 20:11:11 +01:00
omp-low.h Update copyright years. 2021-01-04 10:26:59 +01:00
omp-oacc-kernels-decompose.cc
omp-offload.c Update copyright years. 2021-01-04 10:26:59 +01:00
omp-offload.h Update copyright years. 2021-01-04 10:26:59 +01:00
omp-simd-clone.c
omp-simd-clone.h
ONEWS Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
opt-functions.awk Update copyright years. 2021-01-04 10:26:59 +01:00
opt-gather.awk
opt-include.awk Update copyright years. 2021-01-04 10:26:59 +01:00
opt-problem.cc Update copyright years. 2021-01-04 10:26:59 +01:00
opt-problem.h Update copyright years. 2021-01-04 10:26:59 +01:00
opt-read.awk Update copyright years. 2021-01-04 10:26:59 +01:00
opt-suggestions.c Update copyright years. 2021-01-04 10:26:59 +01:00
opt-suggestions.h
optabs-libfuncs.c Update copyright years. 2021-01-04 10:26:59 +01:00
optabs-libfuncs.h
optabs-query.c
optabs-query.h
optabs-tree.c [aarch64][vect] Support V8QI->V8HI WIDEN_ patterns 2021-02-11 15:04:59 +00:00
optabs-tree.h [aarch64][vect] Support V8QI->V8HI WIDEN_ patterns 2021-02-11 15:04:59 +00:00
optabs.c i386, expand: Optimize also 256-bit and 512-bit permutatations as vpmovzx if possible [PR95905] 2021-01-13 11:36:38 +01:00
optabs.def
optabs.h
optc-gen.awk Update copyright years. 2021-01-04 10:26:59 +01:00
optc-save-gen.awk options: ignore flag_ipa_ra in cl_optimization_compare 2021-03-16 14:44:26 +01:00
opth-gen.awk Update copyright years. 2021-01-04 10:26:59 +01:00
optinfo-emit-json.cc Update copyright years. 2021-01-04 10:26:59 +01:00
optinfo-emit-json.h
optinfo.cc Update copyright years. 2021-01-04 10:26:59 +01:00
optinfo.h
opts-common.c Fix producer string memory leaks 2021-02-12 10:25:06 +01:00
opts-diagnostic.h
opts-global.c
opts.c Fix producer string memory leaks 2021-02-12 10:25:06 +01:00
opts.h opts: fix handling of -fpatchable-function-entries option 2021-02-08 12:31:24 +01:00
ordered-hash-map-tests.cc
ordered-hash-map.h
output.h Update copyright years. 2021-01-04 10:26:59 +01:00
params.opt Fix typo in param description. 2021-02-19 17:29:23 +01:00
pass_manager.h
passes.c
passes.def
plugin.c Update copyright years. 2021-01-04 10:26:59 +01:00
plugin.def Update copyright years. 2021-01-04 10:26:59 +01:00
plugin.h Update copyright years. 2021-01-04 10:26:59 +01:00
poly-int-types.h
poly-int.h Update copyright years. 2021-01-04 10:26:59 +01:00
postreload-gcse.c
postreload.c
predict.c Update copyright years. 2021-01-04 10:26:59 +01:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c Update copyright years. 2021-01-04 10:26:59 +01:00
pretty-print.h
print-rtl-function.c Update copyright years. 2021-01-04 10:26:59 +01:00
print-rtl.c Improve rtx insn vec output 2021-04-07 21:04:22 -05:00
print-rtl.h
print-tree.c
print-tree.h
profile-count.c Update copyright years. 2021-01-04 10:26:59 +01:00
profile-count.h
profile.c Drop time profile for multi-threaded training run. 2021-01-22 14:20:53 +01:00
profile.h
range-op.cc Update copyright years. 2021-01-04 10:26:59 +01:00
range-op.h
range.cc Update copyright years. 2021-01-04 10:26:59 +01:00
range.h Update copyright years. 2021-01-04 10:26:59 +01:00
read-md.c
read-md.h
read-rtl-function.c Update copyright years. 2021-01-04 10:26:59 +01:00
read-rtl-function.h Update copyright years. 2021-01-04 10:26:59 +01:00
read-rtl.c RTL: Update `const_double_zero' handling for mode and callable insns 2021-01-09 15:46:02 +00:00
README.Portability Update copyright years. 2021-01-04 10:26:59 +01:00
real.c Update copyright years. 2021-01-04 10:26:59 +01:00
real.h Update copyright years. 2021-01-04 10:26:59 +01:00
realmpfr.c
realmpfr.h
recog.c [PR99766] Consider relaxed memory associated more with memory instead of special memory. 2021-03-26 17:11:30 +00:00
recog.h
ree.c Update copyright years. 2021-01-04 10:26:59 +01:00
reg-notes.def
reg-stack.c Update copyright years. 2021-01-04 10:26:59 +01:00
regcprop.c cprop_hardreg: Ensure replacement reg has compatible mode [PR99221] 2021-03-23 09:48:01 +01:00
regcprop.h
reginfo.c
regrename.c
regrename.h
regs.h
regset.h
regstat.c
reload1.c
reload.c [PR99766] Consider relaxed memory associated more with memory instead of special memory. 2021-03-26 17:11:30 +00:00
reload.h
reorg.c Fix miscompilation of Python on HP-PA/Linux 2021-02-09 19:54:52 +01:00
resource.c
resource.h
rtl-error.c Update copyright years. 2021-01-04 10:26:59 +01:00
rtl-error.h Update copyright years. 2021-01-04 10:26:59 +01:00
rtl-iter.h
rtl-ssa.h
rtl-tests.c Update copyright years. 2021-01-04 10:26:59 +01:00
rtl.c
rtl.def [PR99581] Define relaxed memory and use it for aarch64 2021-03-22 13:37:00 -04:00
rtl.h Update copyright years. 2021-01-04 10:26:59 +01:00
rtlanal.c Fix undefined behavior spotted by the sanitizer 2021-03-05 12:47:28 +01:00
rtlanal.h
rtlhash.c
rtlhash.h Update copyright years. 2021-01-04 10:26:59 +01:00
rtlhooks-def.h
rtlhooks.c
rtx-vector-builder.c Handle CONST_POLY_INTs in CONST_VECTORs [PR97141, PR98726] 2021-03-31 19:34:00 +01:00
rtx-vector-builder.h Handle CONST_POLY_INTs in CONST_VECTORs [PR97141, PR98726] 2021-03-31 19:34:00 +01:00
run-rtl-passes.c
run-rtl-passes.h
sancov.c
sanitizer.def
sanopt.c Update copyright years. 2021-01-04 10:26:59 +01:00
sbitmap.c Update copyright years. 2021-01-04 10:26:59 +01:00
sbitmap.h Update copyright years. 2021-01-04 10:26:59 +01:00
sched-deps.c
sched-ebb.c Update copyright years. 2021-01-04 10:26:59 +01:00
sched-int.h
sched-rgn.c
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c
sel-sched.h
selftest-diagnostic.c
selftest-diagnostic.h
selftest-rtl.c
selftest-rtl.h
selftest-run-tests.c
selftest.c Update copyright years. 2021-01-04 10:26:59 +01:00
selftest.h
sese.c Update copyright years. 2021-01-04 10:26:59 +01:00
sese.h Update copyright years. 2021-01-04 10:26:59 +01:00
shortest-paths.h analyzer: new implementation of shortest feasible path [PR96374] 2021-03-11 17:46:37 -05:00
shrink-wrap.c Update copyright years. 2021-01-04 10:26:59 +01:00
shrink-wrap.h
signop.h
simplify-rtx.c
sort.cc Update copyright years. 2021-01-04 10:26:59 +01:00
sparseset.c
sparseset.h reduce sparseset memory requirement 2021-02-11 12:46:34 +01:00
spellcheck-tree.c
spellcheck-tree.h
spellcheck.c Fix -Wstring-concatenation warning. 2021-03-15 09:29:10 +01:00
spellcheck.h
splay-tree-utils.cc Update copyright years. 2021-01-04 10:26:59 +01:00
splay-tree-utils.h Update copyright years. 2021-01-04 10:26:59 +01:00
splay-tree-utils.tcc Update copyright years. 2021-01-04 10:26:59 +01:00
sreal.c
sreal.h
ssa-iterators.h
ssa.h
stab.def
stack-ptr-mod.c Update copyright years. 2021-01-04 10:26:59 +01:00
statistics.c
statistics.h Update copyright years. 2021-01-04 10:26:59 +01:00
stmt.c [PR99581] Define relaxed memory and use it for aarch64 2021-03-22 13:37:00 -04:00
stmt.h Update copyright years. 2021-01-04 10:26:59 +01:00
stor-layout.c tree-optimization/99824 - avoid excessive integer type precision in VN 2021-03-30 14:00:58 +02:00
stor-layout.h
store-motion.c
streamer-hooks.c
streamer-hooks.h Update copyright years. 2021-01-04 10:26:59 +01:00
stringpool.c Update copyright years. 2021-01-04 10:26:59 +01:00
stringpool.h Update copyright years. 2021-01-04 10:26:59 +01:00
substring-locations.c
substring-locations.h Update copyright years. 2021-01-04 10:26:59 +01:00
symbol-summary.h
symtab-clones.cc
symtab-clones.h
symtab-thunks.cc
symtab-thunks.h
symtab.c
sync-builtins.def Update copyright years. 2021-01-04 10:26:59 +01:00
system.h Add missing definition of SIZE_MAX 2021-01-31 23:25:56 +01:00
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target-insns.def
target.def Add input_modes parameter to TARGET_MD_ASM_ADJUST hook 2021-03-04 14:33:41 +01:00
target.h Update copyright years. 2021-01-04 10:26:59 +01:00
targhooks.c rs6000: Avoid -fpatchable-function-entry* regressions on powerpc64 be [PR98125] 2021-04-03 10:03:15 +02:00
targhooks.h rs6000: Avoid -fpatchable-function-entry* regressions on powerpc64 be [PR98125] 2021-04-03 10:03:15 +02:00
timevar.c Update copyright years. 2021-01-04 10:26:59 +01:00
timevar.def
timevar.h
toplev.c Fix 2 more leaks related to gen_command_line_string. 2021-02-15 16:01:58 +01:00
toplev.h
tracer.c
tracer.h
trans-mem.c
trans-mem.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-affine.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-affine.h
tree-call-cdce.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-cfg.c tree-optimization/99523 - missing SSA decls in dumps 2021-03-11 12:36:37 +01:00
tree-cfg.h
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chrec.c
tree-chrec.h
tree-complex.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-core.h c-family: Fix up -Wduplicated-branches for union members [PR99565] 2021-03-25 13:41:55 +01:00
tree-data-ref.c data-ref: Tighten index-based alias checks [PR99726] 2021-03-31 19:34:01 +01:00
tree-data-ref.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-dfa.c on ARRAY_REFs sign-extend offsets only from sizetype's precision [PR98255] 2021-01-22 11:42:03 +01:00
tree-dfa.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-diagnostic-path.cc
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-dump.h
tree-eh.c
tree-eh.h
tree-emutls.c Fix ICE: in function_and_variable_visibility, at ipa-visibility.c:795 [PR99466] 2021-03-26 16:14:18 +01:00
tree-hash-traits.h
tree-hasher.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-if-conv.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-if-conv.h
tree-inline.c Fix ICE in tree_inlinable_function_p. 2021-02-22 10:42:52 +01:00
tree-inline.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-into-ssa.c
tree-into-ssa.h
tree-iterator.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-iterator.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-loop-distribution.c tree-optimization/99954 - fix loop distribution memcpy classification 2021-04-07 13:25:06 +02:00
tree-nested.c tree-nested: Update assert for Fortran module vars [PR97927] 2021-03-08 13:05:48 +01:00
tree-nested.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-nrv.c
tree-object-size.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-object-size.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-outof-ssa.c
tree-outof-ssa.h
tree-parloops.c
tree-parloops.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-pass.h
tree-phinodes.c
tree-phinodes.h
tree-predcom.c make FOR_EACH_IMM_USE_STMT safe for early exits 2021-01-11 23:37:59 -03:00
tree-pretty-print.c middle-end: Pretty-print address space of aggregates 2021-03-06 19:09:39 +00:00
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c sra: Fix bug in grp_write propagation (PR 97009) 2021-04-01 10:12:23 +02:00
tree-sra.h
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias-compare.h
tree-ssa-alias.c typos: Fix various typos - mainly misspelled reference* [PR99304] 2021-02-28 11:12:57 +01:00
tree-ssa-alias.h
tree-ssa-ccp.c
tree-ssa-ccp.h
tree-ssa-coalesce.c
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-dce.c cd_dce: Return TODO_update_address_taken from last cd_dce [PR96271] 2021-01-16 09:20:29 +01:00
tree-ssa-dce.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-ssa-dom.c
tree-ssa-dom.h
tree-ssa-dse.c
tree-ssa-dse.h
tree-ssa-forwprop.c
tree-ssa-ifcombine.c
tree-ssa-live.c
tree-ssa-live.h
tree-ssa-loop-ch.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-ssa-loop-im.c fix memory leaks 2021-02-02 20:07:30 +01:00
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c tree-optimization/97627 - Avoid computing niters for fake edges 2021-01-29 12:09:10 +01:00
tree-ssa-loop-niter.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-ssa-loop-prefetch.c
tree-ssa-loop-split.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-ssa-loop-unswitch.c
tree-ssa-loop.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-ssa-loop.h
tree-ssa-math-opts.c
tree-ssa-math-opts.h
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c phiopt: Fix up conditional_replacement [PR99305] 2021-03-09 19:13:11 +01:00
tree-ssa-phiprop.c
tree-ssa-pre.c Add debug_vn_reference_ops helper 2021-04-07 09:59:07 +02:00
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c
tree-ssa-reassoc.h
tree-ssa-sccvn.c Add debug_vn_reference_ops helper 2021-04-07 09:59:07 +02:00
tree-ssa-sccvn.h Add debug_vn_reference_ops helper 2021-04-07 09:59:07 +02:00
tree-ssa-scopedtables.c
tree-ssa-scopedtables.h
tree-ssa-sink.c
tree-ssa-strlen.c PR middle-end/97631 - bogus "writing one too many bytes" warning for memcpy with strlen argument 2021-03-08 13:28:52 -07:00
tree-ssa-strlen.h
tree-ssa-structalias.c tree-optimization/38474 - improve PTA varinfo sorting 2021-02-16 12:48:07 +01:00
tree-ssa-tail-merge.c
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadbackward.c
tree-ssa-threadedge.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-ssa-threadedge.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-ssa-threadupdate.c
tree-ssa-threadupdate.h
tree-ssa-uncprop.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-ssa-uninit.c
tree-ssa.c
tree-ssa.h
tree-ssanames.c
tree-ssanames.h
tree-stdarg.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-stdarg.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-streamer-in.c
tree-streamer-out.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c if-to-switch: fix memory leak in case merging 2021-02-10 13:20:51 +01:00
tree-switch-conversion.h if-to-switch: fix memory leak in case merging 2021-02-10 13:20:51 +01:00
tree-tailcall.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-vect-data-refs.c tree-optimization/91403 - avoid excessive code-generation 2021-01-11 13:38:18 +01:00
tree-vect-generic.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-vect-loop-manip.c
tree-vect-loop.c tree-optimization/99947 - avoid v.safe_push (v[0]) 2021-04-07 10:04:20 +02:00
tree-vect-patterns.c tree-optimization/99856 - fix overwideing pattern creation 2021-04-01 10:23:25 +02:00
tree-vect-slp-patterns.c slp: reject non-multiple of 2 laned SLP trees (PR99825) 2021-03-30 14:16:03 +01:00
tree-vect-slp.c vect: Restore variable-length SLP permutes [PR97513] 2021-04-07 15:21:56 +01:00
tree-vect-stmts.c tree-optimization/96974 - avoid ICE by replacing assert with standard failure 2021-03-25 15:29:41 +00:00
tree-vector-builder.c Update copyright years. 2021-01-04 10:26:59 +01:00
tree-vector-builder.h Update copyright years. 2021-01-04 10:26:59 +01:00
tree-vectorizer.c slp: fix sharing of SLP only patterns. 2021-02-24 09:43:22 +00:00
tree-vectorizer.h slp: remove unneeded permute calculation (PR99656) 2021-03-19 14:29:36 +00:00
tree-vrp.c vrp: Improve register_edge_assert_for [PR95757] 2021-03-02 11:49:12 +01:00
tree-vrp.h
tree.c tree-optimization/99510 - fix type reuse of build_aligned_type 2021-03-10 13:13:51 +01:00
tree.def Update copyright years. 2021-01-04 10:26:59 +01:00
tree.h c++: Completeness of typedef structs [PR 99294] 2021-03-01 05:57:53 -08:00
treestruct.def
tristate.cc
tristate.h
tsan.c
tsan.h
tsystem.h Update copyright years. 2021-01-04 10:26:59 +01:00
typeclass.h Update copyright years. 2021-01-04 10:26:59 +01:00
typed-splay-tree.c
typed-splay-tree.h
ubsan.c ubsan: Don't test for NaNs if those do not exist (PR97926) 2021-03-22 16:32:42 +00:00
ubsan.h
unique-ptr-tests.cc
valtrack.c Update copyright years. 2021-01-04 10:26:59 +01:00
valtrack.h
value-prof.c
value-prof.h Update copyright years. 2021-01-04 10:26:59 +01:00
value-query.cc Update copyright years. 2021-01-04 10:26:59 +01:00
value-query.h
value-range-equiv.cc Update copyright years. 2021-01-04 10:26:59 +01:00
value-range-equiv.h
value-range.cc Handle setting of 1-bit anti-ranges uniformly. 2021-03-23 02:57:41 -04:00
value-range.h Handle setting of 1-bit anti-ranges uniformly. 2021-03-23 02:57:41 -04:00
var-tracking.c
varasm.c varasm: Fix up constpool alias handling [PR99872] 2021-04-07 15:51:15 +02:00
varasm.h Update copyright years. 2021-01-04 10:26:59 +01:00
varpool.c
vec-perm-indices.c Update copyright years. 2021-01-04 10:26:59 +01:00
vec-perm-indices.h
vec.c Update copyright years. 2021-01-04 10:26:59 +01:00
vec.h Fix statistic accounting for auto_vec and auto_bitmap 2021-02-01 16:51:29 +01:00
vector-builder.h Update copyright years. 2021-01-04 10:26:59 +01:00
version.c Update copyright years. 2021-01-04 10:26:59 +01:00
version.h
vmsdbg.h Update copyright years. 2021-01-04 10:26:59 +01:00
vmsdbgout.c
vr-values.c
vr-values.h
vtable-verify.c
vtable-verify.h
web.c Update copyright years. 2021-01-04 10:26:59 +01:00
wide-int-bitmask.h i386: Avoid C++ global constructors in every object that includes i386.h 2021-02-18 10:32:57 +01:00
wide-int-print.cc
wide-int-print.h
wide-int.cc Update copyright years. 2021-01-04 10:26:59 +01:00
wide-int.h
xcoff.h Update copyright years. 2021-01-04 10:26:59 +01:00
xcoffout.c aix: Use lcomm for TLS static data. 2021-03-11 16:57:24 -05:00
xcoffout.h aix: Use lcomm for TLS static data. 2021-03-11 16:57:24 -05:00

Copyright (C) 2000-2021 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.