gcc/gcc
Richard Biener a3cc13ccc8 re PR middle-end/58484 (ICE in chrec_fold_plus_1, at tree-chrec.c:272 building 416.gamess)
2013-09-20  Richard Biener  <rguenther@suse.de>

	PR middle-end/58484
	* tree-scalar-evolution.c (struct scev_info_str): Shrink by
	remembering SSA name version and block index.
	(new_scev_info_str): Adjust.
	(hash_scev_info): Likewise.  Also hash the block index.
	(eq_scev_info): Adjust.
	(find_var_scev_info): Likewise.
	(struct instantiate_cache_entry): Remove.
	(struct instantiate_cache_type): Use a htab to map name, block
	to chrec.
	(instantiate_cache_type::~instantiate_cache_type): Adjust.
	(get_instantiated_value_entry): Likewise.
	(hash_idx_scev_info, eq_idx_scev_info): New functions.
	(instantiate_scev_name): Adjust.

	* gfortran.dg/pr58484.f: New testcase.

From-SVN: r202790
2013-09-20 17:49:45 +00:00
..
ada re PR ada/58264 (incorrect bounds of string when assigned from dereference of function result) 2013-09-18 10:51:43 +00:00
c re PR sanitizer/58443 (ubsan doesn't properly honor fsanitize= flags) 2013-09-18 13:31:34 +00:00
c-family re PR sanitizer/58411 (no_sanitize_undefined function attribute) 2013-09-18 10:01:40 +00:00
common i386-common.c (OPTION_MASK_ISA_AVX512F_SET): New. 2013-08-22 06:06:03 +00:00
config aarch64-builtins.c (aarch64_simd_expand_args): Call aarch64_simd_expand_args to update op[argc]. 2013-09-20 16:25:07 +00:00
cp re PR c++/58457 (ICE when placement new operator is used with using keyword and custom constructor) 2013-09-18 18:11:46 +00:00
doc re PR other/58467 (Documentation of the "used" variable attribute needs additional information) 2013-09-20 06:08:44 +00:00
fortran re PR fortran/58099 ([F03] over-zealous procedure-pointer error checking) 2013-09-20 09:44:05 +02:00
ginclude Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
go compiler: Fix inconsistent check for structs using memcmp for ==. 2013-09-19 17:32:56 +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-streamer.h (lto_global_var_decls): Remove. 2013-09-06 09:06:25 +00:00
objc re PR target/48094 (ld: warning: section has unexpectedly large size errors in objc/obj-c++ lto) 2013-09-14 15:36:41 +00:00
objcp Makefile.in (LLINKER): New variable. 2013-05-16 11:09:31 -04:00
po * fi.po: Update. 2013-07-11 22:47:04 +01:00
testsuite re PR middle-end/58484 (ICE in chrec_fold_plus_1, at tree-chrec.c:272 building 416.gamess) 2013-09-20 17:49:45 +00:00
ABOUT-GCC-NLS Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
BASE-VER * BASE-VER: Set to 4.9.0. 2013-03-16 08:09:59 +01:00
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog re PR middle-end/58484 (ICE in chrec_fold_plus_1, at tree-chrec.c:272 building 416.gamess) 2013-09-20 17:49:45 +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 Fix non-ASCII characters in names. 2013-04-09 09:29:32 +02:00
ChangeLog.dataflow Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ChangeLog.graphite
ChangeLog.lib Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ChangeLog.ptr Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ChangeLog.tree-ssa Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ChangeLog.tuples Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
DATESTAMP Daily bump. 2013-09-20 00:16:56 +00:00
DEV-PHASE
FSFChangeLog Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
FSFChangeLog.10 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
FSFChangeLog.11 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
LANGUAGES Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
Makefile.in re PR driver/42955 (undecorated cross-compiler gcc fails to find cc1) 2013-09-12 16:07:32 -07:00
ONEWS Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
README.Portability Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
acinclude.m4 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
aclocal.m4 libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical ppc host match. 2013-09-20 19:17:52 +09:30
addresses.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
alias.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
alias.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
alloc-pool.c This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
alloc-pool.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
asan.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
asan.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
attribs.c This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
auto-inc-dec.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
basic-block.h basic-block.h (class control_dependences): New. 2013-09-06 07:24:11 +00:00
bb-reorder.c This patch sanitizes the partitioning to address issues such as edge weight insanities that sometimes occur due to upstream optimizations... 2013-08-31 01:43:33 +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 This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
bitmap.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
bt-load.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
builtin-attrs.def Merge ubsan into trunk. 2013-08-30 16:12:58 +00:00
builtin-types.def Implemented Cilk Plus Array Notation for C Compiler. 2013-05-28 12:55:10 -07:00
builtins.c re PR sanitizer/58411 (no_sanitize_undefined function attribute) 2013-09-18 10:01:40 +00:00
builtins.def Merge ubsan into trunk. 2013-08-30 16:12:58 +00:00
builtins.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
caller-save.c alias.c (addr_side_effect_eval): Use gen_int_mode with the mode of the associated gen_rtx_* call. 2013-09-09 13:06:43 +00:00
calls.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
cfg-flags.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
cfg.c This patch sanitizes the partitioning to address issues such as edge weight insanities that sometimes occur due to upstream optimizations... 2013-08-31 01:43:33 +00:00
cfganal.c cfganal.c (control_dependences::~control_dependences): Properly free all of the vector. 2013-09-06 10:38:08 +00:00
cfgbuild.c First phase of unifying the computation of profile scale factors/probabilities and the actual scaling to use rounding divides... 2013-04-08 17:39:10 +00:00
cfgcleanup.c re PR rtl-optimization/58365 (likely wrong code bug) 2013-09-10 13:47:19 +02:00
cfgexpand.c cfgexpand.c (expand_debug_expr): Avoid sign-extending SImode to PSImode. 2013-09-12 13:06:38 -04:00
cfghooks.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
cfghooks.h cfghooks.c (copy_bbs): Add update_dominance argument. 2013-05-16 17:09:40 +00:00
cfgloop.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
cfgloop.h Makefile.in (omp-low.o): Depend on $(TARGET_H). 2013-08-27 18:38:00 +00:00
cfgloopanal.c function.h (loops_for_fn): New inline function. 2013-04-30 08:14:09 +00:00
cfgloopmanip.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
cfgrtl.c This patch sanitizes the partitioning to address issues such as edge weight insanities that sometimes occur due to upstream optimizations... 2013-08-31 01:43:33 +00:00
cgraph.c cgraph.c (cgraph_create_edge_1): Avoid uninitialized read of speculative flag. 2013-09-19 12:20:47 +00:00
cgraph.h tree-into-ssa.c (gate_into_ssa): New. 2013-09-14 15:27:21 +00:00
cgraphbuild.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
cgraphclones.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
cgraphunit.c tree-into-ssa.c (gate_into_ssa): New. 2013-09-14 15:27:21 +00:00
cif-code.def re PR ipa/58332 (error: inlined_to pointer is set but no predecessors found) 2013-09-17 17:45:00 +00:00
cilkplus.def Implemented Cilk Plus Array Notation for C Compiler. 2013-05-28 12:55:10 -07:00
collect2-aix.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
collect2-aix.h * collect2-aix.h: Define F_LOADONLY. 2013-02-14 20:40:55 +00:00
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 Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
combine.c gcc/ 2013-09-09 13:07:02 +00:00
common.opt Introduce -ftree-loop-vectorize option 2013-09-16 19:55:40 +00:00
compare-elim.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
conditions.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
config.build config.build: Add support for cygwin x64 target. 2013-03-27 22:54:50 +01:00
config.gcc c-target.def: New hook 2013-09-13 20:06:41 +02:00
config.host config.build: Add support for cygwin x64 target. 2013-03-27 22:54:50 +01:00
config.in configure.ac: Add GAS check for LEON instructions on SPARC. 2013-08-09 09:13:32 +00:00
configure libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical ppc host match. 2013-09-20 19:17:52 +09:30
configure.ac Initial version of gdb hooks 2013-08-28 03:01:20 +00:00
context.c Revert my last two changes, r201865 and r201864 2013-08-20 15:51:18 +00:00
context.h Revert my last two changes, r201865 and r201864 2013-08-20 15:51:18 +00:00
convert.c target.def (TARGET_LIBC_HAS_FUNCTION): New target hook. 2013-08-19 12:21:26 +00:00
convert.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
coretypes.h pretty-print.h (output_buffer::output_buffer): Declare. 2013-08-22 10:14:46 +00:00
coverage.c coverage.c (get_coverage_counts): Add missing newline. 2013-09-17 14:26:44 +00:00
coverage.h cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
cppbuiltin.c Merge ubsan into trunk. 2013-08-30 16:12:58 +00:00
cppbuiltin.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
cppdefault.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
cppdefault.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
cprop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
cse.c cse.c (try_const_anchors): Punt on CC modes. 2013-09-16 07:24:15 +00: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 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
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 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
data-streamer.h data-streamer.h (streamer_write_char_stream): CSE obs->current_pointer. 2013-06-12 11:09:50 +00:00
dbgcnt.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
dbgcnt.def Delay base decl's alignment adjustment until transformation happens 2013-09-03 18:19:04 +00:00
dbgcnt.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
dbxout.c cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... 2013-05-29 20:42:50 +00:00
dbxout.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
dce.c Revert: 2013-08-21 12:35:01 -06:00
dce.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ddg.c Fix typos. 2013-07-21 18:31:07 +00:00
ddg.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
debug.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
debug.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
defaults.h target.def (TARGET_LIBC_HAS_FUNCTION): New target hook. 2013-08-19 12:21:26 +00:00
df-core.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
df-problems.c df-problems.c (can_move_insns_across): Exit loop once we find a non-fixed, non-global register. 2013-07-22 09:20:11 -06:00
df-scan.c lower-subreg.c (resolve_simple_move): If called self-recursive... 2013-04-17 23:05:59 +00:00
df.h df.h (df_insn_delete): Adjust prototype. 2013-03-22 16:37:00 +00:00
dfp.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
dfp.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
diagnostic-color.c Makefile.in (toplev.o): Depend on diagnostic-color.h. 2013-04-26 08:55:56 +02:00
diagnostic-color.h opts.c: Include diagnostic-color.h. 2013-04-12 08:20:36 +02:00
diagnostic-core.h opts.c: Include diagnostic-color.h. 2013-04-12 08:19:58 +02:00
diagnostic.c re PR c++/54941 (do not print line/column numbers for <built-in>:0:0) 2013-09-08 14:30:27 +00:00
diagnostic.def opts.c: Include diagnostic-color.h. 2013-04-12 08:19:58 +02:00
diagnostic.h pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
dojump.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
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 compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
domwalk.h compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
double-int.c re PR other/57324 (Undefined behavior issues found with clang's -fsanitize=undefined) 2013-08-23 22:16:08 +00:00
double-int.h Fix typos. 2013-07-21 18:31:07 +00:00
dse.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
dumpfile.c dumpfile.c (dump_loc): Remove newline emission. 2013-09-16 13:40:02 +00:00
dumpfile.h dumpfile.c (dump_loc): Output column number. 2013-08-29 13:51:04 +00:00
dwarf2asm.c dwarf2asm.c (dw2_output_indirect_constant_1): Mark new decl STATIC. 2013-05-13 23:04:10 +00:00
dwarf2asm.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
dwarf2cfi.c asan.c (asan_emit_stack_protection): Use gen_int_mode instead of GEN_INT. 2013-09-09 13:07:10 +00:00
dwarf2out.c dwarf2out.c (should_emit_struct_debug): Add check for type_decl variable is not NULL. 2013-09-13 15:36:42 -07:00
dwarf2out.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
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 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
errors.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
errors.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
et-forest.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
et-forest.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
except.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
except.h re PR c++/55135 (Segfault of gcc on a big file) 2013-03-05 14:45:23 +00:00
exec-tool.in Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
explow.c gcc/ 2013-09-09 13:07:02 +00:00
expmed.c expmed.c (lshift_value): Take an unsigned HOST_WIDE_INT instead of an rtx/bitpos pair. 2013-09-09 13:07:18 +00:00
expmed.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
expr.c re PR middle-end/57748 (ICE when expanding assignment to unaligned zero-sized array) 2013-09-20 14:10:14 +00:00
expr.h re PR target/52555 (ICE unrecognizable insn with -ffast-math and __attribute__((optimize(xx)))) 2013-02-19 00:04:49 +00:00
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 tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
fixed-value.c double-int.h (lshift): New overload without precision and arith argument. 2013-05-03 11:09:59 +00:00
fixed-value.h re PR tree-optimization/56064 (Optimize VIEW_CONVERT_EXPR with FIXED_CST) 2013-02-08 13:23:34 +00:00
flag-types.h Merge ubsan into trunk. 2013-08-30 16:12:58 +00:00
flags.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
fold-const.c re PR tree-optimization/58088 (ICE in gcc.c) 2013-09-17 13:29:41 +00:00
fp-test.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
function.c gcc/ 2013-09-09 13:07:02 +00:00
function.h Makefile.in (omp-low.o): Depend on $(TARGET_H). 2013-08-27 18:38:00 +00:00
fwprop.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
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 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gcc.c Merge ubsan into trunk. 2013-08-30 16:12:58 +00:00
gcc.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gcov-dump.c This patch enables the gcov-dump tool to optionally compute and dump the working set information from the counter histogram... 2013-04-03 20:51:28 +00:00
gcov-io.c This patch enables the gcov-dump tool to optionally compute and dump the working set information from the counter histogram... 2013-04-03 20:51:28 +00:00
gcov-io.h cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
gcov-iov.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gcov.c gcov.c (print_usage): Handle new option. 2013-06-20 05:20:09 +00:00
gcse.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
gcse.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gdbhooks.py Initial version of gdb hooks 2013-08-28 03:01:20 +00:00
gdbinit.in * gdbinit.in (__FUNCTION__): Add. 2013-06-05 16:36:00 +00:00
gen-pass-instances.awk gen-pass-instances.awk: Fix offset of substr(). 2013-07-31 09:34:04 +00:00
genattr-common.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genattr.c Fix typos. 2013-07-21 18:31:07 +00:00
genattrtab.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genautomata.c Add error message for mismatched parentheses in reservation string 2013-06-11 22:23:18 +00:00
gencheck.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genchecksum.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gencodes.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genconditions.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genconfig.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genconstants.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genemit.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genenums.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genextract.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genflags.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gengenrtl.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gengtype-lex.l Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gengtype-parse.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gengtype-state.c Fix typos. 2013-07-21 18:31:07 +00:00
gengtype.c gengtype.c (file_rules): Added rule for *.cc files. 2013-09-20 15:50:56 +00:00
gengtype.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genhooks.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genmddeps.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genmddump.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genmodes.c genmodes.c (emit_max_int): New function. 2013-03-28 14:46:31 +00:00
genmultilib t-aarch64-linux (MULTARCH_DIRNAME): Remove. 2013-03-14 09:52:13 +01:00
genopinit.c re PR target/52555 (ICE unrecognizable insn with -ffast-math and __attribute__((optimize(xx)))) 2013-02-19 00:04:49 +00:00
genoutput.c re PR other/12081 (Gcc can't be compiled with -mregparm=3) 2013-08-05 22:09:45 +00:00
genpeep.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
genpreds.c genpreds.c (write_lookup_constraint): Do not compare first letter of the constraint again. 2013-02-20 09:04:29 +00:00
genrecog.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gensupport.c reload.c (find_reloads): Exit loop once we find this operand cannot be reloaded somehow for this alternative. 2013-07-23 09:56:37 -06:00
gensupport.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ggc-common.c This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
ggc-internal.h Remove zone allocator. 2013-01-24 10:13:46 -05:00
ggc-none.c Remove zone allocator. 2013-01-24 10:13:46 -05:00
ggc-page.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
ggc.h Revert my last two changes, r201865 and r201864 2013-08-20 15:51:18 +00:00
gimple-fold.c gimple-fold.c (can_refer_decl_in_current_unit_p): Do not accept abstract functions; for static functions check the presence of body. 2013-09-16 11:47:48 +00:00
gimple-fold.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gimple-iterator.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
gimple-low.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
gimple-pretty-print.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
gimple-pretty-print.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
gimple-ssa-strength-reduction.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
gimple-streamer-in.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
gimple-streamer-out.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
gimple-streamer.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gimple.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
gimple.def Makefile.in (omp-low.o): Depend on $(TARGET_H). 2013-08-27 18:38:00 +00:00
gimple.h tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
gimplify.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
glimits.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
godump.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
graph.c pretty-print.h (output_buffer::output_buffer): Declare. 2013-08-22 10:14:46 +00:00
graph.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
graphds.c graphds.h (struct graph): Add obstack member. 2013-05-02 13:59:38 +00:00
graphds.h graphds.h (struct graph): Add obstack member. 2013-05-02 13:59:38 +00:00
graphite-blocking.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
graphite-clast-to-gimple.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
graphite-clast-to-gimple.h This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
graphite-dependences.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
graphite-htab.h This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
graphite-interchange.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
graphite-optimize-isl.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
graphite-poly.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
graphite-poly.h This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
graphite-scop-detection.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
graphite-scop-detection.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
graphite-sese-to-poly.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
graphite-sese-to-poly.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
graphite.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
gsstruct.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gstab.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gsyms.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
gsyslimits.h
gtm-builtins.def gtm-builtins.def (_ITM_free): Declare leaf. 2013-08-28 19:42:19 +02:00
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 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
hash-table.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
hash-table.h This patch extracts approved portions of the hash_table patches to the... 2013-04-23 22:00:12 +00:00
highlev-plugin-common.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
hooks.c [Mid-end] Add TARGET_GIMPLE_FOLD_BUILTIN target hook. 2013-04-22 14:50:32 +00:00
hooks.h [Mid-end] Add TARGET_GIMPLE_FOLD_BUILTIN target hook. 2013-04-22 14:50:32 +00:00
host-default.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
hosthooks-def.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
hosthooks.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
hw-doloop.c avr.c, [...]: Where applicable... 2013-03-23 12:11:10 +00:00
hw-doloop.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
hwint.c hwint.c (sext_hwi, zext_hwi): New functions. 2013-04-03 20:24:07 +00:00
hwint.h re PR other/57324 (Undefined behavior issues found with clang's -fsanitize=undefined) 2013-08-23 22:16:08 +00:00
ifcvt.c asan.c (asan_clear_shadow): Use gen_int_mode with the mode of the associated expand_* call. 2013-09-09 13:06:53 +00:00
incpath.c incpath.c (add_standard_paths): Use reconcat instead of concat where appropriate and avoid leaking memory. 2013-02-27 08:28:48 +01:00
incpath.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
init-regs.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
input.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
input.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
insn-addr.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
insn-notes.def re PR rtl-optimization/56131 (gcc.dg/pr56035.c ICEs gcc on sparc-linux) 2013-02-25 11:50:25 +00:00
internal-fn.c Makefile.in (omp-low.o): Depend on $(TARGET_H). 2013-08-27 18:38:00 +00:00
internal-fn.def Makefile.in (omp-low.o): Depend on $(TARGET_H). 2013-08-27 18:38:00 +00:00
internal-fn.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
intl.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
intl.h re PR bootstrap/54659 (Bootstrap with --disable-nls broken under Windows) 2013-05-08 09:22:14 -04:00
ipa-cp.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
ipa-devirt.c re PR ipa/58329 (ld: Invalid symbol type for plabel (.libs/libstdc++.lax/libc++11convenience.a/system_error.o, std::error_category::default_error_condition(int) const [clone .localalias.9]).) 2013-09-17 15:46:06 +00:00
ipa-inline-analysis.c re PR ipa/58332 (error: inlined_to pointer is set but no predecessors found) 2013-09-17 17:45:00 +00:00
ipa-inline-transform.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
ipa-inline.c re PR ipa/58332 (error: inlined_to pointer is set but no predecessors found) 2013-09-17 17:45:00 +00:00
ipa-inline.h cgraph.c (cgraph_turn_edge_to_speculative): Return newly introduced edge; fix typo in sanity check. 2013-08-13 12:21:16 +00:00
ipa-profile.c re PR ipa/58329 (ld: Invalid symbol type for plabel (.libs/libstdc++.lax/libc++11convenience.a/system_error.o, std::error_category::default_error_condition(int) const [clone .localalias.9]).) 2013-09-17 15:46:06 +00:00
ipa-prop.c ipa-prop.c (ipa_compute_jump_functions_for_edge): Return early for internal calls. 2013-09-16 10:03:31 +02:00
ipa-prop.h ipa-prop.h (ipa_pass_through_data): New field type_preserved. 2013-08-27 23:41:15 +02:00
ipa-pure-const.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
ipa-ref-inline.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ipa-ref.c * ipa-ref.c (ipa_clear_stmts_in_references): Clear lto_stmt_uid, too. 2013-08-09 23:07:52 +00:00
ipa-ref.h cgraphbuild.c (cgraph_rebuild_references): Rebuild only non-speculative refs. 2013-08-09 15:23:19 +00:00
ipa-reference.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
ipa-reference.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ipa-split.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
ipa-utils.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
ipa-utils.h re PR middle-end/58094 (IPA devirt testsuite errors) 2013-09-06 10:13:37 +00:00
ipa.c re PR ipa/58329 (ld: Invalid symbol type for plabel (.libs/libstdc++.lax/libc++11convenience.a/system_error.o, std::error_category::default_error_condition(int) const [clone .localalias.9]).) 2013-09-17 15:46:06 +00:00
ira-build.c function.h (loops_for_fn): New inline function. 2013-04-30 08:14:09 +00:00
ira-color.c This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
ira-conflicts.c re PR debug/53948 (Assignment line missing for -O0 -g) 2013-02-08 13:03:52 -07:00
ira-costs.c This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
ira-emit.c function.h (loops_for_fn): New inline function. 2013-04-30 08:14:09 +00:00
ira-int.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
ira-lives.c Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
ira.c ira.c (update_equiv_regs): Only call set_paradoxical_subreg for non-debug insns. 2013-09-08 18:15:49 +00:00
ira.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
is-a.h is-a.h (as_a): Use gcc_checking_assert. 2013-03-22 13:01:42 +00:00
jump.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
langhooks-def.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
langhooks.c pretty-print.h (pp_underscore): New. 2013-08-03 18:57:25 +00:00
langhooks.h re PR debug/49090 (provide a way to recognize defaulted template parameters) 2013-03-16 22:33:50 -04:00
lcm.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
libfuncs.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
limitx.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
limity.h
lists.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
lock-and-run.sh add quotes 2013-05-16 13:41:13 -04:00
loop-doloop.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
loop-init.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
loop-invariant.c This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
loop-iv.c gcc/ 2013-09-09 13:07:02 +00:00
loop-unroll.c gcc/ 2013-09-09 13:07:02 +00:00
loop-unswitch.c Follow-on patch to r197595 to complete the replacement of truncating divides in... 2013-05-02 13:20:47 +00:00
lower-subreg.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
lower-subreg.h re PR rtl-optimization/50339 (suboptimal register allocation for abs(__int128_t)) 2013-02-21 22:28:03 +01:00
lra-assigns.c [multiple changes] 2013-07-18 17:04:10 +00:00
lra-coalesce.c [multiple changes] 2013-04-19 03:57:22 +00:00
lra-constraints.c lra-constraints.c (need_for_all_save_p): Use macro HARD_REGNO_CALL_PART_CLOBBERED. 2013-09-18 19:12:16 +00:00
lra-eliminations.c re PR middle-end/58335 (S/390: reload vs lra regression - testcase builtin-in-setjmp) 2013-09-12 18:23:09 +00:00
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-constraints.c (need_for_all_save_p): Use macro HARD_REGNO_CALL_PART_CLOBBERED. 2013-09-18 19:12:16 +00:00
lra-spills.c rtl.h (struct rtx_def): Add comment for field jump. 2013-04-26 18:11:35 +00:00
lra.c re PR rtl-optimization/58438 (ICE: in check_rtl, at lra.c:2036) 2013-09-18 18:24:49 +00:00
lra.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
lto-cgraph.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
lto-compress.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
lto-compress.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
lto-opts.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
lto-section-in.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
lto-section-out.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
lto-streamer-in.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
lto-streamer-out.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
lto-streamer.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
lto-streamer.h lto-streamer.h (lto_global_var_decls): Remove. 2013-09-06 09:06:25 +00:00
lto-wrapper.c opts.h: Include obstack.h. 2013-02-27 08:28:09 +01:00
machmode.def genmodes.c (emit_max_int): New function. 2013-03-28 14:46:31 +00:00
machmode.h stor-layout.c (element_precision): New function. 2013-05-10 11:15:14 +00:00
main.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
mcf.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
mkconfig.sh Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
mode-classes.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
mode-switching.c coretypes.h (rtl_opt_pass): Add. 2013-08-07 01:14:39 +00:00
modulo-sched.c asan.c (asan_clear_shadow): Use gen_int_mode with the mode of the associated expand_* call. 2013-09-09 13:06:53 +00:00
omega.c df-problems.c (can_move_insns_across): Exit loop once we find a non-fixed, non-global register. 2013-07-22 09:20:11 -06:00
omega.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
omp-builtins.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
omp-low.c re PR tree-optimization/58472 (gomp4: ICE in in vectorizable_store, at tree-vect-stmts.c:4192) 2013-09-19 18:56:40 +02:00
opt-functions.awk Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
opt-gather.awk Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
opt-include.awk Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
opt-read.awk Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
optabs.c asan.c (asan_clear_shadow): Use gen_int_mode with the mode of the associated expand_* call. 2013-09-09 13:06:53 +00:00
optabs.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
optabs.h re PR target/52555 (ICE unrecognizable insn with -ffast-math and __attribute__((optimize(xx)))) 2013-02-19 00:04:49 +00:00
optc-gen.awk Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
optc-save-gen.awk Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
opth-gen.awk Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
opts-common.c re PR bootstrap/56509 (gnattools build failure) 2013-03-05 07:01:13 +01:00
opts-diagnostic.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
opts-global.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
opts.c Introduce -ftree-loop-vectorize option 2013-09-16 19:55:40 +00:00
opts.h opts.h: Include obstack.h. 2013-02-27 08:28:09 +01:00
output.h Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
params.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
params.def re PR tree-optimization/48184 (ICE: SIGFPE (division by zero) in compute_alignments () at final.c:731 with --param align-threshold=0 on basic code) 2013-04-11 16:20:26 +00:00
params.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
pass_manager.h dumpfile.c (dump_loc): Output column number. 2013-08-29 13:51:04 +00:00
passes.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
passes.def re PR middle-end/58402 (FAIL: gcc.dg/tree-ssa/phi-opt-1.c scan-tree-dump-times optimized "if" 0) 2013-09-12 13:19:21 +00:00
plugin.c plugin.c (parse_plugin_arg_opt): Accept equal sign inside plugin argument. 2013-09-20 15:54:47 +00:00
plugin.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
plugin.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
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 Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
postreload.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
predict.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
predict.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
predict.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
prefix.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
prefix.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
pretty-print.c diagnostic.c (diagnostic_set_caret_max_width): Use pp_buffer. 2013-08-23 23:58:55 +00:00
pretty-print.h diagnostic.c (diagnostic_set_caret_max_width): Use pp_buffer. 2013-08-23 23:58:55 +00:00
print-rtl.c cfgrtl.c (fixup_reorder_chain): Do not emit barriers to BB_FOOTER. 2013-03-30 14:26:42 +00:00
print-tree.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
profile.c dumpfile.c (dump_loc): Remove newline emission. 2013-09-16 13:40:02 +00:00
profile.h cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
read-md.c Fix typos. 2013-07-21 18:18:04 +00:00
read-md.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
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 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
real.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
realmpfr.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
realmpfr.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
recog.c recog.c (verify_changes): Verify that changes[i].old is non-zero before applying REG_P. 2013-08-30 15:20:29 +01:00
recog.h re PR other/12081 (Gcc can't be compiled with -mregparm=3) 2013-08-05 22:09:45 +00:00
ree.c asan.c (asan_emit_stack_protection): Use gen_int_mode instead of GEN_INT. 2013-09-09 13:07:10 +00:00
reg-notes.def rtl.texi (sequence): Rewrite documentation to match the current use of SEQUENCE rtl objects. 2013-04-08 19:59:57 +00:00
reg-stack.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
regcprop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
reginfo.c re PR target/58139 (PowerPC volatile VSX register live across call) 2013-09-05 09:09:07 -05:00
regmove.c asan.c (asan_emit_stack_protection): Use gen_int_mode instead of GEN_INT. 2013-09-09 13:07:10 +00:00
regrename.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
regrename.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
regs.h re PR debug/53948 (Assignment line missing for -O0 -g) 2013-02-08 13:03:52 -07:00
regset.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
regstat.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
reload.c reload.c (find_valid_class): Allow classes that do not include FIRST_PSEUDO_REGISTER - 1. 2013-08-26 16:32:55 +01:00
reload.h reload.h (struct reg_equivs): Rename to .. 2013-08-21 15:38:35 +01:00
reload1.c asan.c (asan_emit_stack_protection): Use gen_int_mode instead of GEN_INT. 2013-09-09 13:07:10 +00:00
reorg.c rtl.h (update_alignments): Declare. 2013-08-07 17:17:07 +00:00
resource.c resource.c (mark_referenced_resources): Handle COND_EXEC. 2013-09-06 18:37:50 +01:00
resource.h resource.h (struct resources): Remove unch_memory member. 2013-05-14 17:21:43 +00:00
rtl-error.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
rtl-error.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
rtl.c re PR rtl-optimization/56571 (ICE in copyprop_hardreg_forward_1, at regcprop.c (insn does not satisfy its constraints !)) 2013-03-12 12:13:33 +00:00
rtl.def rtl.def: Add extra fourth optional field to define_cond_exec. 2013-06-04 08:56:32 +00:00
rtl.h rtl.h (update_alignments): Declare. 2013-08-07 17:17:07 +00:00
rtlanal.c re PR other/57324 (Undefined behavior issues found with clang's -fsanitize=undefined) 2013-08-23 22:16:08 +00:00
rtlhooks-def.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
rtlhooks.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
sanitizer.def Merge ubsan into trunk. 2013-08-30 16:12:58 +00:00
sbitmap.c Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
sbitmap.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
sched-deps.c Fix typos. 2013-07-21 18:18:04 +00:00
sched-ebb.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
sched-int.h sched-int.h (ds_t, dw_t): Make unsigned int. 2013-05-25 10:31:43 +00:00
sched-rgn.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
sched-vis.c pretty-print.h (output_buffer::output_buffer): Declare. 2013-08-22 10:14:46 +00:00
sdbout.c sdbout.c (sdbout_one_type): Switch to current function's section supporting cold/hot. 2013-03-05 18:59:38 +01:00
sdbout.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
sel-sched-dump.c Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
sel-sched-dump.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
sel-sched-ir.c emit-rtl.c (remove_insn): Do not call df_insn_delete here. 2013-04-13 10:04:09 +00:00
sel-sched-ir.h re PR rtl-optimization/56957 (ICE in add_insn_after, at emit-rtl.c:3783) 2013-04-30 14:55:52 +04:00
sel-sched.c re PR rtl-optimization/57662 (ICE: SIGSEGV in code_motion_process_successors with -fschedule-insns2 -fselective-scheduling2) 2013-08-14 18:31:26 +04:00
sel-sched.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
sese.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
sese.h This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
simplify-rtx.c simplify-rtx.c (simplify_unary_operation_1): Use simplify_gen_binary for (not (neg ...)) and (neg (not ...)) cases. 2013-09-11 17:40:56 +00:00
sparseset.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
sparseset.h sparseset.h (sparseset_bit_p): Use gcc_checking_assert. 2013-01-30 15:42:49 +00:00
sreal.c Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
sreal.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
ssaexpand.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
stab.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
stack-ptr-mod.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
statistics.c Introduce beginnings of a pass_manager class. 2013-07-30 18:52:03 +00:00
statistics.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
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 stor-layout.c (element_precision): New function. 2013-05-10 11:15:14 +00:00
store-motion.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
streamer-hooks.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
streamer-hooks.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
stringpool.c Remove zone allocator. 2013-01-24 10:13:46 -05:00
symtab.c re PR ipa/58329 (ld: Invalid symbol type for plabel (.libs/libstdc++.lax/libc++11convenience.a/system_error.o, std::error_category::default_error_condition(int) const [clone .localalias.9]).) 2013-09-17 16:07:21 +00:00
sync-builtins.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
system.h target.def (TARGET_LIBC_HAS_FUNCTION): New target hook. 2013-08-19 12:21:26 +00:00
target-def.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
target-globals.c re PR target/52555 (ICE unrecognizable insn with -ffast-math and __attribute__((optimize(xx)))) 2013-02-24 19:54:37 +01:00
target-globals.h re PR target/52555 (ICE unrecognizable insn with -ffast-math and __attribute__((optimize(xx)))) 2013-02-19 00:04:49 +00:00
target-hooks-macros.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
target.def target.def (narrow_volatile_bitfield): Note that the default value is false, not !TARGET_STRICT_ALIGN. 2013-08-20 12:17:16 +00:00
target.h Improve cstore code generation on 64-bit sparc. 2013-04-10 12:41:57 -07:00
targhooks.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
targhooks.h target.def (TARGET_LIBC_HAS_FUNCTION): New target hook. 2013-08-19 12:21:26 +00:00
timevar.c * timevar.c (validate_phases): Add cast. 2013-08-22 15:25:53 +00:00
timevar.def devirt-11.C: Update template. 2013-09-08 16:42:21 +00:00
timevar.h timevar.c (validate_phases): Use size_t for memory. 2013-08-22 14:58:17 +00:00
tlink.c Fix typos. 2013-07-21 18:18:04 +00:00
toplev.c toplev.c (output_stack_usage): Be prepared for suffixes created by the compiler in the function names. 2013-09-06 15:28:02 +00:00
toplev.h Handwritten part of conversion of passes to C++ classes 2013-08-05 20:01:43 +00:00
tracer.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
trans-mem.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
trans-mem.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-affine.c tree-affine.c (add_elt_to_tree): Fix association issue... 2013-09-03 10:02:56 +00:00
tree-affine.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-browser.c This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
tree-browser.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-call-cdce.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-cfg.c re PR libgomp/58392 (internal compiler error: in expand_GOMP_SIMD_VF, at internal-fn.c (omp simd inside omp parallel)) 2013-09-13 14:42:04 +02:00
tree-cfgcleanup.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-chrec.c re PR tree-optimization/58417 (Incorrect optimization in SCEV const-prop) 2013-09-18 12:31:45 +00:00
tree-chrec.h re PR tree-optimization/58473 (FAIL: ext/random/normal_mv_distribution/cons/default.cc (test for excess errors)) 2013-09-20 10:19:12 +00:00
tree-complex.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-core.h tree-core.h: Add missing comment lines from refactoring of tree.h. 2013-09-16 09:37:25 -04:00
tree-data-ref.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-data-ref.h tree-data-ref.h (known_dependences_p): Move here ... 2013-09-13 10:58:35 +00:00
tree-dfa.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-diagnostic.c tree.h (DECL_DEBUG_EXPR_IS_FROM): Rename to ... 2013-03-21 11:53:39 +00:00
tree-diagnostic.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-dump.c Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
tree-dump.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-eh.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-emutls.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-flow-inline.h tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c (SSANAMES... 2013-09-12 13:30:31 +00:00
tree-flow.h tree-flow.h (ssa_undefined_value_p): Remove prototype. 2013-09-17 17:22:05 +00:00
tree-hasher.h This patch is the main part of a consolodation of the hash_table patches to the... 2013-04-26 00:28:35 +00:00
tree-if-conv.c Introduce -ftree-loop-vectorize option 2013-09-16 19:55:40 +00:00
tree-inline.c tree-inline.h (struct copy_body_data): Add transform_parameter. 2013-09-17 11:05:31 +00:00
tree-inline.h tree-inline.h (struct copy_body_data): Add transform_parameter. 2013-09-17 11:05:31 +00:00
tree-into-ssa.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
tree-iterator.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-iterator.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-loop-distribution.c re PR tree-optimization/58453 (Revision 202431 results in miscompare for CPU2006 434.zeusmp) 2013-09-20 12:21:08 +00:00
tree-mudflap.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-mudflap.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-nested.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-nomudflap.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-nrv.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-object-size.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-optimize.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-outof-ssa.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-parloops.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-pass.h common.opt (fdevirtualize-speculatively): New function. 2013-09-01 15:14:24 +00:00
tree-phinodes.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-predcom.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-pretty-print.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-pretty-print.h pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
tree-profile.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-scalar-evolution.c re PR middle-end/58484 (ICE in chrec_fold_plus_1, at tree-chrec.c:272 building 416.gamess) 2013-09-20 17:49:45 +00:00
tree-scalar-evolution.h function.h (loops_for_fn): New inline function. 2013-04-30 08:14:09 +00:00
tree-sra.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-address.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-alias.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-alias.h tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c (SSANAMES... 2013-09-12 13:30:31 +00:00
tree-ssa-ccp.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-coalesce.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-copy.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-copyrename.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-dce.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-dom.c * tree-ssa-dom.c (record_temporary_equivalences): Add comment. 2013-09-20 11:43:08 -06:00
tree-ssa-dse.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
tree-ssa-forwprop.c re PR tree-optimization/58404 (&noninvariant_address not forwproped into ->handled_component) 2013-09-12 13:20:17 +00:00
tree-ssa-ifcombine.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-live.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-live.h Add uniform debug dump function names. 2013-03-29 03:42:21 +00:00
tree-ssa-loop-ch.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-loop-im.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
tree-ssa-loop-ivcanon.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-loop-ivopts.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-loop-manip.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-loop-niter.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-loop-prefetch.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-loop-unswitch.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-loop.c Introduce -ftree-loop-vectorize option 2013-09-16 19:55:40 +00:00
tree-ssa-math-opts.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-operands.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-operands.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-ssa-phiopt.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
tree-ssa-phiprop.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-pre.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
tree-ssa-propagate.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-propagate.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-ssa-reassoc.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-sccvn.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-sccvn.h This patch extracts approved portions of the hash_table patches to the... 2013-04-23 22:00:12 +00:00
tree-ssa-sink.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-strlen.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
tree-ssa-structalias.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-tail-merge.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-ter.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-ssa-threadedge.c pr58387.c: New test. 2013-09-17 11:27:41 -06:00
tree-ssa-threadupdate.c pr58387.c: New test. 2013-09-17 11:27:41 -06:00
tree-ssa-uncprop.c compare-elim.c (find_comparison_dom_walker): New class 2013-09-17 20:39:50 -06:00
tree-ssa-uninit.c tree-flow.h (ssa_undefined_value_p): Remove prototype. 2013-09-17 17:22:05 +00:00
tree-ssa.c tree-flow.h (ssa_undefined_value_p): Remove prototype. 2013-09-17 17:22:05 +00:00
tree-ssa.h tree-flow.h (ssa_undefined_value_p): Remove prototype. 2013-09-17 17:22:05 +00:00
tree-ssanames.c tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c (SSANAMES... 2013-09-12 13:30:31 +00:00
tree-ssanames.h tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c (SSANAMES... 2013-09-12 13:30:31 +00:00
tree-stdarg.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-stdarg.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tree-streamer-in.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-streamer-out.c re PR lto/58285 (ICE in lto_output_tree, at lto-streamer-out.c:1318) 2013-09-03 09:48:27 +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-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-tailcall.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-vect-data-refs.c omp-low.c (copy_var_decl): Copy DECL_ATTRIBUTES. 2013-09-18 12:14:31 +02:00
tree-vect-generic.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree-vect-loop-manip.c dumpfile.c (dump_loc): Remove newline emission. 2013-09-16 13:40:02 +00:00
tree-vect-loop.c dumpfile.c (dump_loc): Remove newline emission. 2013-09-16 13:40:02 +00:00
tree-vect-patterns.c tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug when checking the dot production pattern. 2013-09-17 14:20:08 -04:00
tree-vect-slp.c dumpfile.c (dump_loc): Remove newline emission. 2013-09-16 13:40:02 +00:00
tree-vect-stmts.c re PR tree-optimization/58472 (gomp4: ICE in in vectorizable_store, at tree-vect-stmts.c:4192) 2013-09-19 18:56:40 +02:00
tree-vectorizer.c Introduce -ftree-loop-vectorize option 2013-09-16 19:55:40 +00:00
tree-vectorizer.h Delay base decl's alignment adjustment until transformation happens 2013-09-03 18:19:04 +00:00
tree-vrp.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tree.def Makefile.in (omp-low.o): Depend on $(TARGET_H). 2013-08-27 18:38:00 +00:00
tree.h tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
treestruct.def Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tsan.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
tsan.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
tsystem.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
typeclass.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
ubsan.c re PR sanitizer/58413 (ubsan constant folding) 2013-09-20 13:26:07 +00:00
ubsan.h Merge ubsan into trunk. 2013-08-30 16:12:58 +00:00
valtrack.c alias.c (addr_side_effect_eval): Use gen_int_mode with the mode of the associated gen_rtx_* call. 2013-09-09 13:06:43 +00:00
valtrack.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
value-prof.c dumpfile.c (dump_loc): Remove newline emission. 2013-09-16 13:40:02 +00:00
value-prof.h cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
var-tracking.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
varasm.c Merge ubsan into trunk. 2013-08-30 16:12:58 +00:00
varpool.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
vec.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
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 Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
version.h
vmsdbg.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
vmsdbgout.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
vtable-verify.c tree-ssa.h: New. 2013-09-12 13:03:18 +00:00
vtable-verify.h Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
web.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
xcoff.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
xcoffout.c Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00
xcoffout.h Update copyright years in gcc/ 2013-01-10 20:38:27 +00:00

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.