gcc/gcc
Richard Biener b56b040c84 re PR tree-optimization/66123 (Array of labels as values + ternary operator + pointer arithmetic = internal compiler error)
2015-05-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/66123
	* tree-ssa-dom.c (propagate_rhs_into_lhs): Check if we found
	a taken edge.

	* gcc.dg/torture/pr66123.c: New testcase.

From-SVN: r223130
2015-05-13 10:59:49 +00:00
..
ada mmix.c, msp430.c: Add space between string literal and macro name. 2015-05-12 21:11:13 -04:00
c Implement -Wmisleading-indentation 2015-05-12 20:57:38 +00:00
c-family Implement -Wmisleading-indentation 2015-05-12 20:57:38 +00:00
common [AArch64] Increase static buffer size in aarch64_rewrite_selected_cpu 2015-04-21 08:14:22 +00:00
config re PR target/65103 ([i386] GOTOFF relocation is not propagated into address expression) 2015-05-13 08:29:14 +00:00
cp Implement -Wmisleading-indentation 2015-05-12 20:57:38 +00:00
doc gcc: Bump to automake 1.11.6 2015-05-13 10:32:56 +00:00
fortran re PR fortran/66111 (ICE with matmul and vector subscripts) 2015-05-12 21:12:55 +00:00
ginclude
go compiler: If unary & does not escape, the var does not escape. 2015-05-12 22:13:01 +00:00
java remove need for store_values_directly 2015-04-18 18:13:18 +00:00
jit Unbreak the JIT after conversion of md_asm_adjust to use vec<> 2015-05-12 17:19:54 +00:00
lto dwarf2out.c (gen_type_die_with_usage): Call verify_type. 2015-04-30 02:45:54 +00:00
objc Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
objcp Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
po * sv.po: Update. 2015-05-11 21:08:32 +01:00
testsuite re PR tree-optimization/66123 (Array of labels as values + ternary operator + pointer arithmetic = internal compiler error) 2015-05-13 10:59:49 +00:00
ABOUT-GCC-NLS
BASE-VER * BASE-VER: Set to 6.0.0. 2015-04-12 21:46:43 +02:00
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog re PR tree-optimization/66123 (Array of labels as values + ternary operator + pointer arithmetic = internal compiler error) 2015-05-13 10:59:49 +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.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
DATESTAMP Daily bump. 2015-05-13 00:16:15 +00:00
DEV-PHASE
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in re PR middle-end/66110 (uint8_t memory access not optimized) 2015-05-13 10:53:42 +00:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4 gcc: Bump to automake 1.11.6 2015-05-13 10:32:56 +00:00
addresses.h
alias.c re PR middle-end/66110 (uint8_t memory access not optimized) 2015-05-13 10:53:42 +00:00
alias.h
alloc-pool.c
alloc-pool.h
asan.c Allow wildcards in -fsanitize-sections. 2015-04-22 11:44:26 +00:00
asan.h asan.c (set_sanitized_sections): New function. 2015-04-17 07:51:02 +00:00
attribs.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
attribs.h
auto-inc-dec.c
auto-profile.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
auto-profile.h
basic-block.h
bb-reorder.c always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
bb-reorder.h
bitmap.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
bitmap.h
bt-load.c
builtin-attrs.def
builtin-types.def
builtins.c re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins) 2015-05-12 20:01:47 +00:00
builtins.def
builtins.h
caller-save.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
calls.c calls.c (prepare_call_address): Transform PLT call to GOT lookup and indirect call by forcing address into a... 2015-05-11 16:20:57 +03:00
calls.h
ccmp.c
ccmp.h
cfg-flags.def
cfg.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
cfg.h
cfganal.c
cfganal.h
cfgbuild.c
cfgbuild.h
cfgcleanup.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
cfgcleanup.h
cfgexpand.c Convert to md_asm_adjust 2015-05-11 16:33:23 -07:00
cfgexpand.h
cfghooks.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
cfghooks.h cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
cfgloop.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgloopmanip.h
cfgrtl.c change in_expr_list_p to in_insn_list_p 2015-05-09 04:15:52 +00:00
cfgrtl.h
cgraph.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
cgraph.h Fix spurious semicolons 2015-04-30 21:07:45 +00:00
cgraphbuild.c
cgraphclones.c
cgraphunit.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
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 combine.c (recog_for_combine_1): New function, factored out from recog_for_combine. 2015-05-12 15:42:21 +02:00
common.md
common.opt calls.c (prepare_call_address): Transform PLT call to GOT lookup and indirect call by forcing address into a... 2015-05-11 16:20:57 +03:00
compare-elim.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
conditions.h Re: [PATCH 02/12] remove some ifdef HAVE_cc0. 2015-04-23 10:34:58 +00:00
config.build
config.gcc [PATCH 2/13] musl libc config 2015-05-08 08:25:47 +00:00
config.host [AArch64] Implement -m{cpu,tune,arch}=native using only /proc/cpuinfo 2015-04-24 14:52:47 +00:00
config.in re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants) 2015-04-28 13:17:19 +09:30
configure [PATCH 2/13] musl libc config 2015-05-08 08:25:47 +00:00
configure.ac [PATCH 2/13] musl libc config 2015-05-08 08:25:47 +00:00
context.c
context.h
convert.c
convert.h
coretypes.h re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins) 2015-05-12 20:01:47 +00:00
coverage.c Patch by Richard Biener 2015-05-11 02:48:49 +00:00
coverage.h
cppbuiltin.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
cse.c cse_change_cc0_mode can take a rtx_insn * 2015-05-09 04:16:49 +00:00
cselib.c make fp_setter_insn take a rtx_insn * 2015-05-02 21:06:27 +00:00
cselib.h make fp_setter_insn take a rtx_insn * 2015-05-02 21:06:27 +00:00
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
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
df-core.c df-core.c (df_finish_pass): Iterate over df->problems_by_index[] and use df_remove_problem rather than... 2015-04-21 10:23:25 +00:00
df-problems.c rtx_insn * in df-problems.c 2015-05-09 04:17:38 +00:00
df-scan.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic.c
diagnostic.def
diagnostic.h
dojump.c dojump.c (do_compare_rtx_and_jump): Use std::swap instead of manual swaps. 2015-04-29 21:47:40 -06:00
dojump.h
dominance.c
dominance.h
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
dumpfile.c
dumpfile.h
dwarf2asm.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
dwarf2asm.h
dwarf2cfi.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
dwarf2out.c class.c (fixup_type_variants): Do not copy TYPE_METHODS 2015-05-11 22:24:33 +00:00
dwarf2out.h
emit-rtl.c re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins) 2015-05-12 20:01:47 +00:00
emit-rtl.h function.h (struct emit_status): Delete x_first_insn, x_last_insn and sequence_stack. 2015-04-15 15:35:44 +09:30
errors.c
errors.h
et-forest.c
et-forest.h
except.c can_nonlocal_goto can take a rtx_insn * 2015-05-09 04:16:03 +00:00
except.h make make_reg_eh_region_note and friend take rtx_insn * 2015-05-09 04:15:41 +00:00
exec-tool.in
explow.c
explow.h
expmed.c [expmed] Properly account for the cost and latency of shift+add ops when synthesizing mults 2015-04-21 12:56:39 +00:00
expmed.h
expr.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
expr.h
fibonacci_heap.h
file-find.c
file-find.h
final.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
fixed-value.c
fixed-value.h
flag-types.h c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting flexible member array-like members if... 2015-05-07 08:08:57 +00:00
flags.h
fold-const.c Handle internal_fn in operand_equal_p 2015-04-17 09:26:50 +00:00
fold-const.h
fp-test.c
function.c re PR rtl-optimization/66048 ([i386] ICE in create_pre_exit when both AVX and MPX are used) 2015-05-13 07:49:59 +00:00
function.h make set_return_jump_label take an rtx_insn * 2015-05-02 21:06:59 +00:00
fwprop.c
gcc-ar.c
gcc-main.c
gcc-plugin.h
gcc-symtab.h
gcc.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
gcc.h
gcov-counter.def
gcov-dump.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
gcov-io.c
gcov-io.h
gcov-iov.c
gcov-tool.c gcov-tool.c (do_merge): Refactore to remove int ret. 2015-05-07 19:57:11 +02:00
gcov.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
gcse-common.c
gcse-common.h
gcse.c pass rtx_insn * more in gcse.c 2015-05-09 04:16:54 +00:00
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk
genattr-common.c
genattr.c
genattrtab.c
genautomata.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c always define HAVE_cc0 2015-04-22 00:44:27 +00:00
genconstants.c
genemit.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
genenums.c
generic-match-head.c match.pd (bit_and (plus/minus (convert @0) (convert @1) mask): New simplifier to narrow arithmetic. 2015-05-07 07:18:07 -06:00
generic-match.h
genextract.c
genflags.c
gengenrtl.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
gengtype-lex.l
gengtype-parse.c
gengtype-state.c
gengtype.c
gengtype.h
genhooks.c
genmatch.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c re PR target/65689 ([AArch64] S constraint fails for inline asm at -O0) 2015-04-17 18:43:28 +02:00
genrecog.c genrecog.c (match_pattern_1): Expect the pattern to be a SEQUENCE for define_peephole2s. 2015-05-11 19:54:42 +00:00
gensupport.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
gensupport.h
ggc-common.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
ggc-internal.h
ggc-none.c
ggc-page.c
ggc.h
gimple-builder.c
gimple-builder.h
gimple-expr.c
gimple-expr.h
gimple-fold.c re PR tree-optimization/65650 (CCP does not propgate copies) 2015-04-21 12:52:43 +00:00
gimple-fold.h gimple-fold.h (gimple_build): Remove optional valueize arguments. 2015-04-20 13:23:59 +00:00
gimple-iterator.c Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
gimple-iterator.h Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
gimple-low.c
gimple-low.h
gimple-match-head.c match.pd (bit_and (plus/minus (convert @0) (convert @1) mask): New simplifier to narrow arithmetic. 2015-05-07 07:18:07 -06:00
gimple-match.h re PR tree-optimization/65650 (CCP does not propgate copies) 2015-04-21 12:52:43 +00:00
gimple-pretty-print.c
gimple-pretty-print.h
gimple-ssa-isolate-paths.c
gimple-ssa-strength-reduction.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c gimple-walk.c #include TLC 2015-04-29 12:45:31 +02:00
gimple-walk.h
gimple.c Convert to md_asm_adjust 2015-05-11 16:33:23 -07:00
gimple.def
gimple.h
gimplify-me.c
gimplify-me.h
gimplify.c Gimplify va_arg ap based on do_deref 2015-05-13 09:06:18 +00:00
gimplify.h Gimplify va_arg ap based on do_deref 2015-05-13 09:06:18 +00:00
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-dependences.c
graphite-interchange.c
graphite-isl-ast-to-gimple.c
graphite-isl-ast-to-gimple.h
graphite-optimize-isl.c
graphite-poly.c
graphite-poly.h
graphite-scop-detection.c graphite-scop-detection.c: Do not include cp/cp-tree.h. 2015-04-14 12:33:57 +00:00
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 make several functions in the scheduler take rtx_insn * 2015-05-02 21:05:54 +00:00
hard-reg-set.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-map.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-set.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-table.c
hash-table.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
highlev-plugin-common.h
hooks.c Convert to md_asm_adjust 2015-05-11 16:33:23 -07:00
hooks.h Convert to md_asm_adjust 2015-05-11 16:33:23 -07:00
host-default.c
hosthooks-def.h
hosthooks.h
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
ifcvt.h
inchash.c inchash.h, inchash.c: Include bconfig.h for build objects. 2015-04-29 13:32:34 +00:00
inchash.h inchash.h, inchash.c: Include bconfig.h for build objects. 2015-04-29 13:32:34 +00:00
incpath.c Convert to md_asm_adjust 2015-05-11 16:33:23 -07:00
incpath.h
init-regs.c
input.c
input.h re PR c/61534 (Wlogical-op should not warn when either operand comes from macro expansion) 2015-04-24 11:49:52 +00:00
insn-addr.h
insn-notes.def
internal-fn.c re PR target/66112 (__builtin_mul_overflow for int16_t emits poor code) 2015-05-13 10:07:58 +02:00
internal-fn.def Mark ifn_va_arg as ECF_LEAF 2015-04-26 07:13:13 +00:00
internal-fn.h
intl.c
intl.h
ipa-chkp.c dwarf2out.c (gen_type_die_with_usage): Call verify_type. 2015-04-30 02:45:54 +00:00
ipa-chkp.h
ipa-comdats.c
ipa-cp.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
ipa-devirt.c ipa-devirt.c (type_with_linkage_p): New function. 2015-05-12 18:30:40 +00:00
ipa-icf-gimple.c re PR ipa/65765 (Compiling Firefox with GCC 5 leads to broken javascript engine on x86-64) 2015-04-15 13:47:44 +02:00
ipa-icf-gimple.h
ipa-icf.c gcov-tool.c (do_merge): Refactore to remove int ret. 2015-05-07 19:57:11 +02:00
ipa-icf.h ipa-icf.c (sem_function::equals_wpa): Compare thunk info. 2015-04-24 00:58:25 +00:00
ipa-inline-analysis.c
ipa-inline-transform.c re PR middle-end/65743 (LTO+FDO build of Firefox crashes at startup) 2015-04-12 05:44:52 +00:00
ipa-inline.c re PR ipa/65873 (Failure to inline always_inline memcpy) 2015-05-13 02:54:50 +00:00
ipa-inline.h
ipa-polymorphic-call.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
ipa-profile.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
ipa-prop.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
ipa-prop.h
ipa-pure-const.c
ipa-ref.c
ipa-ref.h
ipa-reference.c Fix IPA memory leaks. 2015-04-17 13:56:15 +00:00
ipa-reference.h
ipa-split.c
ipa-utils.c
ipa-utils.h ipa-devirt.c (type_with_linkage_p): New function. 2015-05-12 18:30:40 +00:00
ipa-visibility.c
ipa.c
ira-build.c
ira-color.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
ira-conflicts.c
ira-costs.c ira-costs.c (record_operand_costs): Fix typo (remove redundant code). 2015-04-23 00:43:30 +00:00
ira-emit.c
ira-int.h
ira-lives.c add default definition of EH_RETURN_DATA_REGNO 2015-04-22 00:44:08 +00:00
ira.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
ira.h change more argument types to rtx_insn * 2015-05-09 04:17:00 +00:00
is-a.h
jump.c redirect_jump* can take a rtx_insn * 2015-05-09 04:17:49 +00:00
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 bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
loop-init.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
loop-invariant.c re PR rtl-optimization/64616 (Redundant ldr when accessing var inside and outside a loop) 2015-05-13 05:39:14 +00:00
loop-iv.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
loop-unroll.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
loop-unroll.h
lower-subreg.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
lower-subreg.h
lra-assigns.c re PR target/65710 (Thumb1 ICE caused by no register to spill) 2015-04-10 19:38:55 +00:00
lra-coalesce.c
lra-constraints.c setup_next_usage_insn can take a rtx_insn * 2015-05-09 04:17:44 +00:00
lra-eliminations.c change more argument types to rtx_insn * 2015-05-09 04:17:00 +00:00
lra-int.h re PR target/65710 (Thumb1 ICE caused by no register to spill) 2015-04-09 19:40:09 +00:00
lra-lives.c add default definition of EH_RETURN_DATA_REGNO 2015-04-22 00:44:08 +00:00
lra-remat.c
lra-spills.c re PR rtl-optimization/65805 (Chromium gets miscompiled) 2015-04-19 23:48:24 +00:00
lra.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
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 remove need for store_values_directly 2015-04-18 18:13:18 +00:00
lto-wrapper.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
machmode.def
machmode.h
main.c
match.pd match.pd (bit_and (plus/minus (convert @0) (convert @1) mask): New simplifier to narrow arithmetic. 2015-05-07 07:18:07 -06:00
mcf.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
mkconfig.sh
mode-classes.def
mode-switching.c Convert to md_asm_adjust 2015-05-11 16:33:23 -07:00
modulo-sched.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
omega.c
omega.h
omp-builtins.def
omp-low.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
omp-low.h
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs.c re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins) 2015-05-12 20:01:47 +00:00
optabs.def
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
opts-common.c
opts-diagnostic.h
opts-global.c asan.c (set_sanitized_sections): New function. 2015-04-17 07:51:02 +00:00
opts.c c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting flexible member array-like members if... 2015-05-07 08:08:57 +00:00
opts.h
output.h Properly handle uninitialized common symbol 2015-04-17 09:23:24 -07:00
params.c
params.def
params.h Summary: Mark help string in DEFPARAM as no-c-format 2015-05-01 14:07:51 +00:00
pass_manager.h
passes.c Fix fdump-passes 2015-04-15 18:43:32 +00:00
passes.def re PR tree-optimization/66002 (paq8p benchmark 50% slower than clang on sandybridge) 2015-05-07 09:52:38 +00:00
plugin.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
plugin.def
plugin.h
postreload-gcse.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
postreload.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
predict.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-rtl.h
print-tree.c
print-tree.h
profile.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
profile.h
read-md.c
read-md.h
read-rtl.c
real.c
real.h
realmpfr.c
realmpfr.h
recog.c more rtx_insn * in recog.c 2015-05-09 04:17:12 +00:00
recog.h more rtx_insn * in recog.c 2015-05-09 04:17:12 +00:00
ree.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
reg-notes.def
reg-stack.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
regcprop.c kill_autoinc_value can take a rtx_insn * 2015-05-02 21:05:04 +00:00
regcprop.h
reginfo.c reduce conditional compilation for HARD_FRAME_POINTER_IS_FRAME_POINTER 2015-04-22 00:44:54 +00:00
regrename.c add default for HARD_REGNO_RENAME_OK 2015-04-28 04:40:43 +00:00
regrename.h
regs.h
regset.h
regstat.c
reload.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
reload.h gcov-tool.c (do_merge): Refactore to remove int ret. 2015-05-07 19:57:11 +02:00
reload1.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
reorg.c use rtx_insn * more in reorg.c 2015-05-09 04:17:05 +00:00
resource.c add default for EPILOGUE_USES 2015-04-28 04:43:12 +00:00
resource.h
rtl-chkp.c
rtl-chkp.h
rtl-error.c
rtl-error.h
rtl-iter.h
rtl.c
rtl.def
rtl.h redirect_jump* can take a rtx_insn * 2015-05-09 04:17:49 +00:00
rtlanal.c re PR rtl-optimization/66076 (ICE: in vec_safe_grow, at vec.h:618 with -funroll-loops -mno-prefer-avx128 -march=bdver4) 2015-05-11 09:35:53 +00:00
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c
sanitizer.def
sanopt.c
sbitmap.c
sbitmap.h
sched-deps.c more rtx_insn * in sched-deps.c 2015-05-09 04:17:22 +00:00
sched-ebb.c
sched-int.h more rtx_insn * in sched-deps.c 2015-05-09 04:17:22 +00:00
sched-rgn.c make several functions in the scheduler take rtx_insn * 2015-05-02 21:05:54 +00:00
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 rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
sel-sched.h
sese.c
sese.h
shrink-wrap.c always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
shrink-wrap.h always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
signop.h
simplify-rtx.c [simplify-rtx][trivial] Use std::swap instead of manually swapping 2015-04-27 13:45:26 +00:00
sparseset.c
sparseset.h
sreal.c
sreal.h
ssa-iterators.h
stab.def
stack-ptr-mod.c
statistics.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
statistics.h
stmt.c Only resolve_asm_operand_names once 2015-05-11 16:33:07 -07:00
stmt.h
stor-layout.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
stor-layout.h
store-motion.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
streamer-hooks.c
streamer-hooks.h
stringpool.c
stringpool.h
symbol-summary.h
symtab.c
sync-builtins.def
system.h Convert to md_asm_adjust 2015-05-11 16:33:23 -07:00
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target.def Convert to md_asm_adjust 2015-05-11 16:33:23 -07:00
target.h
targhooks.c remove #if ARGS_GROW_DOWNWARD 2015-04-28 04:47:09 +00:00
targhooks.h
timevar.c Move global state in timevar.c to a new "timer" class 2015-05-12 17:29:32 +00:00
timevar.def
timevar.h Move global state in timevar.c to a new "timer" class 2015-05-12 17:29:32 +00:00
tlink.c
toplev.c Move global state in timevar.c to a new "timer" class 2015-05-12 17:29:32 +00:00
toplev.h
tracer.c
trans-mem.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
trans-mem.h
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c Fix example in header comment in tree-call-cdce.c 2015-04-28 08:46:37 +00:00
tree-cfg.c stor-layout.c (self_referential_component_ref_p): New predicate. 2015-04-27 10:29:07 +00:00
tree-cfg.h Add gimple_find_sub_bbs 2015-04-17 09:26:33 +00:00
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chkp-opt.c
tree-chkp.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
tree-chkp.h
tree-chrec.c
tree-chrec.h
tree-complex.c
tree-core.h
tree-data-ref.c
tree-data-ref.h
tree-dfa.c
tree-dfa.h
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-eh.h
tree-emutls.c
tree-hasher.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-if-conv.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
tree-inline.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
tree-inline.h
tree-into-ssa.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-into-ssa.h
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c
tree-nested.c
tree-nested.h
tree-nrv.c
tree-object-size.c
tree-object-size.h
tree-outof-ssa.c make emit_partition_copy return a rtx_insn * 2015-05-02 21:07:15 +00:00
tree-outof-ssa.h
tree-parloops.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-parloops.h
tree-pass.h Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
tree-phinodes.c
tree-phinodes.h
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 remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias.c
tree-ssa-alias.h
tree-ssa-ccp.c re PR c++/65851 (ice in set_lattice_value at tree-ssa-cc p.c:535) 2015-04-28 07:26:41 +00:00
tree-ssa-coalesce.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-copyrename.c
tree-ssa-dce.c re PR tree-optimization/66101 (internal compiler error: in verify_loop_structure, at cfgloop.c:1662) 2015-05-12 13:28:33 +00:00
tree-ssa-dom.c re PR tree-optimization/66123 (Array of labels as values + ternary operator + pointer arithmetic = internal compiler error) 2015-05-13 10:59:49 +00:00
tree-ssa-dom.h
tree-ssa-dse.c
tree-ssa-forwprop.c
tree-ssa-ifcombine.c
tree-ssa-live.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-live.h
tree-ssa-loop-ch.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-loop-im.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c Fix spurious semicolons 2015-04-30 21:07:45 +00:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c Fix spurious semicolons 2015-04-30 21:07:45 +00:00
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-loop.h
tree-ssa-math-opts.c
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-phiprop.c
tree-ssa-pre.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-propagate.c tree-ssa-ccp.c (likely_value): See if we have operands that are marked as never simulate again and return... 2015-04-16 07:55:57 +00:00
tree-ssa-propagate.h
tree-ssa-reassoc.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
tree-ssa-sccvn.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-sccvn.h
tree-ssa-scopedtables.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-scopedtables.h re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-sink.c
tree-ssa-strlen.c
tree-ssa-structalias.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-tail-merge.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadedge.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-threadedge.h re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-threadupdate.c re PR tree-optimization/65658 (Jump threading too pessimistic when optimizing for size) 2015-04-20 13:35:50 -06:00
tree-ssa-threadupdate.h
tree-ssa-uncprop.c
tree-ssa-uninit.c
tree-ssa.c
tree-ssa.h
tree-ssanames.c
tree-ssanames.h
tree-stdarg.c Gimplify va_arg ap based on do_deref 2015-05-13 09:06:18 +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-tailcall.c (suitable_for_tail_opt_p, [...]): Remove unneeded forward declarations. 2015-04-22 10:20:32 +02:00
tree-vect-data-refs.c re PR tree-optimization/66036 (strided group loads are not vectorized) 2015-05-08 15:13:55 +00:00
tree-vect-generic.c
tree-vect-loop-manip.c
tree-vect-loop.c Fix indentation issues seen by -Wmisleading-indentation 2015-05-05 19:41:11 +00:00
tree-vect-patterns.c
tree-vect-slp.c re PR tree-optimization/37021 (Fortran Complex reduction / multiplication not vectorized) 2015-05-12 11:55:40 +00:00
tree-vect-stmts.c re PR tree-optimization/66036 (strided group loads are not vectorized) 2015-05-08 15:13:55 +00:00
tree-vectorizer.c tree-vectorizer.c (set_uid_loop_bbs): New. 2015-04-29 23:42:54 -06:00
tree-vectorizer.h re PR tree-optimization/37021 (Fortran Complex reduction / multiplication not vectorized) 2015-05-12 11:55:40 +00:00
tree-vrp.c re PR tree-optimization/64454 (optimize (x%5)%5) 2015-05-09 15:40:05 +00:00
tree.c ipa-devirt.c (type_with_linkage_p): New function. 2015-05-12 18:30:40 +00:00
tree.def class.c (fixup_type_variants): Do not copy TYPE_METHODS 2015-05-11 22:24:33 +00:00
tree.h re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins) 2015-05-12 20:01:47 +00:00
treestruct.def
tsan.c re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins) 2015-05-12 20:01:47 +00:00
tsan.h
tsystem.h
typeclass.h
ubsan.c re PR middle-end/65984 (ICE: definition in block 4 does not dominate use in block 2 with -fnon-call-exceptions -fsanitize=enum) 2015-05-04 21:52:33 +02:00
ubsan.h
valtrack.c
valtrack.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
value-prof.c bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
value-prof.h
var-tracking.c rtl.h (always_void_p): New function. 2015-05-07 16:58:46 +00:00
varasm.c re PR middle-end/192 (String literals don't obey -fdata-sections) 2015-05-07 17:51:01 +02:00
varasm.h Give proper type and size to named cold partitions. 2015-04-27 09:44:35 -07:00
varpool.c
vec.c
vec.h vec.h (vec): Make splice arguments const. 2015-04-27 09:55:21 +00:00
version.c
version.h
vmsdbg.h
vmsdbgout.c
vtable-verify.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
vtable-verify.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
web.c
wide-int-print.cc bitmap.c, [...]: Add space between string literal and macro name. 2015-05-09 00:50:05 -04:00
wide-int-print.h
wide-int.cc
wide-int.h
xcoff.h
xcoffout.c
xcoffout.h

README.Portability

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