gcc/gcc
Richard Guenther 2fb5f2af00 re PR middle-end/35411 (internal compiler error: in set_ssa_val_to, at tree-ssa-sccvn.c:1075)
2008-03-01  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/35411
	* tree-sra.c (sra_build_assignment): Split conversion to
	final type to a separate statement if we are not assigning
	to a register.

From-SVN: r132791
2008-03-01 00:27:26 +00:00
..
ada Minor reformatting. 2008-02-27 14:07:30 +01:00
config arm.md (arm_addsi3): Add r/k/n alternative. 2008-02-29 18:57:29 +00:00
cp parser.c (cp_parser_nonclass_name): New. 2008-02-29 21:38:00 +00:00
doc invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
fortran re PR fortran/35059 (Seg fault when max constructor limit reached) 2008-02-29 22:50:25 +00:00
ginclude
java expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on method. 2008-02-29 12:55:06 +00:00
objc system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
objcp [multiple changes] 2008-02-07 19:03:40 +00:00
po * ru.po: Update. 2008-02-08 15:51:37 +00:00
testsuite re PR c++/35315 (ICE with attribute transparent_union) 2008-02-29 21:41:38 +00:00
treelang system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
alias.c re PR target/35258 (two memcpy calls merged incorrectly with -O1) 2008-02-25 15:07:17 +00:00
alias.h re PR target/35258 (two memcpy calls merged incorrectly with -O1) 2008-02-25 15:07:17 +00:00
alloc-pool.c
alloc-pool.h
attribs.c re PR c++/35315 (ICE with attribute transparent_union) 2008-02-26 13:09:02 -05:00
auto-inc-dec.c
BASE-VER * BASE-VER: Set to 4.4.0. 2008-02-18 23:41:06 +01:00
basic-block.h system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
bb-reorder.c Fix PR rtl-optimization/34999 2008-02-27 13:27:56 +00:00
bitmap.c
bitmap.h
bt-load.c
builtin-attrs.def
builtin-types.def
builtins.c re PR tree-optimization/26264 (Extraneous warning with __builtin_stdarg_start and optimization) 2008-02-26 14:16:13 +00:00
builtins.def re PR tree-optimization/26264 (Extraneous warning with __builtin_stdarg_start and optimization) 2008-02-26 14:16:13 +00:00
c-aux-info.c
c-common.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
c-common.def
c-common.h
c-config-lang.in
c-convert.c
c-cppbuiltin.c
c-decl.c c-decl.c (merge_decls): Use DECL_USER_ALIGN() on olddecl to update the respective field on newdecl. 2008-02-27 14:59:50 +00:00
c-dump.c
c-errors.c
c-format.c
c-format.h
c-gimplify.c
c-incpath.c
c-incpath.h
c-lang.c
c-lex.c toplev.c (input_file_stack, [...]): Remove. 2008-02-29 20:09:05 +00:00
c-objc-common.c
c-objc-common.h
c-omp.c
c-opts.c c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA and CPP_PRAGMA_EOL. 2008-02-27 09:51:22 +01:00
c-parser.c re PR c/28800 (warning "ISO C forbids an empty source file" could be improved) 2008-02-26 22:41:16 +00:00
c-pch.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
c-ppoutput.c c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA and CPP_PRAGMA_EOL. 2008-02-27 09:51:22 +01:00
c-pragma.c c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA and CPP_PRAGMA_EOL. 2008-02-27 09:51:22 +01:00
c-pragma.h c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA and CPP_PRAGMA_EOL. 2008-02-27 09:51:22 +01:00
c-pretty-print.c re PR c++/34055 (ICE with invalid specialization of variadic template) 2008-01-29 13:59:59 +00:00
c-pretty-print.h
c-semantics.c
c-tree.h
c-typeck.c c-common.c (match_case_to_enum_1): Add appropriate OPT_W* parameter to warning. 2008-02-25 23:59:44 +00:00
c.opt re PR c/34351 (Please get us the "volatile register" warning back) 2008-02-26 14:04:09 +00:00
caller-save.c
calls.c
cfg.c re PR rtl-optimization/31396 (Inline code performance much worse than out-of-line) 2008-01-16 16:32:05 +00:00
cfganal.c
cfgbuild.c
cfgcleanup.c dbgcnt.def (cfg_cleanup, [...]): New counters. 2008-02-26 14:21:21 -05:00
cfgexpand.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
cfghooks.c
cfghooks.h
cfglayout.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
cfglayout.h
cfgloop.c
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgrtl.c
cgraph.c re PR middle-end/34969 (ICE with -fipa-cp -ffast-math) 2008-01-30 00:21:24 +01:00
cgraph.h re PR middle-end/34969 (ICE with -fipa-cp -ffast-math) 2008-01-30 00:21:24 +01:00
cgraphbuild.c
cgraphunit.c re PR middle-end/34969 (ICE with -fipa-cp -ffast-math) 2008-01-30 00:21:24 +01:00
ChangeLog re PR middle-end/35411 (internal compiler error: in set_ssa_val_to, at tree-ssa-sccvn.c:1075) 2008-03-01 00:27:26 +00:00
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007 2008-01-12 Richard Guenther <rguenther@suse.de> 2008-01-12 12:27:07 +00:00
ChangeLog.dataflow
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
collect2.c
collect2.h
combine-stack-adj.c
combine.c re PR middle-end/34627 (Incorrect branching with -Ox on hppa) 2008-02-09 00:30:13 +00:00
common.opt invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
conditions.h
config.build re PR bootstrap/35273 (Bootstrap of mingw32 using non-MSYS shell broken) 2008-02-21 19:55:39 +00:00
config.gcc config.gcc (powerpc*-*-*): Add new cores e300c2 and e300c3. 2008-02-24 09:38:03 -05:00
config.host
config.in system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
configure system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
configure.ac system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coverage.c
coverage.h
cppdefault.c
cppdefault.h
cppspec.c
crtstuff.c
cse.c re PR target/35258 (two memcpy calls merged incorrectly with -O1) 2008-02-25 15:07:17 +00:00
cselib.c
cselib.h
cstamp-h.in
DATESTAMP Daily bump. 2008-03-01 00:18:22 +00:00
dbgcnt.c
dbgcnt.def dbgcnt.def (cfg_cleanup, [...]): New counters. 2008-02-26 14:21:21 -05:00
dbgcnt.h
dbxout.c
dbxout.h
dce.c dbgcnt.def (cfg_cleanup, [...]): New counters. 2008-02-26 14:21:21 -05:00
dce.h
ddg.c re PR tree-optimization/26854 (Inordinate compile times on large routines) 2008-01-22 13:57:01 +00:00
ddg.h
debug.c
debug.h re PR debug/34249 (FAIL: gcc.dg/tree-prof/bb-reorg.c compilation, -fprofile-use -D_PROFILE_USE) 2008-01-16 12:10:27 +01:00
defaults.h MAINTAINERS (c4x port): Remove. 2008-01-25 20:49:04 +00:00
DEV-PHASE
df-core.c re PR middle-end/34400 (bad interaction between DF and SJLJ exceptions) 2008-01-17 20:02:56 +00:00
df-problems.c re PR tree-optimization/26854 (Inordinate compile times on large routines) 2008-01-22 13:57:01 +00:00
df-scan.c
df.h re PR tree-optimization/26854 (Inordinate compile times on large routines) 2008-01-22 13:57:01 +00:00
dfp.c
dfp.h
diagnostic.c toplev.c (input_file_stack, [...]): Remove. 2008-02-29 20:09:05 +00:00
diagnostic.def
diagnostic.h toplev.c (input_file_stack, [...]): Remove. 2008-02-29 20:09:05 +00:00
dojump.c
dominance.c
domwalk.c
domwalk.h
double-int.c
double-int.h re PR bootstrap/35051 (Build machine requires GMP and MPFR for building cross-host gccs) 2008-02-08 19:10:25 +00:00
dse.c dbgcnt.def (cfg_cleanup, [...]): New counters. 2008-02-26 14:21:21 -05:00
dse.h
dummy-checksum.c
dwarf2.h
dwarf2asm.c
dwarf2asm.h
dwarf2out.c re PR debug/34895 (ICE in force_type_die, at dwarf2out.c:12923) 2008-01-23 16:44:27 +00:00
dwarf2out.h
dwarf.h
ebitmap.c
ebitmap.h
emit-rtl.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
emit-rtl.h
emutls.c
errors.c
errors.h
et-forest.c
et-forest.h
except.c
except.h
exec-tool.in
explow.c explow.c (memory_address): Assert that the generated address is valid. 2008-02-23 21:11:25 +00:00
expmed.c expmed.c (extract_bit_field): Always use adjust_address for MEM. 2008-02-23 15:45:03 +00:00
expr.c re PR middle-end/34971 (bitfield rotates are folded and expanded wrong) 2008-02-27 09:50:04 +00:00
expr.h
final.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
fix-header.c
fixed-value.c
fixed-value.h
fixproto Committed with RM approval this time. 2008-01-25 07:52:56 +11:00
flags.h invoke.texi (Warning Options): Add new option -Wframe-larger-than=. 2008-02-20 21:19:14 +00:00
fold-const.c fold-const.c (fold_convertible_p): Correct the logic to follow that in fold_convert(). 2008-02-29 22:01:22 +00:00
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c re PR middle-end/34621 (gcc.c-torture/execute/va-arg-25.c:32: internal compiler error: in expand_call, at calls.c:2785) 2008-02-15 10:55:36 +01:00
function.h re PR target/34814 (SDmode function args not passed according to ABI specification) 2008-01-26 11:18:35 -06:00
fwprop.c re PR rtl-optimization/34773 (miscompilation of vfprintf_r) 2008-02-01 21:28:46 +00:00
gbl-ctors.h
gcc.c re PR driver/34904 (-march=native doesn't work with multiple input files) 2008-01-24 10:57:12 -08:00
gcc.h
gccbug.in
gccspec.c
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov.c
gcse.c dbgcnt.def (cfg_cleanup, [...]): New counters. 2008-02-26 14:21:21 -05:00
gdbinit.in
gen-protos.c
genattr.c
genattrtab.c
genautomata.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
gengtype.h
genmddeps.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
ggc-common.c Support valgrind 3.3 for --enable-checking=valgrind. 2008-02-19 04:13:05 +00:00
ggc-none.c
ggc-page.c Support valgrind 3.3 for --enable-checking=valgrind. 2008-02-19 04:13:05 +00:00
ggc-zone.c Support valgrind 3.3 for --enable-checking=valgrind. 2008-02-19 04:13:05 +00:00
ggc.h
gimple-low.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
gimplify.c re PR middle-end/35136 (ICE caused by address calculation with loop variable when optimization is on) 2008-02-14 19:07:38 +00:00
glimits.h
global.c re PR rtl-optimization/34998 (gcc.c-torture/execute/20040709-1.c fails for -EL -mips16 -O3) 2008-01-30 11:18:27 +00:00
graph.c
graph.h
graphds.c
graphds.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
gstab.h
gsyms.h
gsyslimits.h
gthr-aix.h
gthr-dce.h
gthr-gnat.c
gthr-gnat.h
gthr-lynx.h
gthr-mipssde.h
gthr-nks.h
gthr-posix95.h
gthr-posix.c
gthr-posix.h
gthr-rtems.h gthr-rtems.h: Remove __GTHREAD_MUTEX_INIT. 2008-02-06 04:33:09 +01:00
gthr-single.h
gthr-solaris.h
gthr-tpf.h
gthr-vxworks.h
gthr-win32.h [multiple changes] 2008-02-10 18:06:34 +00:00
gthr.h
haifa-sched.c
hard-reg-set.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hwint.h
ifcvt.c dbgcnt.def (cfg_cleanup, [...]): New counters. 2008-02-26 14:21:21 -05:00
init-regs.c
input.h toplev.c (input_file_stack, [...]): Remove. 2008-02-29 20:09:05 +00:00
insn-addr.h
insn-notes.def
integrate.c
integrate.h
intl.c
intl.h
ipa-cp.c
ipa-inline.c
ipa-prop.c
ipa-prop.h
ipa-pure-const.c
ipa-reference.c
ipa-reference.h
ipa-struct-reorg.c re PR c/35002 (Incorrect spelling of "hottest") 2008-01-29 16:56:20 +01:00
ipa-struct-reorg.h
ipa-type-escape.c
ipa-type-escape.h
ipa-utils.c
ipa-utils.h
ipa.c re PR middle-end/35149 (ICE: in expand_call_inline, at tree-inline.c:2653) 2008-02-15 11:15:48 +00:00
jump.c
lambda-code.c lambda-code.c (lambda_transform_legal_p): Handle the case of no dependences in the dependence_relations vector. 2008-01-16 19:26:26 +00:00
lambda-mat.c
lambda-trans.c
lambda.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
langhooks-def.h
langhooks.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
langhooks.h
LANGUAGES
lcm.c
libada-mk.in
libfuncs.h
libgcc2.c
libgcc2.h
libgcc-std.ver
libgcov.c
limitx.h
limity.h
lists.c
local-alloc.c re PR rtl-optimization/31396 (Inline code performance much worse than out-of-line) 2008-01-16 16:32:05 +00:00
longlong.h
loop-doloop.c Fix 34826 2008-01-17 17:49:32 +00:00
loop-init.c
loop-invariant.c re PR tree-optimization/26854 (Inordinate compile times on large routines) 2008-01-22 13:57:01 +00:00
loop-iv.c re PR tree-optimization/26854 (Inordinate compile times on large routines) 2008-01-22 13:57:01 +00:00
loop-unroll.c
loop-unswitch.c
lower-subreg.c
machmode.def
machmode.h
main.c
Makefile.in invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
matrix-reorg.c
mips-tdump.c
mips-tfile.c
mkconfig.sh
mkmap-flat.awk
mkmap-symver.awk
mode-classes.def
mode-switching.c
modulo-sched.c SMS: Revisit order of insns within a row 2008-02-25 11:28:10 +00:00
omega.c
omega.h
omp-builtins.def
omp-low.c re PR middle-end/35196 (lastprivate broken for static non-ordered loops) 2008-02-15 18:42:25 +01:00
ONEWS
opt-functions.awk
opt-gather.awk
optabs.c re PR target/35083 (ICE: in extract_insn, at recog.c:1990) 2008-02-06 11:45:29 +01:00
optabs.h
optc-gen.awk common.opt (Wlarger-than=): New. 2008-02-26 14:01:02 +00:00
opth-gen.awk common.opt (Wlarger-than=): New. 2008-02-26 14:01:02 +00:00
opts-common.c re PR other/32754 (The opt?-gen.awk file generators produce incorrect credits) 2008-02-07 20:40:19 +00:00
opts.c common.opt (Wlarger-than=): New. 2008-02-26 14:01:02 +00:00
opts.h re PR other/28322 (GCC new warnings and compatibility) 2008-02-25 23:41:43 +00:00
output.h
params.c
params.def re PR c/35002 (Incorrect spelling of "hottest") 2008-01-29 16:56:20 +01:00
params.h
passes.c invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
pointer-set.c
pointer-set.h
postreload-gcse.c re PR target/35045 (gcc-4.3 generates wrong code on i386 with -O3) 2008-02-02 15:00:57 +00:00
postreload.c
predict.c (tree_bb_level_predictions): Remove variable next mistakely introduced 2008-02-19 22:27:01 +00:00
predict.def predict.def (PRED_TREE_OPCODE_POSITIVE, [...]): Update. 2008-02-21 16:52:54 +00:00
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-tree.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
profile.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
protoize.c
ra-conflict.c re PR rtl-optimization/34998 (gcc.c-torture/execute/20040709-1.c fails for -EL -mips16 -O3) 2008-01-30 11:18:27 +00:00
ra.h global.c (find_reg): Mark the eh regs as used if necessary. 2008-01-17 16:18:59 +00:00
read-rtl.c
README.Portability
real.c MAINTAINERS (c4x port): Remove. 2008-01-25 20:49:04 +00:00
real.h re PR bootstrap/35051 (Build machine requires GMP and MPFR for building cross-host gccs) 2008-02-08 19:10:25 +00:00
recog.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
recog.h
reg-notes.def re PR rtl-optimization/34773 (miscompilation of vfprintf_r) 2008-02-01 21:28:46 +00:00
reg-stack.c
regclass.c * regclass.c (current_pass): Remove declaration. 2008-02-22 21:39:12 +00:00
regmove.c regmove.c (fixup_match_1): Update call crossed frequencies. 2008-01-21 07:54:41 -08:00
regrename.c
regs.h re PR rtl-optimization/31396 (Inline code performance much worse than out-of-line) 2008-01-16 16:32:05 +00:00
regstat.c re PR rtl-optimization/31396 (Inline code performance much worse than out-of-line) 2008-01-16 16:32:05 +00:00
reload1.c
reload.c re PR target/34995 (MIPS16 ICE in gcc.c-torture/compile/pr34856.c) 2008-01-31 09:25:52 +00:00
reload.h
reorg.c
resource.c
resource.h
rtl-error.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
rtl-factoring.c
rtl.c
rtl.def system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
rtl.h system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
rtlanal.c
rtlhooks-def.h
rtlhooks.c
sbitmap.c
sbitmap.h
scan-decls.c
scan-types.sh
scan.c
scan.h
sched-deps.c
sched-ebb.c
sched-int.h
sched-rgn.c
sched-vis.c
sdbout.c
sdbout.h
see.c re PR rtl-optimization/34408 (Invalid RTL sharing with -fsee and inline functions) 2008-02-19 17:11:12 +00:00
simplify-rtx.c simplify-rtx.c (simplify_unary_operation_1): Extend the handling of SUBREG_PROMOTED_VAR_P to cope with cases where the... 2008-02-28 20:02:09 +00:00
sort-protos
sparseset.c re PR rtl-optimization/33796 (valgrind error with -O2 for linux kernel code) 2008-01-16 21:21:36 -06:00
sparseset.h
sreal.c
sreal.h
stab.def
stack-ptr-mod.c
statistics.h
stmt.c
stor-layout.c common.opt (Wlarger-than=): New. 2008-02-26 14:01:02 +00:00
stringpool.c
struct-equiv.c
stub-objc.c
sync-builtins.def
sys-protos.h
sys-types.h
system.h system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
target-def.h re PR target/34814 (SDmode function args not passed according to ABI specification) 2008-01-26 11:18:35 -06:00
target.h re PR target/34814 (SDmode function args not passed according to ABI specification) 2008-01-26 11:18:35 -06:00
targhooks.c
targhooks.h
timevar.c
timevar.def invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
timevar.h
tlink.c
toplev.c toplev.c (input_file_stack, [...]): Remove. 2008-02-29 20:09:05 +00:00
toplev.h
tracer.c
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-cfg.c invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-cfgcleanup.c
tree-chrec.c
tree-chrec.h
tree-complex.c tree.def (PAREN_EXPR): New tree code. 2008-02-21 09:38:07 +00:00
tree-data-ref.c invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-data-ref.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-dfa.c revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-dump.c tree-dump.c (dequeue_and_dump): Check DECL_SAVED_TREE, not DECL_LANG_SPECIFIC, when dumping body. 2008-02-27 15:49:19 +00:00
tree-dump.h
tree-eh.c re PR c++/34196 (uninitialized variable warning in dead exception region) 2008-01-21 23:53:33 -05:00
tree-flow-inline.h revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-flow.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-gimple.c
tree-gimple.h
tree-if-conv.c
tree-inline.c re PR c++/35315 (ICE with attribute transparent_union) 2008-02-29 21:41:38 +00:00
tree-inline.h re PR tree-optimization/35006 (Segfault in remove_unused_locals with nested functions) 2008-01-29 15:47:19 +00:00
tree-into-ssa.c revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-loop-linear.c tree-loop-linear.c (try_interchange_loops): Compare memory access strides against cache sizes. 2008-02-29 12:41:14 +00:00
tree-mudflap.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
tree-mudflap.h
tree-nested.c re PR middle-end/34921 (Misalign stack variable referenced by nested function) 2008-02-18 15:43:23 -08:00
tree-nomudflap.c
tree-nrv.c
tree-object-size.c
tree-optimize.c common.opt (Wlarger-than=): New. 2008-02-26 14:01:02 +00:00
tree-outof-ssa.c
tree-parloops.c tree-parloops (gen_parallel_loop): Revert my fix. 2008-01-16 04:17:49 +00:00
tree-pass.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-phinodes.c
tree-predcom.c
tree-pretty-print.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
tree-profile.c re PR gcov-profile/34610 (ICE with "-fprofile-arcs -fopenmp") 2008-01-19 18:49:46 +01:00
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c re PR middle-end/35411 (internal compiler error: in set_ssa_val_to, at tree-ssa-sccvn.c:1075) 2008-03-01 00:27:26 +00:00
tree-ssa-address.c
tree-ssa-alias-warnings.c revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-ssa-alias.c revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-ssa-ccp.c re PR middle-end/32135 (bogus array-ref fold triggering array overflow warning) 2008-01-13 11:18:08 +00:00
tree-ssa-coalesce.c
tree-ssa-copy.c re PR c++/34862 (operator new placement variant with reference arg not accepted by g++ 4.3) 2008-01-28 19:43:51 +00:00
tree-ssa-copyrename.c re PR c++/34862 (operator new placement variant with reference arg not accepted by g++ 4.3) 2008-01-28 19:43:51 +00:00
tree-ssa-dce.c
tree-ssa-dom.c
tree-ssa-dse.c
tree-ssa-forwprop.c re PR tree-optimization/34989 (ICE in get_addr_dereference_operands, at tree-ssa-operands.c:1698 with IMA) 2008-02-19 11:55:29 +00:00
tree-ssa-ifcombine.c
tree-ssa-live.c
tree-ssa-live.h
tree-ssa-loop-ch.c
tree-ssa-loop-im.c re PR tree-optimization/33992 (Miscompiles function with inlining, breaks profiledbootstrap) 2008-02-11 08:27:00 +00:00
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c coding convention 2008-02-19 09:34:16 +01:00
tree-ssa-loop-manip.c
tree-ssa-loop-niter.c
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-math-opts.c re PR tree-optimization/34966 (ICE: verify_ssa fails when optimization trigonometric code) 2008-01-25 12:08:52 +00:00
tree-ssa-operands.c revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-ssa-operands.h
tree-ssa-phiopt.c
tree-ssa-pre.c tree-ssa-pre.c (get_sccvn_value): Create missing VNs via vn_lookup_or_add. 2008-02-29 14:01:09 +00:00
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c tree.h (fold_real_zero_addition_p): Declare. 2008-02-20 14:13:47 +00:00
tree-ssa-sccvn.c tree-ssa-pre.c (get_sccvn_value): Create missing VNs via vn_lookup_or_add. 2008-02-29 14:01:09 +00:00
tree-ssa-sccvn.h
tree-ssa-sink.c
tree-ssa-structalias.c revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-ssa-structalias.h
tree-ssa-ter.c tree-ssa-ter.c (free_temp_expr_table): Free num_in_part and new_replaceable_dependencies. 2008-01-13 04:27:46 +00:00
tree-ssa-threadedge.c
tree-ssa-threadupdate.c
tree-ssa-uncprop.c
tree-ssa.c revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-ssanames.c
tree-stdarg.c re PR tree-optimization/26264 (Extraneous warning with __builtin_stdarg_start and optimization) 2008-02-26 14:16:13 +00:00
tree-stdarg.h
tree-tailcall.c
tree-vect-analyze.c invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-vect-generic.c
tree-vect-patterns.c re PR tree-optimization/35171 (ICE in vect_recog_dot_prod_pattern) 2008-02-12 21:29:39 +00:00
tree-vect-transform.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
tree-vectorizer.c invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-vectorizer.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-vn.c
tree-vrp.c http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01094.html 2008-02-24 11:40:32 -05:00
tree.c re PR target/33963 (Dllimport attribute wrongly accepted on typedefs) 2008-02-28 12:34:51 +00:00
tree.def tree.def (PAREN_EXPR): New tree code. 2008-02-21 09:38:07 +00:00
tree.h revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
treestruct.def
tsystem.h
typeclass.h
unwind-c.c
unwind-compat.c
unwind-compat.h
unwind-dw2-fde-compat.c
unwind-dw2-fde-darwin.c
unwind-dw2-fde-glibc.c
unwind-dw2-fde.c
unwind-dw2-fde.h
unwind-dw2.c
unwind-dw2.h
unwind-generic.h
unwind-pe.h
unwind-sjlj.c
unwind.inc
value-prof.c
value-prof.h
var-tracking.c re PR debug/35065 (infinite loop while compiling VLC media player in vt_find_locations) 2008-02-13 14:53:59 +00:00
varasm.c
varpool.c
varray.c
varray.h
vec.c
vec.h
vecprim.h
version.c
version.h
vmsdbg.h
vmsdbgout.c
web.c
xcoff.h
xcoffout.c
xcoffout.h

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


free and realloc
----------------

Some implementations crash upon attempts to free or realloc the null
pointer.  Thus if mem might be null, you need to write

  if (mem)
    free (mem);


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.