gcc/gcc
Bin Cheng 6fa3d4b4a7 tree-vect-data-refs.c (vect_no_alias_p): New function.
* tree-vect-data-refs.c (vect_no_alias_p): New function.
	(vect_prune_runtime_alias_test_list): Call vect_no_alias_p to
	resolve alias checks which are known at compilation time.
	Truncate vector LOOP_VINFO_MAY_ALIAS_DDRS(loop_vinfo) if all
	alias checks are resolved.  Move dump info for too many runtime
	alias checks to here...
	* tree-vect-loop.c (vect_analyze_loop_2): ...From here.

	gcc/testsuite
	* gcc.dg/vect/vect-35-big-array.c: Refine comment and test.
	* gcc.dg/vect/vect-35.c: Ditto.
	* gcc.dg/vect/vect-alias-check-2.c: New test.

From-SVN: r238301
2016-07-13 15:06:40 +00:00
..
ada Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
c-family P0145: Refining Expression Order for C++ (-fstrong-eval-order). 2016-07-08 16:25:31 -04:00
common remove mep-* support 2016-06-21 21:57:49 +00:00
config arm.h (TARGET_HAVE_CBZ): Define. 2016-07-13 10:54:12 +00:00
cp * decl.c (store_parm_decls): Remove check for void parm. 2016-07-11 12:56:26 -04:00
doc arm.h (TARGET_HAVE_CBZ): Define. 2016-07-13 10:54:12 +00:00
fortran re PR fortran/71783 (ICE on valid code in gimplify_var_or_parm_decl at gimplify.c:1801) 2016-07-09 22:18:29 +00:00
ginclude
go escape: Add escape notes to export data. 2016-07-12 20:29:15 +00:00
java
jit
lto Makefile.in: Don't cat ../stage_current if it does not exist. 2016-06-28 10:38:38 +02:00
objc C: add fixit hint to misspelled field names 2016-06-07 15:04:22 +00:00
objcp
po * fr.po: Update. 2016-06-06 18:39:12 +01:00
testsuite tree-vect-data-refs.c (vect_no_alias_p): New function. 2016-07-13 15:06:40 +00:00
ABOUT-GCC-NLS
BASE-VER
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog tree-vect-data-refs.c (vect_no_alias_p): New function. 2016-07-13 15:06:40 +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.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
DATESTAMP Daily bump. 2016-07-13 00:16:21 +00:00
DEV-PHASE
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in Add tests that test boundary values of params 2016-07-12 15:03:07 +00:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4
addresses.h
alias.c re PR middle-end/71002 (-fstrict-aliasing breaks Boost's short string optimization implementation) 2016-06-29 07:30:31 +00:00
alias.h
alloc-pool.c
alloc-pool.h
asan.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
asan.h
attribs.c
attribs.h
auto-inc-dec.c
auto-profile.c
auto-profile.h
backend.h
basic-block.h
bb-reorder.c * bb-reorder.c (pass_partition_blocks::gate): Update comment. 2016-06-21 20:58:24 -06:00
bb-reorder.h
bitmap.c Selftest framework 2016-06-06 17:11:30 +00:00
bitmap.h
bt-load.c
builtin-attrs.def PR c/71392 - SEGV calling integer overflow built-ins with a null pointer 2016-06-10 11:38:19 -06:00
builtin-types.def
builtins.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
builtins.def PR c/71392 - SEGV calling integer overflow built-ins with a null pointer 2016-06-10 11:38:19 -06:00
builtins.h re PR middle-end/66867 (Suboptimal code generation for atomic_compare_exchange) 2016-06-28 10:27:18 +02:00
caller-save.c
calls.c
calls.h
ccmp.c
ccmp.h
cfg-flags.def
cfg.c
cfg.h
cfganal.c
cfganal.h
cfgbuild.c
cfgbuild.h
cfgcleanup.c
cfgcleanup.h
cfgexpand.c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
cfgexpand.h
cfghooks.c
cfghooks.h
cfgloop.c cfgloop.c (flow_loop_dump): Cast nit to uint64_t and print it using PRIu64 instead of lu. 2016-06-24 21:36:58 +02:00
cfgloop.h Dump profile-based number of iterations 2016-06-24 16:22:44 +00:00
cfgloopanal.c Introduce new param: AVG_LOOP_NITER 2016-07-12 15:27:36 +00:00
cfgloopmanip.c
cfgloopmanip.h
cfgrtl.c
cfgrtl.h
cgraph.c
cgraph.h
cgraphbuild.c
cgraphclones.c
cgraphunit.c
chkp-builtins.def
cif-code.def
cilk-builtins.def
cilk-common.c
cilk.h
cilkplus.def
collect-utils.c
collect-utils.h
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
combine-stack-adj.c
combine.c
common.md
common.opt re PR tree-optimization/23286 (Missed code hoisting optimization) 2016-07-12 13:32:04 +00:00
compare-elim.c re PR c/24414 (Old-style asms don't clobber memory) 2016-06-06 12:31:59 +00:00
conditions.h
config.build
config.gcc config.gcc: Add support for arm*-*-phoenix* targets. 2016-06-23 07:28:17 +00:00
config.host
config.in Call tls_get_addr via GOT for GNU TLS if possible 2016-06-24 10:32:52 -07:00
configure Call tls_get_addr via GOT for GNU TLS if possible 2016-06-24 10:32:52 -07:00
configure.ac Call tls_get_addr via GOT for GNU TLS if possible 2016-06-24 10:32:52 -07:00
context.c
context.h
convert.c
convert.h
coretypes.h
coverage.c
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c
cse.c cse.c (canon_asm_operands): New function extracted from... 2016-06-21 10:52:57 +00:00
cselib.c
cselib.h
cstamp-h.in
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h
df-core.c
df-problems.c * df-problems.c (df_note_bb_compute): Guard use of DF_INSN_INFO_GET. 2016-06-09 21:50:55 +00:00
df-scan.c
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h C FE: suggest corrections for misspelled identifiers and type names 2016-06-22 15:20:41 +00:00
diagnostic-show-locus.c Selftest framework 2016-06-06 17:11:30 +00:00
diagnostic.c C FE: suggest corrections for misspelled identifiers and type names 2016-06-22 15:20:41 +00:00
diagnostic.def
diagnostic.h Implement -fdiagnostics-parseable-fixits 2016-06-22 14:42:30 +00:00
dojump.c
dojump.h
dominance.c
dominance.h
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c
dumpfile.c
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c
dwarf2out.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
dwarf2out.h
emit-rtl.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
emit-rtl.h
errors.c
errors.h
et-forest.c Selftest framework 2016-06-06 17:11:30 +00:00
et-forest.h
except.c
except.h
exec-tool.in
explow.c Minor cleanup to allocate_dynamic_stack_space 2016-07-04 14:21:06 +00:00
explow.h
expmed.c Remove word_mode hack for split bitfields 2016-06-08 12:18:27 +00:00
expmed.h Fix typo in copyright boilerplate 2016-06-14 13:53:50 +00:00
expr.c [expr.c] PR middle-end/71700: zero-extend sub-word value when widening constructor element 2016-07-12 15:00:28 +00:00
expr.h re PR middle-end/71310 (Bitfields cause load hit store with smaller store and larger load) 2016-06-14 07:26:52 +00:00
fibonacci_heap.h
file-find.c Prevent LTO wrappers to process a recursive execution 2016-07-07 12:03:39 +00:00
file-find.h Prevent LTO wrappers to process a recursive execution 2016-07-07 12:03:39 +00:00
final.c re PR c/24414 (Old-style asms don't clobber memory) 2016-06-06 12:31:59 +00:00
fixed-value.c
fixed-value.h
flag-types.h
flags.h
fold-const-call.c
fold-const-call.h
fold-const.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
fold-const.h
fp-test.c
function-tests.c Support running the selftests under valgrind 2016-07-11 14:39:14 +00:00
function.c * function.c (assign_parm_setup_reg): Prevent sharing in another case. 2016-06-22 13:13:22 +00:00
function.h
fwprop.c re PR tree-optimization/68961 (Test case gcc.target/powerpc/pr60203.c fails since r231674) 2016-07-12 08:56:14 +00:00
gcc-ar.c Prevent LTO wrappers to process a recursive execution 2016-07-07 12:03:39 +00:00
gcc-main.c
gcc-plugin.h
gcc-rich-location.c Introduce gcc_rich_location::add_fixit_misspelled_id 2016-06-14 23:08:34 +00:00
gcc-rich-location.h Introduce gcc_rich_location::add_fixit_misspelled_id 2016-06-14 23:08:34 +00:00
gcc-symtab.h
gcc.c fix interaction of -S and -x {c,c++}-header 2016-07-04 07:41:32 +00:00
gcc.h
gcov-counter.def
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov-tool.c c-common.c (get_source_date_epoch): Use int64_t instead of long long. 2016-06-22 01:46:06 +00:00
gcov.c
gcse-common.c
gcse-common.h
gcse.c make stores rtx_insn_list a vec 2016-07-06 23:53:15 +00:00
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk
genattr-common.c
genattr.c
genattrtab.c
genautomata.c
gencfn-macros.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genenums.c
generic-match-head.c
generic-match.h
genextract.c genextract.c: add [cd]tors to accum_extract 2016-07-13 02:43:23 +00:00
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype-state.c
gengtype.c
gengtype.h
genhooks.c
genmatch.c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
gentarget-def.c
ggc-common.c
ggc-internal.h
ggc-none.c
ggc-page.c
ggc-tests.c ggc-tests.c (test_finalization): Only test need_finalization_p for GCC_VERSION >= 4003. 2016-06-13 16:27:01 +02:00
ggc.h
gimple-builder.c
gimple-builder.h
gimple-expr.c
gimple-expr.h
gimple-fold.c re PR middle-end/71716 (gcc.dg/atomic/c11-atomic-exec-4.c is miscompiled with -march=corei7) 2016-07-12 10:58:56 +02:00
gimple-fold.h re PR middle-end/66867 (Suboptimal code generation for atomic_compare_exchange) 2016-06-28 10:27:18 +02:00
gimple-iterator.c
gimple-iterator.h
gimple-laddress.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00: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-ssa-backprop.c
gimple-ssa-isolate-paths.c
gimple-ssa-nonnull-compare.c
gimple-ssa-split-paths.c gimple-ssa-split-paths.c (find_block_to_duplicate_for_splitting_pa): Handle empty else block. 2016-07-05 13:25:47 +00:00
gimple-ssa-strength-reduction.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c
gimple-walk.h
gimple.c re PR middle-end/71002 (-fstrict-aliasing breaks Boost's short string optimization implementation) 2016-06-29 07:30:31 +00:00
gimple.def
gimple.h gimple.c: Include builtins.h 2016-06-07 11:22:26 +00:00
gimplify-me.c
gimplify-me.h
gimplify.c re PR tree-optimization/71104 (ICE: verify_ssa failed (with vfork / error: definition in block 3 does not dominate use in block 7 )) 2016-07-13 08:03:04 +00:00
gimplify.h
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-dependences.c
graphite-isl-ast-to-gimple.c
graphite-optimize-isl.c
graphite-poly.c
graphite-scop-detection.c
graphite-sese-to-poly.c
graphite.c
graphite.h
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
hard-reg-set.h
hash-map-tests.c Selftest framework 2016-06-06 17:11:30 +00:00
hash-map-traits.h
hash-map.h
hash-set-tests.c Selftest framework 2016-06-06 17:11:30 +00:00
hash-set.h
hash-table.c
hash-table.h
hash-traits.h
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hsa-brig-format.h
hsa-brig.c
hsa-dump.c
hsa-gen.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
hsa-regalloc.c
hsa.c
hsa.h
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c [RTL ifcvt] PR rtl-optimization/71594: ICE in noce_emit_cmove due to mismatched source modes 2016-07-05 16:37:40 +00:00
ifcvt.h
inchash.c
inchash.h
incpath.c
incpath.h
init-regs.c
input.c input.c: add lexing selftests and a test matrix for line_table states 2016-07-11 16:02:20 +00:00
input.h
insn-addr.h
insn-notes.def
internal-fn.c re PR rtl-optimization/71673 (FAIL: c-c++-common/torture/builtin-arith-overflow-p-19.c -O2 (internal compiler error)) 2016-06-28 10:29:11 +02:00
internal-fn.def re PR middle-end/66867 (Suboptimal code generation for atomic_compare_exchange) 2016-06-28 10:27:18 +02:00
internal-fn.h
intl.c
intl.h
ipa-chkp.c re PR middle-end/71529 ([CHKP] ICE in expand_expr_real_1) 2016-06-15 15:49:40 +00:00
ipa-chkp.h
ipa-comdats.c
ipa-cp.c
ipa-devirt.c
ipa-hsa.c
ipa-icf-gimple.c
ipa-icf-gimple.h
ipa-icf.c
ipa-icf.h
ipa-inline-analysis.c re PR ipa/71624 ([CHKP] internal compiler error: in duplicate_thunk_for_node) 2016-07-07 11:45:11 +00:00
ipa-inline-transform.c re PR ipa/71633 ([CHKP] internal compiler error: in inline_call) 2016-07-13 11:02:15 +00:00
ipa-inline.c
ipa-inline.h
ipa-polymorphic-call.c
ipa-profile.c
ipa-prop.c
ipa-prop.h
ipa-pure-const.c
ipa-ref.c
ipa-ref.h
ipa-reference.c
ipa-reference.h
ipa-split.c
ipa-utils.c
ipa-utils.h
ipa-visibility.c
ipa.c ipa.c: remove static_{ctors,dtors} globals 2016-07-13 02:43:43 +00:00
ira-build.c re PR rtl-optimization/71634 (Invalid write with in mark_loops_for_removal (ira-build.c:2256) with --param ira-max-loops-num=0) 2016-07-12 14:54:52 +00:00
ira-color.c
ira-conflicts.c
ira-costs.c
ira-emit.c
ira-int.h
ira-lives.c strcpy arg optimised out 2016-07-01 20:45:17 +09:30
ira.c re PR c/24414 (Old-style asms don't clobber memory) 2016-06-06 12:31:59 +00:00
ira.h
is-a.h
jump.c
langhooks-def.h
langhooks.c
langhooks.h
lcm.c
lcm.h
libfuncs.h
limitx.h
limity.h
lists.c
lock-and-run.sh
loop-doloop.c
loop-init.c
loop-invariant.c
loop-iv.c
loop-unroll.c
loop-unroll.h
lower-subreg.c
lower-subreg.h Fix typo in copyright boilerplate 2016-06-14 13:53:50 +00:00
lra-assigns.c
lra-coalesce.c
lra-constraints.c re PR rtl-optimization/71621 (ICE in assign_by_spills, at lra-assigns.c:1417 (error: unable to find a register to spill) w/ -O2 -mavx2 -ftree-vectorize) 2016-07-08 20:29:12 +00:00
lra-eliminations.c
lra-int.h
lra-lives.c
lra-remat.c
lra-spills.c
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
lto-streamer.c
lto-streamer.h
lto-wrapper.c
machmode.def
machmode.h
main.c
match.pd match.pd ((T)(T2)x -> (T)x): Remove restriction on final precision not matching mode precision. 2016-06-29 07:17:57 +00:00
mcf.c
mem-stats-traits.h
mem-stats.h
memory-block.cc
memory-block.h
mkconfig.sh
mode-classes.def
mode-switching.c
modulo-sched.c
multiple_target.c
omp-builtins.def
omp-low.c re PR middle-end/71758 (ICE in verify_gimple_in_cfg, at tree-cfg.c:5212) 2016-07-11 22:40:47 +02:00
omp-low.h
omp-simd-clone.c
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs-libfuncs.c
optabs-libfuncs.h
optabs-query.c
optabs-query.h
optabs-tree.c
optabs-tree.h
optabs.c
optabs.def
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
opts-common.c Fix bogus option suggestions for RejectNegative options (PR driver/71651) 2016-06-30 14:28:50 +00:00
opts-diagnostic.h
opts-global.c
opts.c re PR tree-optimization/23286 (Missed code hoisting optimization) 2016-07-12 13:32:04 +00:00
opts.h Fix bogus option suggestions for RejectNegative options (PR driver/71651) 2016-06-30 14:28:50 +00:00
output.h
params-enum.h
params-list.h
params-options.h Add tests that test boundary values of params 2016-07-12 15:03:07 +00:00
params.c Offer suggestions for misspelled --param names. 2016-06-30 00:05:39 +00:00
params.def Introduce new param: AVG_LOOP_NITER 2016-07-12 15:27:36 +00:00
params.h Offer suggestions for misspelled --param names. 2016-06-30 00:05:39 +00:00
pass_manager.h
passes.c
passes.def
plugin.c
plugin.def
plugin.h
postreload-gcse.c
postreload.c
predict.c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
predict.def predict-12.c: New testcase. 2016-06-26 20:03:35 +00:00
predict.h
prefix.c
prefix.h
pretty-print.c pretty-print.c: skip color selftests if GCC_COLORS is set 2016-06-13 21:07:18 +00:00
pretty-print.h
print-rtl.c
print-rtl.h
print-tree.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
print-tree.h
profile.c profile.c: Include cfgloop.h. 2016-06-10 12:46:30 +00:00
profile.h
read-md.c
read-md.h
read-rtl.c
real.c
real.h
realmpfr.c
realmpfr.h
recog.c re PR c/24414 (Old-style asms don't clobber memory) 2016-06-06 12:31:59 +00:00
recog.h
ree.c ree.c: use auto_vec in ext_state 2016-07-13 02:44:28 +00:00
reg-notes.def
reg-stack.c re PR inline-asm/68843 (ICE with "u" input constraint) 2016-06-10 12:22:21 +00:00
regcprop.c
regcprop.h
reginfo.c
regrename.c
regrename.h
regs.h
regset.h
regstat.c
reload.c
reload.h
reload1.c re PR bootstrap/71435 (sparc bootstrap failure since r235625) 2016-06-18 11:10:10 +00:00
reorg.c
resource.c
resource.h
rtl-chkp.c
rtl-chkp.h
rtl-error.c
rtl-error.h
rtl-iter.h
rtl-tests.c Selftest framework 2016-06-06 17:11:30 +00:00
rtl.c
rtl.def
rtl.h
rtlanal.c
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c
sancov.c
sanitizer.def
sanopt.c
sbitmap.c
sbitmap.h
sched-deps.c
sched-ebb.c
sched-int.h
sched-rgn.c
sdbout.c
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c
sel-sched.h
selftest-run-tests.c Implement -fdiagnostics-parseable-fixits 2016-06-22 14:42:30 +00:00
selftest.c selftests: improve reported failure locations 2016-06-13 21:04:07 +00:00
selftest.h input.c: add lexing selftests and a test matrix for line_table states 2016-07-11 16:02:20 +00:00
sese.c
sese.h
shrink-wrap.c
shrink-wrap.h
signop.h
simplify-rtx.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
sparseset.c
sparseset.h
spellcheck-tree.c spellcheck.h: add best_match template; implement early-reject 2016-06-15 03:29:39 +00:00
spellcheck-tree.h spellcheck.h: add best_match template; implement early-reject 2016-06-15 03:29:39 +00:00
spellcheck.c Offer suggestions for misspelled --param names. 2016-06-30 00:05:39 +00:00
spellcheck.h Offer suggestions for misspelled --param names. 2016-06-30 00:05:39 +00:00
sreal.c
sreal.h
ssa-iterators.h
ssa.h
stab.def
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c
stmt.h
stor-layout.c tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Properly handle DECL_BIT_FIELD_REPRESENTATIVE occuring as COMPONENT_REF operand. 2016-06-28 11:55:19 +00:00
stor-layout.h
store-motion.c make antic_stores a vec<rtx_insn *> 2016-07-06 23:53:04 +00:00
streamer-hooks.c
streamer-hooks.h
stringpool.c
stringpool.h
symbol-summary.h
symtab.c
sync-builtins.def
system.h
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target-insns.def
target.def
target.h
targhooks.c targhooks.c (default_builtin_vectorization_cost): Adjust vec_construct cost. 2016-06-10 11:45:39 +00:00
targhooks.h
timevar.c
timevar.def
timevar.h
tlink.c
toplev.c re PR rtl-optimization/71591 (SIGSEGV in test_uncond_jump (rtl-tests.c:90) with -E -fself-test) 2016-06-20 23:40:02 +02:00
toplev.h Selftest framework 2016-06-06 17:11:30 +00:00
tracer.c
tracer.h
trans-mem.c
trans-mem.h
tree-affine.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
tree-affine.h
tree-call-cdce.c
tree-cfg.c Support running the selftests under valgrind 2016-07-11 14:39:14 +00:00
tree-cfg.h
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chkp-opt.c
tree-chkp.c
tree-chkp.h
tree-chrec.c
tree-chrec.h
tree-complex.c
tree-core.h Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
tree-data-ref.c remove unnecessary calls to vec::release 2016-07-13 02:44:59 +00:00
tree-data-ref.h
tree-dfa.c
tree-dfa.h
tree-diagnostic.c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c
tree-eh.h
tree-emutls.c
tree-hash-traits.h
tree-hasher.h
tree-if-conv.c
tree-inline.c re PR debug/71642 (ICE: in gen_type_die_with_usage, at dwarf2out.c:22729) 2016-06-24 19:28:18 +00:00
tree-inline.h
tree-into-ssa.c
tree-into-ssa.h
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c tree-loop-distribution.c (distribute_loop): Fix issue with the cost model loop. 2016-07-05 13:25:19 +00:00
tree-nested.c [PR middle-end/71373] Document missing OMP_CLAUSE_* in gcc/tree-nested.c 2016-06-13 18:37:29 +02:00
tree-nested.h
tree-nrv.c
tree-object-size.c
tree-object-size.h
tree-outof-ssa.c
tree-outof-ssa.h
tree-parloops.c
tree-parloops.h
tree-pass.h
tree-phinodes.c
tree-phinodes.h
tree-predcom.c
tree-pretty-print.c
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
tree-scalar-evolution.h tree-scalar-evolution.c (iv_can_overflow_p): export. 2016-07-07 11:50:55 +00:00
tree-sra.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias.c remove unnecessary calls to vec::release 2016-07-13 02:44:59 +00:00
tree-ssa-alias.h
tree-ssa-ccp.c
tree-ssa-coalesce.c
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-dce.c
tree-ssa-dom.c
tree-ssa-dom.h
tree-ssa-dse.c
tree-ssa-forwprop.c
tree-ssa-ifcombine.c
tree-ssa-live.c
tree-ssa-live.h
tree-ssa-loop-ch.c invoke.texi (max-loop-headers-insns): Document. 2016-06-08 14:11:51 +00:00
tree-ssa-loop-im.c re PR tree-optimization/70729 (Loop marked with omp simd pragma is not vectorized) 2016-06-29 10:16:43 +00:00
tree-ssa-loop-ivcanon.c pr36648.cc: Disable cunrolli 2016-06-16 12:54:31 +00:00
tree-ssa-loop-ivopts.c Introduce new param: AVG_LOOP_NITER 2016-07-12 15:27:36 +00:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c re PR tree-optimization/71462 (gcc ICE at -O3 on valid code on x86_64-linux-gnu with “seg fault”) 2016-06-09 11:36:22 +00:00
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-loop.h
tree-ssa-math-opts.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phionlycprop.c
tree-ssa-phiopt.c re PR tree-optimization/24574 (a!=0?a/10:0 is not reduced to a/10) 2016-07-13 13:57:05 +00:00
tree-ssa-phiprop.c
tree-ssa-pre.c re PR tree-optimization/23286 (Missed code hoisting optimization) 2016-07-12 13:32:04 +00:00
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c re PR tree-optimization/71631 (Wrong constant folding) 2016-06-25 19:20:15 +02:00
tree-ssa-sccvn.c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
tree-ssa-sccvn.h tree-ssa-pre.c: Include alias.h. 2016-07-07 07:43:35 +00:00
tree-ssa-scopedtables.c
tree-ssa-scopedtables.h
tree-ssa-sink.c
tree-ssa-strlen.c re PR tree-optimization/71707 (ICE in get_stridx_plus_constant) 2016-06-30 20:45:18 +02:00
tree-ssa-structalias.c
tree-ssa-tail-merge.c re PR tree-optimization/71643 (internal compiler error: in redirect_eh_edge_1, at tree-eh.c:2318 after r237427) 2016-06-25 19:23:02 +02:00
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadbackward.c re PR tree-optimization/71403 (wrong code (segfault) at -O3 on x86_64-linux-gnu) 2016-06-13 14:55:59 -06:00
tree-ssa-threadbackward.h
tree-ssa-threadedge.c
tree-ssa-threadedge.h
tree-ssa-threadupdate.c
tree-ssa-threadupdate.h
tree-ssa-uncprop.c
tree-ssa-uninit.c re PR middle-end/71581 (ICE on valid code on x86_64-linux-gnu with -Wuninitialized (Segmentation fault)) 2016-06-20 23:41:20 +02:00
tree-ssa.c re PR middle-end/66867 (Suboptimal code generation for atomic_compare_exchange) 2016-06-28 10:27:18 +02:00
tree-ssa.h
tree-ssanames.c
tree-ssanames.h
tree-stdarg.c use auto_vec for more local variables 2016-07-13 02:44:52 +00:00
tree-stdarg.h
tree-streamer-in.c
tree-streamer-out.c
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c
tree-tailcall.c
tree-vect-data-refs.c tree-vect-data-refs.c (vect_no_alias_p): New function. 2016-07-13 15:06:40 +00:00
tree-vect-generic.c
tree-vect-loop-manip.c tree-vectorizer.h (struct dr_with_seg_len): Remove class member OFFSET. 2016-06-17 09:05:05 +00:00
tree-vect-loop.c tree-vect-data-refs.c (vect_no_alias_p): New function. 2016-07-13 15:06:40 +00:00
tree-vect-patterns.c re PR tree-optimization/71488 (Wrong code for vector comparisons with ivybridge and westmere targets) 2016-06-22 14:05:55 +00:00
tree-vect-slp.c [6/7] Explicitly classify vector loads and stores 2016-07-06 08:15:28 +00:00
tree-vect-stmts.c remove unnecessary calls to vec::release 2016-07-13 02:44:59 +00:00
tree-vectorizer.c re PR tree-optimization/70729 (Loop marked with omp simd pragma is not vectorized) 2016-07-01 09:42:01 +00:00
tree-vectorizer.h [7/7] Add negative and zero strides to vect_memory_access_type 2016-07-06 08:16:53 +00:00
tree-vrp.c internal-fn.c (expand_arith_set_overflow): New function. 2016-06-24 13:03:27 +02:00
tree.c tree.c: add [cd]tors to free_lang_data_d 2016-07-13 02:43:10 +00:00
tree.def Fix CASE_CHAIN typos 2016-06-13 18:10:35 +02:00
tree.h Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
treestruct.def
tsan.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
tsan.h
tsystem.h
typeclass.h
typed-splay-tree.h
ubsan.c Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. 2016-07-11 15:02:12 +00:00
ubsan.h
valtrack.c
valtrack.h
value-prof.c
value-prof.h
var-tracking.c make side_effects a vec<rtx> 2016-07-06 23:53:20 +00:00
varasm.c check initializer to be zero in .bss-like sections 2016-07-01 14:23:24 +00:00
varasm.h
varpool.c
vec.c Selftest framework 2016-06-06 17:11:30 +00:00
vec.h
version.c
version.h
vmsdbg.h
vmsdbgout.c
vtable-verify.c
vtable-verify.h
web.c
wide-int-print.cc
wide-int-print.h
wide-int.cc Selftest framework 2016-06-06 17:11:30 +00:00
wide-int.h
xcoff.h
xcoffout.c
xcoffout.h

README.Portability

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

Irix6 "cc -n32" and OSF4 "cc" have problems with constant string
initializers with parens around it, e.g.

const char string[] = ("A string");

This is unfortunate since this is what the GNU gettext macro N_
produces.  You need to find a different way to code it.

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.