gcc/gcc
Thomas Koenig 94b150705d re PR fortran/56937 (Unnecessarily temporary with array-vector assignments)
2013-07-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/56937
	* dependency.c (gfc_dep_resolver):  Treat identical
	array subscripts as identical; don't unconditionally
	return a dependency if an array subscript is found.

2013-07-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/56937
	* gfortran.dg/dependency_42.f90:  New test.
	* gfortran.dg/dependency_43.f90:  New test.

From-SVN: r201094
2013-07-21 13:44:03 +00:00
..
ada re PR ada/57934 (typo in definition of CAT in gcc-interface/ada.h for traditional preprocessor) 2013-07-20 08:41:29 +00:00
c re PR c++/57793 (ICE with bitfields in get_bit_range) 2013-07-13 19:10:17 -04:00
c-family re PR c++/55203 (No unused warning for variables of non-trivial types) 2013-07-13 19:16:18 -04:00
common s390.c: Rename UNSPEC_CCU_TO_INT to UNSPEC_STRCMPCC_TO_INT and UNSPEC_CCZ_TO_INT to... 2013-06-27 07:44:11 +00:00
config re PR target/51784 (PIC register not correctly preserved in nested funcs / with non-local goto) 2013-07-20 16:22:59 +00:00
cp Extract lambda functions from semantics.c. 2013-07-14 13:29:55 -04:00
doc re PR c++/55203 (No unused warning for variables of non-trivial types) 2013-07-13 19:16:18 -04:00
fortran re PR fortran/56937 (Unnecessarily temporary with array-vector assignments) 2013-07-21 13:44:03 +00:00
ginclude
go compiler: adjust closure field indexes 2013-07-16 22:45:24 +00:00
java class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P instead of mark_decl_referenced. 2013-06-05 14:15:31 +00:00
lto lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder partitioning of variables. 2013-07-19 18:19:48 +00:00
objc
objcp
po * fi.po: Update. 2013-07-11 22:47:04 +01:00
testsuite re PR fortran/56937 (Unnecessarily temporary with array-vector assignments) 2013-07-21 13:44:03 +00:00
ABOUT-GCC-NLS
BASE-VER
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog correct a ChangeLog commit error. 2013-07-20 17:24:24 +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.dataflow
ChangeLog.graphite
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
DATESTAMP Daily bump. 2013-07-21 00:16:29 +00:00
DEV-PHASE
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in passes.def: New. 2013-07-18 18:55:48 +00:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4
addresses.h
alias.c re PR rtl-optimization/57425 (RTL alias analysis unprepared to handle stack slot sharing) 2013-06-20 13:43:29 +01:00
alias.h
alloc-pool.c
alloc-pool.h
asan.c
asan.h
attribs.c
auto-inc-dec.c
basic-block.h re PR c++/53743 (ICE when compiling firefox with PGO and LTO) 2013-06-06 16:30:07 +00:00
bb-reorder.c re PR c++/53743 (ICE when compiling firefox with PGO and LTO) 2013-06-06 16:30:07 +00:00
bb-reorder.h re PR c++/53743 (ICE when compiling firefox with PGO and LTO) 2013-06-06 16:30:07 +00:00
bitmap.c
bitmap.h
bt-load.c
builtin-attrs.def
builtin-types.def Implemented Cilk Plus Array Notation for C Compiler. 2013-05-28 12:55:10 -07:00
builtins.c re PR target/29776 (result of ffs/clz/ctz/popcount/parity are already sign-extended) 2013-07-06 11:34:17 +02:00
builtins.def Implemented Jason Merrill's suggestions on Array Notation C++. 2013-06-28 13:04:36 -07:00
builtins.h
caller-save.c
calls.c
cfg-flags.def
cfg.c
cfganal.c
cfgbuild.c
cfgcleanup.c re PR c++/53743 (ICE when compiling firefox with PGO and LTO) 2013-06-06 16:30:07 +00:00
cfgexpand.c
cfghooks.c
cfghooks.h
cfgloop.c
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgrtl.c re PR c++/53743 (ICE when compiling firefox with PGO and LTO) 2013-06-06 16:30:07 +00:00
cgraph.c tree-flow.h (gimple_check_call_matching_types): Add new argument. 2013-06-15 16:56:01 +00:00
cgraph.h re PR middle-end/57670 (Member-pointer calls should not be redirected to builtin_unreachable) 2013-06-25 13:09:21 +02:00
cgraphbuild.c re PR tree-optimization/57294 (ice in remove_described_reference) 2013-05-24 17:35:21 +02:00
cgraphclones.c re PR c++/57208 (Latest chromium compilation fails with enabled LTO) 2013-06-27 15:49:28 +02:00
cgraphunit.c cgraph.h (const_value_known_p): Replace by ... 2013-06-19 18:06:12 +00:00
cif-code.def
cilkplus.def Implemented Cilk Plus Array Notation for C Compiler. 2013-05-28 12:55:10 -07:00
collect2-aix.c
collect2-aix.h
collect2.c re PR driver/57652 (collect2 does not clean up temporary files) 2013-06-19 19:51:05 -04:00
collect2.h re PR driver/57652 (collect2 does not clean up temporary files) 2013-06-19 19:51:05 -04:00
combine-stack-adj.c
combine.c re PR rtl-optimization/57786 (wasted work in distribute_notes) 2013-07-08 09:05:38 +00:00
common.opt
compare-elim.c
conditions.h
config.build
config.gcc acinclude.m4 (LIBITM_CHECK_AS_HTM): New. 2013-07-15 12:23:49 -05:00
config.host
config.in configure.ac: Add AC_HEADER_TIOCGWINSZ macro. 2013-06-01 21:12:57 +02:00
configure Revert accidental commit. 2013-06-12 14:29:10 +00:00
configure.ac configure.ac: Add AC_HEADER_TIOCGWINSZ macro. 2013-06-01 21:12:57 +02:00
convert.c re PR middle-end/55771 (Negation and type conversion incorrectly exchanged) 2013-07-12 15:41:49 +00:00
convert.h
coretypes.h
coverage.c
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c
cse.c re PR rtl-optimization/57425 (RTL alias analysis unprepared to handle stack slot sharing) 2013-06-20 13:43:29 +01:00
cselib.c re PR rtl-optimization/57425 (RTL alias analysis unprepared to handle stack slot sharing) 2013-06-20 13:43:29 +01:00
cselib.h
cstamp-h.in
data-streamer-in.c data-streamer-in.c (streamer_read_uhwi): Optimize single byte case... 2013-06-20 11:33:43 +00:00
data-streamer-out.c data-streamer.h (streamer_write_char_stream): CSE obs->current_pointer. 2013-06-12 11:09:50 +00:00
data-streamer.c
data-streamer.h data-streamer.h (streamer_write_char_stream): CSE obs->current_pointer. 2013-06-12 11:09:50 +00:00
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... 2013-05-29 20:42:50 +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-scan.c
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic.c
diagnostic.def
diagnostic.h
dojump.c
dominance.c pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 12:17:16 +00:00
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c
dumpfile.c dumpfile.c (opt_info_switch_p): Change -fopt-info default to -fopt-info=optimized instead of all. 2013-06-03 18:39:04 +00:00
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c
dwarf2out.c dwarf2out.c (loc_checksum): Call hash_loc_operands for a deterministic hash. 2013-07-02 15:18:39 -07:00
dwarf2out.h
emit-rtl.c re PR c++/53743 (ICE when compiling firefox with PGO and LTO) 2013-06-06 16:30:07 +00:00
emit-rtl.h
errors.c
errors.h
et-forest.c
et-forest.h
except.c
except.h
exec-tool.in
explow.c
expmed.c expmed.c (extract_bit_field_1): In the larger-than-a-word case... 2013-06-04 07:41:18 +00:00
expmed.h
expr.c expr.c (expand_expr_real_1): Fix formatting glitches. 2013-06-25 07:23:19 +00:00
expr.h
file-find.c re PR driver/57651 (gcc-ar and gcc-nm don't find the lto plugin) 2013-06-19 21:01:06 +00:00
file-find.h re PR driver/57651 (gcc-ar and gcc-nm don't find the lto plugin) 2013-06-19 21:01:06 +00:00
final.c final.c (debug_prefix_maps): Make static. 2013-06-11 17:15:52 +00:00
fixed-value.c
fixed-value.h
flag-types.h
flags.h
fold-const.c re PR target/29776 (result of ffs/clz/ctz/popcount/parity are already sign-extended) 2013-07-06 11:34:17 +02:00
fp-test.c
function.c function.c (initial_trampoline): Remove stray copy. 2013-06-11 17:07:05 +00:00
function.h
fwprop.c
gcc-ar.c re PR driver/57651 (gcc-ar and gcc-nm don't find the lto plugin) 2013-06-19 21:01:06 +00:00
gcc-plugin.h
gcc.c
gcc.h
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov.c gcov.c (print_usage): Handle new option. 2013-06-20 05:20:09 +00:00
gcse.c
gcse.h
gdbinit.in * gdbinit.in (__FUNCTION__): Add. 2013-06-05 16:36:00 +00:00
genattr-common.c
genattr.c
genattrtab.c
genautomata.c Add error message for mismatched parentheses in reservation string 2013-06-11 22:23:18 +00:00
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genenums.c
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype-state.c
gengtype.c read-rtl.c (validate_const_int): Once an invalid character is seen, quit the loop. 2013-07-18 10:07:37 -06:00
gengtype.h
genhooks.c
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c rtl.def: Add extra fourth optional field to define_cond_exec. 2013-06-04 08:56:32 +00:00
gensupport.h
ggc-common.c
ggc-internal.h
ggc-none.c
ggc-page.c ggc-page.c (ggc_pch_write_object): Remove erroneous ATTRIBUTE_UNUSED marking. 2013-06-17 17:25:46 +00:00
ggc.h
gimple-fold.c gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Use types_same_for_odr. 2013-06-21 06:43:39 +00:00
gimple-fold.h
gimple-iterator.c
gimple-low.c tree-flow.h (gimple_check_call_matching_types): Add new argument. 2013-06-15 16:56:01 +00:00
gimple-pretty-print.c
gimple-pretty-print.h
gimple-ssa-strength-reduction.c re PR tree-optimization/57441 (ICE in gimple-ssa-strength-reduction.c:3447 at -O3) 2013-05-29 16:00:54 +00:00
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple.c
gimple.def
gimple.h gimple.h (gimple_can_coalesce_p): Prototype. 2013-06-14 12:52:32 -06:00
gimplify.c
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-clast-to-gimple.c graphite: Do not depend on 2D + 1 form in parallelism check 2013-07-14 06:45:08 +00:00
graphite-clast-to-gimple.h
graphite-dependences.c graphite: Do not depend on 2D + 1 form in parallelism check 2013-07-14 06:45:08 +00:00
graphite-htab.h
graphite-interchange.c
graphite-optimize-isl.c
graphite-poly.c
graphite-poly.h
graphite-scop-detection.c
graphite-scop-detection.h
graphite-sese-to-poly.c
graphite-sese-to-poly.h
graphite.c
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c re PR debug/56950 (compare-debug failure for gcc.dg/pr41345.c with fschedule-insns) 2013-05-24 20:59:59 +00:00
hard-reg-set.h
hash-table.c
hash-table.h
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c ifcvt.c (ifcvt_after_combine): New static variable. 2013-07-13 08:51:18 +00:00
incpath.c
incpath.h
init-regs.c
input.c
input.h
insn-addr.h
insn-notes.def
internal-fn.c
internal-fn.def
internal-fn.h
intl.c
intl.h
ipa-cp.c re PR c++/57208 (Latest chromium compilation fails with enabled LTO) 2013-06-27 15:49:28 +02:00
ipa-inline-analysis.c cgraph.h (const_value_known_p): Replace by ... 2013-06-19 18:06:12 +00:00
ipa-inline-transform.c re PR tree-optimization/57539 (ice in ipa_edge_duplication_hook) 2013-06-24 14:40:17 +02:00
ipa-inline.c re PR tree-optimization/57539 (ice in ipa_edge_duplication_hook) 2013-06-24 14:40:17 +02:00
ipa-inline.h
ipa-prop.c re PR middle-end/57670 (Member-pointer calls should not be redirected to builtin_unreachable) 2013-06-25 13:09:21 +02:00
ipa-prop.h
ipa-pure-const.c ipa-pure-const.c (generate_summary): Rename to... 2013-07-18 02:59:46 +00:00
ipa-ref-inline.h
ipa-ref.c re PR c++/57208 (Latest chromium compilation fails with enabled LTO) 2013-06-27 15:49:28 +02:00
ipa-ref.h re PR c++/57208 (Latest chromium compilation fails with enabled LTO) 2013-06-27 15:49:28 +02:00
ipa-reference.c cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... 2013-05-29 20:42:50 +00:00
ipa-reference.h
ipa-split.c cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... 2013-05-29 20:42:50 +00:00
ipa-utils.c cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... 2013-05-29 20:42:50 +00:00
ipa-utils.h
ipa.c cgraph.h (const_value_known_p): Replace by ... 2013-06-19 18:06:12 +00:00
ira-build.c
ira-color.c
ira-conflicts.c
ira-costs.c
ira-emit.c
ira-int.h
ira-lives.c
ira.c re PR rtl-optimization/57518 (Redundant insn generated in LRA) 2013-06-19 21:57:42 +00:00
ira.h
is-a.h
jump.c
langhooks-def.h
langhooks.c
langhooks.h
lcm.c
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-unswitch.c
lower-subreg.c
lower-subreg.h
lra-assigns.c [multiple changes] 2013-07-18 17:04:10 +00:00
lra-coalesce.c
lra-constraints.c lra-constraints.c (curr_insn_transform): Switch off optional reloads. 2013-07-11 02:12:00 +00:00
lra-eliminations.c
lra-int.h re PR rtl-optimization/55342 ([LRA,x86] Non-optimal code for simple loop with LRA) 2013-07-05 20:56:13 +00:00
lra-lives.c
lra-spills.c
lra.c re PR rtl-optimization/55342 ([LRA,x86] Non-optimal code for simple loop with LRA) 2013-07-05 20:56:13 +00:00
lra.h
lto-cgraph.c re PR tree-optimization/57539 (ice in ipa_edge_duplication_hook) 2013-06-24 14:40:17 +02:00
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c
lto-section-out.c pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 12:17:16 +00:00
lto-streamer-in.c tree-streamer.h (streamer_tree_cache_create): Adjust prototype. 2013-06-18 12:56:42 +00:00
lto-streamer-out.c Makefile.in (LTO_STREAMER_H): Add pointer-set.h dependency. 2013-06-18 14:39:57 +00:00
lto-streamer.c lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 15:08:24 +00:00
lto-streamer.h pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 12:17:16 +00:00
lto-symtab.c re PR lto/57334 (ICE: in input_gimple_stmt, at gimple-streamer-in.c:287) 2013-06-18 09:56:59 +00:00
lto-wrapper.c
machmode.def
machmode.h
main.c
mcf.c
mkconfig.sh
mode-classes.def
mode-switching.c
modulo-sched.c
omega.c
omega.h
omp-builtins.def
omp-low.c re PR middle-end/57412 (ICE: in verify_loop_structure, at cfgloop.c:1647: loop 1's latch does not have an edge to its header with -fopenmp -fipa-pure-const) 2013-05-27 15:02:53 +00:00
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs.c
optabs.def
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
opts-common.c
opts-diagnostic.h
opts-global.c
opts.c
opts.h
output.h
params.c
params.def
params.h
passes.c passes.def: New. 2013-07-18 18:55:48 +00:00
passes.def passes.def: New. 2013-07-18 18:55:48 +00:00
plugin.c
plugin.def
plugin.h
pointer-set.c pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 12:17:16 +00:00
pointer-set.h pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 12:17:16 +00:00
postreload-gcse.c
postreload.c re PR rtl-optimization/57439 (FAIL: gcc.c-torture/execute/920501-6.c execution, -O1) 2013-05-30 12:07:05 +01:00
predict.c
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-tree.c print-tree.c (debug_vec_tree): Use debug_raw. 2013-07-13 19:10:29 -04:00
profile.c
profile.h
read-md.c
read-md.h
read-rtl.c read-rtl.c (validate_const_int): Once an invalid character is seen, quit the loop. 2013-07-18 10:07:37 -06:00
real.c
real.h
realmpfr.c
realmpfr.h
recog.c
recog.h
ree.c
reg-notes.def
reg-stack.c
regcprop.c
reginfo.c
regmove.c
regrename.c
regrename.h
regs.h
regset.h
regstat.c
reload.c
reload.h
reload1.c
reorg.c
resource.c
resource.h
rtl-error.c
rtl-error.h
rtl.c
rtl.def rtl.def: Add extra fourth optional field to define_cond_exec. 2013-06-04 08:56:32 +00:00
rtl.h re PR rtl-optimization/57425 (RTL alias analysis unprepared to handle stack slot sharing) 2013-06-20 13:43:29 +01:00
rtlanal.c rtlanal.c (noop_move_p): Check the code to be executed for COND_EXEC. 2013-06-13 08:33:39 +00:00
rtlhooks-def.h
rtlhooks.c
sanitizer.def
sbitmap.c
sbitmap.h
sched-deps.c re PR rtl-optimization/57268 (c nested loops hang compiler in sched-deps.c) 2013-06-03 19:38:39 +02:00
sched-ebb.c
sched-int.h sched-int.h (ds_t, dw_t): Make unsigned int. 2013-05-25 10:31:43 +00:00
sched-rgn.c
sched-vis.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
sese.c
sese.h
simplify-rtx.c re PR target/57819 (Suboptimal shift patterns) 2013-07-08 10:48:40 +02:00
sparseset.c
sparseset.h
sreal.c
sreal.h
ssaexpand.h
stab.def
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c re PR middle-end/55030 (gcc.c-torture/execute/builtins/memcpy-chk.c execution, -Os (et al)) 2013-07-03 14:37:29 +00:00
stor-layout.c
store-motion.c
streamer-hooks.c
streamer-hooks.h
stringpool.c
symtab.c ipa.c (cgraph_externally_visible_p, [...]): Local comdats are not externally visible. 2013-06-13 10:00:04 +00:00
sync-builtins.def
system.h system.h: Include <cstdlib> as well as <stdlib.h>. 2013-06-20 15:22:02 -04:00
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target.def tm.texi.in: Move hook documentation to .... 2013-07-11 00:24:24 +01:00
target.h
targhooks.c target.def (register_usage_leveling_p): New hook. 2013-05-30 20:30:38 +00:00
targhooks.h target.def (register_usage_leveling_p): New hook. 2013-05-30 20:30:38 +00:00
timevar.c
timevar.def
timevar.h
tlink.c re PR driver/57652 (collect2 does not clean up temporary files) 2013-06-19 19:51:05 -04:00
toplev.c cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... 2013-05-29 20:42:50 +00:00
toplev.h
tracer.c
trans-mem.c class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P instead of mark_decl_referenced. 2013-06-05 14:15:31 +00:00
trans-mem.h
tree-affine.c re PR tree-optimization/57396 (Wrong code with -fpredictive-commoning in Fortran double-loop) 2013-05-27 07:48:37 +00:00
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c
tree-cfg.c tree-cfg.c (verify_expr): Verify that BIT_FIELD_REF... 2013-05-29 12:32:22 +02:00
tree-cfgcleanup.c
tree-chrec.c
tree-chrec.h
tree-complex.c * tree-complex.c (expand_complex_operations_1): Fix typo. 2013-07-05 11:40:07 +02:00
tree-data-ref.c
tree-data-ref.h
tree-dfa.c
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... 2013-05-29 20:42:50 +00:00
tree-emutls.c lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Rename to ... 2013-06-01 13:08:53 +00:00
tree-flow-inline.h
tree-flow.h tree-flow.h (gimple_check_call_matching_types): Add new argument. 2013-06-15 16:56:01 +00:00
tree-hasher.h
tree-if-conv.c
tree-inline.c PR57698, only report errors from early inlining when optimization is turned 2013-07-18 19:24:22 +00:00
tree-inline.h
tree-into-ssa.c tree-into-ssa.c (interesting_blocks): Make static. 2013-06-10 20:25:14 +00:00
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c
tree-mudflap.c
tree-mudflap.h
tree-nested.c
tree-nomudflap.c
tree-nrv.c
tree-object-size.c tree-object-size.c (unknown): Make const. 2013-06-07 19:14:06 +00:00
tree-optimize.c
tree-outof-ssa.c
tree-parloops.c
tree-pass.h tree-pass.h (pass_ipa_lto_wpa_fixup): Remove redundant decl. 2013-07-18 16:22:52 +00:00
tree-phinodes.c
tree-predcom.c
tree-pretty-print.c
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c
tree-ssa-address.c
tree-ssa-alias.c
tree-ssa-alias.h
tree-ssa-ccp.c
tree-ssa-coalesce.c gimple.h (gimple_can_coalesce_p): Prototype. 2013-06-14 12:52:32 -06:00
tree-ssa-copy.c re PR tree-optimization/57411 (ICE: verify_ssa failed: definition in block 4 does not dominate use in block 11 with -fno-tree-dce -ftree-vectorize) 2013-05-28 10:54:33 +00:00
tree-ssa-copyrename.c
tree-ssa-dce.c
tree-ssa-dom.c re PR tree-optimization/57411 (ICE: verify_ssa failed: definition in block 4 does not dominate use in block 11 with -fno-tree-dce -ftree-vectorize) 2013-05-28 10:54:33 +00:00
tree-ssa-dse.c re PR tree-optimization/57361 (Remove self memory assignment) 2013-06-12 17:56:30 +00:00
tree-ssa-forwprop.c tree-ssa-forwprop.c (simplify_bitwise_binary_boolean): Fix typo in comment. 2013-06-19 11:09:10 -06:00
tree-ssa-ifcombine.c
tree-ssa-live.c gimple.h (gimple_can_coalesce_p): Prototype. 2013-06-14 12:52:32 -06:00
tree-ssa-live.h
tree-ssa-loop-ch.c
tree-ssa-loop-im.c
tree-ssa-loop-ivcanon.c cgraph.h (const_value_known_p): Replace by ... 2013-06-19 18:06:12 +00:00
tree-ssa-loop-ivopts.c
tree-ssa-loop-manip.c
tree-ssa-loop-niter.c re PR tree-optimization/57584 (ice: SSA corruption: Unable to coalesce ssa_names) 2013-06-20 10:22:33 +00:00
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-math-opts.c Partially reverted: 2013-05-31 Tobias Burnus <burnus@net-b.de> 2013-06-01 10:39:59 +02:00
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c
tree-ssa-phiprop.c
tree-ssa-pre.c re PR tree-optimization/57488 (loop terminates early at -O3) 2013-06-24 10:22:22 +00:00
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c re PR tree-optimization/57442 (ICE in appears_later_in_bb, at tree-ssa-reassoc.c:2891) 2013-05-29 17:30:43 +00:00
tree-ssa-sccvn.c revert: re PR rtl-optimization/57381 (array of volatile pointers hangs gcc) 2013-05-27 12:44:29 +00:00
tree-ssa-sccvn.h
tree-ssa-sink.c
tree-ssa-strlen.c
tree-ssa-structalias.c tree-ssa-structalias.c (call_stmt_vars): Make static. 2013-06-05 00:52:32 +00:00
tree-ssa-tail-merge.c
tree-ssa-ter.c
tree-ssa-threadedge.c
tree-ssa-threadupdate.c
tree-ssa-uncprop.c gimple.h (gimple_can_coalesce_p): Prototype. 2013-06-14 12:52:32 -06:00
tree-ssa-uninit.c re PR middle-end/57287 (Bogus uninitialized warning with abnormal control flow) 2013-05-24 12:44:58 +00:00
tree-ssa.c
tree-ssanames.c
tree-stdarg.c
tree-stdarg.h
tree-streamer-in.c lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 15:08:24 +00:00
tree-streamer-out.c lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 15:08:24 +00:00
tree-streamer.c pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 12:17:16 +00:00
tree-streamer.h pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 12:17:16 +00:00
tree-switch-conversion.c
tree-tailcall.c
tree-vect-data-refs.c tree-vect-data-refs.c (dr_group_sort_cmp): Do not use hash function in compare function for sorting. 2013-07-15 20:03:07 -04:00
tree-vect-generic.c
tree-vect-loop-manip.c
tree-vect-loop.c re PR tree-optimization/57741 (ICE in tree.c:build_int_cst_wide starting in revision 200394) 2013-07-02 13:54:09 +02:00
tree-vect-patterns.c re PR tree-optimization/57537 (gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64) 2013-06-12 15:01:49 +02:00
tree-vect-slp.c dumpfile.c (opt_info_switch_p): Change -fopt-info default to -fopt-info=optimized instead of all. 2013-06-03 18:39:04 +00:00
tree-vect-stmts.c tree-vect-stmts.c (vectorizable_store): Move ptr_incr var decl before the loop, initialize to NULL. 2013-06-27 17:35:57 +02:00
tree-vectorizer.c dumpfile.c (opt_info_switch_p): Change -fopt-info default to -fopt-info=optimized instead of all. 2013-06-03 18:39:04 +00:00
tree-vectorizer.h
tree-vrp.c re PR target/29776 (result of ffs/clz/ctz/popcount/parity are already sign-extended) 2013-07-06 11:34:17 +02:00
tree.c gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Use types_same_for_odr. 2013-06-21 06:43:39 +00:00
tree.def
tree.h print-tree.c (debug_vec_tree): Use debug_raw. 2013-07-13 19:10:29 -04:00
treestruct.def
tsan.c tsan.c (tsan_atomic_table): Make const. 2013-06-05 10:14:15 +00:00
tsan.h
tsystem.h
typeclass.h
valtrack.c
valtrack.h
value-prof.c tree-flow.h (gimple_check_call_matching_types): Add new argument. 2013-06-15 16:56:01 +00:00
value-prof.h
var-tracking.c
varasm.c expr.c (expand_expr_real_1): Fix formatting glitches. 2013-06-25 07:23:19 +00:00
varpool.c cgraph.h (const_value_known_p): Replace by ... 2013-06-19 18:06:12 +00:00
vec.c
vec.h This patch adds a call to ggc_free from va_gc::release, which is called by vec_free. 2013-07-11 21:32:14 +00:00
version.c
version.h
vmsdbg.h
vmsdbgout.c
web.c
xcoff.h
xcoffout.c
xcoffout.h

README.Portability

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