public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH INSTALLED]: const typedefs part 16/N
@ 2007-08-23 16:55 Kaveh R. GHAZI
  0 siblings, 0 replies; only message in thread
From: Kaveh R. GHAZI @ 2007-08-23 16:55 UTC (permalink / raw)
  To: gcc-patches

This patch starts the process of constifying the target hooks.  I had
been avoiding this as long as possible because of how hard I suspected
it would be.  I was right, the whole thing is a maze of twisty little
passages, (or is it twisty maze of little passes?) :-)

Anyway, in constifying the middle-end I had kept bumping up against
calls to target hooks that needed to be constified so I couldn't put
it off any longer to make any progress.  (And there's still some
interesting stuff left to constify IMHO.)  I had wanted to start with
just *one* hook but there was a cascading dependency effect and I
ended up having to do about nine of them.  And each one requires
touching every backend.  Yuck, but what can you do.

Along the way, I encountered many unrelated warnings for targets that
don't get bootstrapped often and/or are cross-only.  Cross-only don't
get -Werror so they have lots of turds.  Anyway I fixed some of them
to clear noise so I could see more easily if I introduced any
problems.  There's all "obvious" type fixes.  I put the ChangeLog
entries for the non-constification warnings fixes at the top for
easier viewing.

At some point, the cascading dependency effect got out of hand and I
decided to temporarily pause the constification process in this one
patch.  One hook inside the x86 backend called out to
cgraph_local_info(), which uses some stuff in libiberty.  Instead of
letting that dependency get out of hand, I used one CONST_CAST to stop
here and get to it later.  The patch was big enough already!  I put an
appropriate FIXME comment so I get back to it later.

Tested with full bootstrap on sparc-sun-solaris2.10, no regressions.
I also built cc1 in cross-configurations to the following targets to
ensure they all build without any -Wcast-qual or hook-prototype
related problems.

alpha-dec-osf5.0 arc-unknown-elf arm-unknown-pe avr-unknown-elf
bfin-unknown-elf c4x-unknown-rtems cris-unknown-linux-gnu
crx-unknown-elf fr30-unknown-elf frv-unknown-elf h8300-unknown-rtems
hppa1.1-hp-hpux11 i686-pc-linux-gnu ia64-unknown-linux-gnu
iq2000-unknown-elf m32c-unknown-elf m32r-unknown-elf
m68hc11-unknown-elf m68k-unknown-linux-gnu mcore-unknown-elf
mips-sgi-irix6.5 mmix-knuth-mmixware mn10300-unknown-elf
mt-unknown-elf pdp11-unknown-bsd powerpc-apple-darwin
rs6000-ibm-aix4.3.3.0 s390-unknown-linux-gnu score-unknown-elf
sh-unknown-rtems sparc-sun-solaris2.6 spu-unknown-elf v850-unknown-elf
vax-unknown-ultrix x86_64-unknown-linux-gnu xstormy16-unknown-elf
xtensa-unknown-elf

Patch installed.  If there are any problems, please let me know.

		--Kaveh


2007-08-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg):
	Wrap in RTX_CODE macro guard.
	* config/arm/pe.c (arm_dllexport_p, arm_dllimport_p,
	arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport,
	arm_mark_dllimport, arm_pe_encode_section_info,
	arm_pe_unique_section): Use ISO-C function declarations.
	* config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION,
	c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE,
	c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored):
	Likewise.
	* config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning.
	* config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before
	defining.
	* config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format
	warnings.
	* config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise.
	* config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise.
	(register_move_cost): Use ISO-C function declarations.
	* config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings.
	* config/score/score-protos.h (score_declare_object): Add
	ATTRIBUTE_PRINTF_4.
	* config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format
	warnings.
	* final.c (profile_function): Avoid empty if-bodies.


	* calls.c (must_pass_in_stack_var_size,
	must_pass_in_stack_var_size_or_pad): Constify.
	* config/alpha/alpha-protos.h (function_value): Likewise.
	* config/alpha/alpha.c (alpha_return_in_memory,
	alpha_pass_by_reference, function_value,
	unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/arm/arm-protos.h (arm_return_in_memory,
	arm_pad_arg_upward, arm_function_value): Likewise.
	* config/arm/arm.c (arm_pass_by_reference,
	arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	arm_function_value, arm_return_in_memory, arm_pad_arg_upward):
	Likewise.
	* config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise.
	* config/avr/avr-protos.h (avr_function_value): Likewise.
	* config/avr/avr.c (avr_return_in_memory,
	gas_output_limited_string, gas_output_ascii, avr_function_value,
	avr_return_in_memory): Likewise.
	* config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise.
	* config/bfin/bfin.c (bfin_pass_by_reference,
	bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN):
	Likewise.
	* config/cris/cris.c (cris_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS): Likewise.
	* config/crx/crx.c (crx_return_in_memory): Likewise.
	* config/darwin.c (function_base, machopic_function_base_name):
	Likewise.
	* config/fr30/fr30.c (fr30_must_pass_in_stack,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/frv/frv.c (frv_must_pass_in_stack): Likewise.
	* config/h8300/h8300.c (h8300_return_in_memory): Likewise.
	* config/i386/i386-protos.h (ix86_return_in_memory,
	ix86_sol10_return_in_memory): Likewise.
	* config/i386/i386.c (ix86_function_value,
	ix86_function_sseregparm, ix86_must_pass_in_stack,
	type_natural_mode, classify_argument, examine_argument,
	construct_container, ix86_pass_by_reference, function_value_32,
	function_value_64, ix86_function_value_1, return_in_memory_32,
	return_in_memory_64, return_in_memory_ms_64,
	ix86_return_in_memory, ix86_sol10_return_in_memory,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/ia64/ia64-protos.h (ia64_function_value,
	ia64_hpux_function_arg_padding): Likewise.
	* config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory,
	ia64_function_value, bundle_state_hash, bundle_state_eq_p,
	ia64_hpux_function_arg_padding): Likewise.
	* config/iq2000/iq2000-protos.h (function_arg,
	iq2000_function_value): Likewise.
	* config/iq2000/iq2000.c (iq2000_return_in_memory,
	iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	function_arg, iq2000_function_value): Likewise.
	* config/m32c/m32c-protos.h (m32c_function_value,
	m32c_promote_function_return): Likewise.
	* config/m32c/m32c.c (m32c_pass_by_reference,
	m32c_promote_prototypes, m32c_promote_function_return,
	m32c_function_value): Likewise.
	* config/m32r/m32r.c (m32r_return_in_memory,
	m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
	m32r_in_small_data_p): Likewise.
	* config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding):
	Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_return_in_memory,
	m68hc11_function_arg_padding): Likewise.
	* config/m68k/m68k-protos.h (m68k_function_value): Likewise.
	* config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES,
	m68k_function_value): Likewise.
	* config/mcore/mcore-protos.h (mcore_num_arg_regs,
	mcore_function_value): Likewise.
	* config/mcore/mcore.c (handle_structs_in_regs,
	mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	mcore_num_arg_regs, mcore_function_value): Likewise.
	* config/mips/mips-protos.h (mips_pad_arg_upward,
	mips_function_value): Likewise.
	* config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb,
	mips_return_in_memory, mips_pass_by_reference, mips_callee_copies,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward,
	mips_function_value): Likewise.
	* config/mmix/mmix-protos.h (mmix_function_outgoing_value):
	Likewise.
	* config/mmix/mmix.c (mmix_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value,
	mmix_encode_section_info): Likewise.
	* config/mn10300/mn10300-protos.h (mn10300_function_value):
	Likewise.
	* config/mn10300/mn10300.c (mn10300_return_in_memory,
	mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
	mn10300_function_value): Likewise.
	* config/mt/mt-protos.h (mt_function_value): Likewise.
	* config/mt/mt.c (mt_pass_by_reference, mt_function_value,
	mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/pa/pa-protos.h (function_arg_padding, function_value,
	pa_return_in_memory): Likewise.
	* config/pa/pa.c (pa_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	function_arg_padding, function_value, pa_return_in_memory):
	Likewise.
	* config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise.
	* config/rs6000/rs6000-protos.h (rs6000_function_value,
	function_arg_padding): Likewise.
	* config/rs6000/rs6000.c (rs6000_return_in_memory,
	rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
	rs6000_pass_by_reference, rs6000_must_pass_in_stack,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	function_arg_padding, altivec_expand_dst_builtin,
	altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins,
	altivec_init_builtins, rs6000_common_init_builtins,
	rs6000_function_value): Likewise.
	* s390/s390-protos.h (s390_function_value): Likewise.
	* config/s390/s390.c (s390_function_arg_size,
	s390_pass_by_reference, s390_return_in_memory,
	s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Likewise.
	* config/score/score-protos.h (score_function_value): Likewise.
	* config/score/score.c (score_arg_partial_bytes,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES, score_return_in_memory,
	score_pass_by_reference, score_add_offset, score_function_value):
	Likewise.
	* config/sh/sh-protos.h (sh_attr_renesas_p,
	sh_promote_prototypes): Likewise.
	* config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference,
	sh_callee_copies, sh_promote_prototypes, shcompact_byref,
	sh_attr_renesas_p): Likewise.
	* config/sparc/sparc-protos.h (function_value,
	function_arg_padding): Likewise.
	* config/sparc/sparc.c (sparc_promote_prototypes,
	sparc_return_in_memory, sparc_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	function_arg_record_value_2, function_arg_record_value_1,
	function_arg_record_value, function_arg_record_value,
	function_arg_padding, function_value): Likewise.
	* config/spu/spu-protos.h (spu_function_value): Likewise.
	* config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory,
	spu_function_value): Likewise.
	* config/stormy16/stormy16-protos.h (xstormy16_function_value):
	Likewise.
	* config/stormy16/stormy16.c (xstormy16_return_in_memory,
	xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* config/v850/v850.c (v850_return_in_memory,
	v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/xtensa/xtensa.c (xtensa_return_in_msb,
	xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* explow.c (promote_mode, hard_function_value): Likewise.
	* expr.h (hard_function_value, promote_mode): Likewise.
	* function.c (aggregate_value_p): Likewise.
	* hooks.c (hook_bool_const_tree_true): New.
	* hooks.h (hook_bool_const_tree_true): New.
	* sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify.
	* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	TARGET_RETURN_IN_MSB): Likewise.
	* target.h (promote_function_args, promote_function_return,
	promote_prototypes, return_in_memory, return_in_msb,
	pass_by_reference, must_pass_in_stack, callee_copies,
	function_value): Likewise.
	* targhooks.c (default_return_in_memory,
	hook_pass_by_reference_must_pass_in_stack,
	hook_callee_copies_named,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
	default_function_value): Likewise.
	* targhooks.h (default_return_in_memory,
	hook_pass_by_reference_must_pass_in_stack,
	hook_callee_copies_named,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
	default_function_value): Likewise.
	* tree-ssa-structalias.c (const_equiv_class_label_t): New.
	(equiv_class_label_hash, equiv_class_label_eq): Constify.
	* tree-vectorizer.c (bb_in_loop_p): Likewise.
	* tree.c (needs_to_live_in_memory): Likewise.
	* tree.h (struct tree_type, needs_to_live_in_memory,
	aggregate_value_p, must_pass_in_stack_var_size,
	must_pass_in_stack_var_size_or_pad): Likewise.
	* vmsdbgout.c (write_debug_addr, write_debug_delta4,
	write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg,
	lookup_filename): Likewise.

diff -rup orig/egcc-SVN20070820/gcc/calls.c egcc-SVN20070820/gcc/calls.c
--- orig/egcc-SVN20070820/gcc/calls.c	2007-08-11 20:02:48.000000000 -0400
+++ egcc-SVN20070820/gcc/calls.c	2007-08-21 12:59:18.667704854 -0400
@@ -4426,7 +4426,7 @@ store_one_arg (struct arg_data *arg, rtx

 bool
 must_pass_in_stack_var_size (enum machine_mode mode ATTRIBUTE_UNUSED,
-			     tree type)
+			     const_tree type)
 {
   if (!type)
     return false;
@@ -4448,7 +4448,7 @@ must_pass_in_stack_var_size (enum machin
 /* ??? Should be able to merge these two by examining BLOCK_REG_PADDING.  */

 bool
-must_pass_in_stack_var_size_or_pad (enum machine_mode mode, tree type)
+must_pass_in_stack_var_size_or_pad (enum machine_mode mode, const_tree type)
 {
   if (!type)
     return false;
diff -rup orig/egcc-SVN20070820/gcc/config/alpha/alpha-protos.h egcc-SVN20070820/gcc/config/alpha/alpha-protos.h
--- orig/egcc-SVN20070820/gcc/config/alpha/alpha-protos.h	2007-08-02 10:19:43.000000000 -0400
+++ egcc-SVN20070820/gcc/config/alpha/alpha-protos.h	2007-08-21 12:59:18.669079489 -0400
@@ -78,7 +78,7 @@ extern void alpha_initialize_trampoline
 extern void alpha_va_start (tree, rtx);
 extern rtx alpha_va_arg (tree, tree);
 extern rtx function_arg (CUMULATIVE_ARGS, enum machine_mode, tree, int);
-extern rtx function_value (tree, tree, enum machine_mode);
+extern rtx function_value (const_tree, const_tree, enum machine_mode);

 extern void alpha_start_function (FILE *, const char *, tree);
 extern void alpha_end_function (FILE *, const char *, tree);
diff -rup orig/egcc-SVN20070820/gcc/config/alpha/alpha.c egcc-SVN20070820/gcc/config/alpha/alpha.c
--- orig/egcc-SVN20070820/gcc/config/alpha/alpha.c	2007-08-20 20:03:26.000000000 -0400
+++ egcc-SVN20070820/gcc/config/alpha/alpha.c	2007-08-22 11:16:37.269340599 -0400
@@ -5646,7 +5646,7 @@ alpha_arg_partial_bytes (CUMULATIVE_ARGS
 /* Return true if TYPE must be returned in memory, instead of in registers.  */

 static bool
-alpha_return_in_memory (tree type, tree fndecl ATTRIBUTE_UNUSED)
+alpha_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode = VOIDmode;
   int size;
@@ -5696,7 +5696,7 @@ alpha_return_in_memory (tree type, tree
 static bool
 alpha_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
 			 enum machine_mode mode,
-			 tree type ATTRIBUTE_UNUSED,
+			 const_tree type ATTRIBUTE_UNUSED,
 			 bool named ATTRIBUTE_UNUSED)
 {
   return mode == TFmode || mode == TCmode;
@@ -5711,7 +5711,7 @@ alpha_pass_by_reference (CUMULATIVE_ARGS
    $f0 for floating-point functions.  */

 rtx
-function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
+function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
 		enum machine_mode mode)
 {
   unsigned int regnum, dummy;
@@ -9751,7 +9751,7 @@ alpha_use_linkage (rtx linkage ATTRIBUTE
    registers.  */

 static bool
-unicosmk_must_pass_in_stack (enum machine_mode mode, tree type)
+unicosmk_must_pass_in_stack (enum machine_mode mode, const_tree type)
 {
   if (type == NULL)
     return false;
@@ -10664,11 +10664,11 @@ alpha_init_libfuncs (void)
 #define TARGET_MACHINE_DEPENDENT_REORG alpha_reorg

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_false
 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY alpha_return_in_memory
 #undef TARGET_PASS_BY_REFERENCE
diff -rup orig/egcc-SVN20070820/gcc/config/arc/arc-protos.h egcc-SVN20070820/gcc/config/arc/arc-protos.h
--- orig/egcc-SVN20070820/gcc/config/arc/arc-protos.h	2007-08-02 10:20:50.000000000 -0400
+++ egcc-SVN20070820/gcc/config/arc/arc-protos.h	2007-08-21 12:59:18.684392115 -0400
@@ -19,10 +19,12 @@ along with GCC; see the file COPYING3.

 extern void arc_va_start (tree, rtx);

+#ifdef RTX_CODE
 extern enum machine_mode arc_select_cc_mode (enum rtx_code, rtx, rtx);

 /* Define the function that build the compare insn for scc and bcc.  */
 extern struct rtx_def *gen_compare_reg (enum rtx_code, rtx, rtx);
+#endif

 /* Declarations for various fns used in the .md file.  */
 extern const char *output_shift (rtx *);
diff -rup orig/egcc-SVN20070820/gcc/config/arc/arc.c egcc-SVN20070820/gcc/config/arc/arc.c
--- orig/egcc-SVN20070820/gcc/config/arc/arc.c	2007-08-02 10:20:51.000000000 -0400
+++ egcc-SVN20070820/gcc/config/arc/arc.c	2007-08-21 12:59:18.687544837 -0400
@@ -94,9 +94,9 @@ static void arc_setup_incoming_varargs (
 static bool arc_rtx_costs (rtx, int, int, int *);
 static int arc_address_cost (rtx);
 static void arc_external_libcall (rtx);
-static bool arc_return_in_memory (tree, tree);
+static bool arc_return_in_memory (const_tree, const_tree);
 static bool arc_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				   tree, bool);
+				   const_tree, bool);

 /* Initialize the GCC target structure.  */
 #undef TARGET_ASM_ALIGNED_HI_OP
@@ -128,11 +128,11 @@ static bool arc_pass_by_reference (CUMUL
 #define TARGET_ADDRESS_COST arc_address_cost

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true

 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY arc_return_in_memory
@@ -2316,7 +2316,7 @@ arc_external_libcall (rtx fun ATTRIBUTE_
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-arc_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+arc_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   if (AGGREGATE_TYPE_P (type))
     return true;
@@ -2332,7 +2332,7 @@ arc_return_in_memory (tree type, tree fn

 static bool
 arc_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
-		       enum machine_mode mode, tree type,
+		       enum machine_mode mode, const_tree type,
 		       bool named ATTRIBUTE_UNUSED)
 {
   unsigned HOST_WIDE_INT size;
diff -rup orig/egcc-SVN20070820/gcc/config/arm/arm-protos.h egcc-SVN20070820/gcc/config/arm/arm-protos.h
--- orig/egcc-SVN20070820/gcc/config/arm/arm-protos.h	2007-08-02 10:20:57.000000000 -0400
+++ egcc-SVN20070820/gcc/config/arm/arm-protos.h	2007-08-21 12:59:18.688671495 -0400
@@ -43,7 +43,7 @@ extern void arm_output_fn_unwind (FILE *


 #ifdef TREE_CODE
-extern int arm_return_in_memory (tree);
+extern int arm_return_in_memory (const_tree);
 #endif
 #ifdef RTX_CODE
 extern bool arm_vector_mode_supported_p (enum machine_mode);
@@ -156,10 +156,10 @@ extern bool arm_output_addr_const_extra
 #if defined TREE_CODE
 extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
 extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
-extern bool arm_pad_arg_upward (enum machine_mode, tree);
+extern bool arm_pad_arg_upward (enum machine_mode, const_tree);
 extern bool arm_pad_reg_upward (enum machine_mode, tree, int);
 extern bool arm_needs_doubleword_align (enum machine_mode, tree);
-extern rtx arm_function_value(tree, tree);
+extern rtx arm_function_value(const_tree, const_tree);
 #endif
 extern int arm_apply_result_size (void);

diff -rup orig/egcc-SVN20070820/gcc/config/arm/arm.c egcc-SVN20070820/gcc/config/arm/arm.c
--- orig/egcc-SVN20070820/gcc/config/arm/arm.c	2007-08-02 10:20:56.000000000 -0400
+++ egcc-SVN20070820/gcc/config/arm/arm.c	2007-08-21 12:59:18.711125516 -0400
@@ -169,12 +169,12 @@ static void aof_asm_init_sections (void)
 static void arm_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
 					tree, int *, int);
 static bool arm_pass_by_reference (CUMULATIVE_ARGS *,
-				   enum machine_mode, tree, bool);
-static bool arm_promote_prototypes (tree);
+				   enum machine_mode, const_tree, bool);
+static bool arm_promote_prototypes (const_tree);
 static bool arm_default_short_enums (void);
 static bool arm_align_anon_bitfield (void);
-static bool arm_return_in_msb (tree);
-static bool arm_must_pass_in_stack (enum machine_mode, tree);
+static bool arm_return_in_msb (const_tree);
+static bool arm_must_pass_in_stack (enum machine_mode, const_tree);
 #ifdef TARGET_UNWIND_INFO
 static void arm_unwind_emit (FILE *, rtx);
 static bool arm_output_ttype (rtx);
@@ -299,9 +299,9 @@ static void arm_output_dwarf_dtprel (FIL
 #define TARGET_INIT_LIBFUNCS arm_init_libfuncs

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
 #undef TARGET_PROMOTE_PROTOTYPES
 #define TARGET_PROMOTE_PROTOTYPES arm_promote_prototypes
 #undef TARGET_PASS_BY_REFERENCE
@@ -2702,7 +2702,7 @@ arm_canonicalize_comparison (enum rtx_co
 /* Define how to find the value returned by a function.  */

 rtx
-arm_function_value(tree type, tree func ATTRIBUTE_UNUSED)
+arm_function_value(const_tree type, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode;
   int unsignedp ATTRIBUTE_UNUSED;
@@ -2755,7 +2755,7 @@ arm_apply_result_size (void)
    or in a register (false).  This is called by the macro
    RETURN_IN_MEMORY.  */
 int
-arm_return_in_memory (tree type)
+arm_return_in_memory (const_tree type)
 {
   HOST_WIDE_INT size;

@@ -3010,7 +3010,7 @@ arm_arg_partial_bytes (CUMULATIVE_ARGS *
 static bool
 arm_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
 		       enum machine_mode mode ATTRIBUTE_UNUSED,
-		       tree type, bool named ATTRIBUTE_UNUSED)
+		       const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST;
 }
@@ -6523,7 +6523,7 @@ coproc_secondary_reload_class (enum mach
    register.  */

 static bool
-arm_return_in_msb (tree valtype)
+arm_return_in_msb (const_tree valtype)
 {
   return (TARGET_AAPCS_BASED
           && BYTES_BIG_ENDIAN
@@ -8179,7 +8179,7 @@ arm_reload_out_hi (rtx *operands)
    (padded to the size of a word) should be passed in a register.  */

 static bool
-arm_must_pass_in_stack (enum machine_mode mode, tree type)
+arm_must_pass_in_stack (enum machine_mode mode, const_tree type)
 {
   if (TARGET_AAPCS_BASED)
     return must_pass_in_stack_var_size (mode, type);
@@ -8195,7 +8195,7 @@ arm_must_pass_in_stack (enum machine_mod
    aggregate types are placed in the lowest memory address.  */

 bool
-arm_pad_arg_upward (enum machine_mode mode, tree type)
+arm_pad_arg_upward (enum machine_mode mode, const_tree type)
 {
   if (!TARGET_AAPCS_BASED)
     return DEFAULT_FUNCTION_ARG_PADDING(mode, type) == upward;
@@ -18177,7 +18177,7 @@ arm_no_early_mul_dep (rtx producer, rtx
    using APCS or ATPCS.  */

 static bool
-arm_promote_prototypes (tree t ATTRIBUTE_UNUSED)
+arm_promote_prototypes (const_tree t ATTRIBUTE_UNUSED)
 {
     return !TARGET_AAPCS_BASED;
 }
diff -rup orig/egcc-SVN20070820/gcc/config/arm/arm.h egcc-SVN20070820/gcc/config/arm/arm.h
--- orig/egcc-SVN20070820/gcc/config/arm/arm.h	2007-08-02 10:20:57.000000000 -0400
+++ egcc-SVN20070820/gcc/config/arm/arm.h	2007-08-21 12:59:18.715415378 -0400
@@ -2401,7 +2401,7 @@ extern int making_const_table;
            fprintf (STREAM, "\t.thumb\n\t.thumb_func\n") ;	\
         }						\
       if (TARGET_POKE_FUNCTION_NAME)			\
-        arm_poke_function_name (STREAM, (char *) NAME);	\
+        arm_poke_function_name (STREAM, (const char *) NAME);	\
     }							\
   while (0)

diff -rup orig/egcc-SVN20070820/gcc/config/arm/pe.c egcc-SVN20070820/gcc/config/arm/pe.c
--- orig/egcc-SVN20070820/gcc/config/arm/pe.c	2007-08-02 10:20:59.000000000 -0400
+++ egcc-SVN20070820/gcc/config/arm/pe.c	2007-08-21 12:59:18.717116968 -0400
@@ -39,8 +39,7 @@ extern int current_function_anonymous_ar
 tree current_class_type; /* FIXME */

 int
-arm_dllexport_p (decl)
-     tree decl;
+arm_dllexport_p (tree decl)
 {
   tree exp;

@@ -57,8 +56,7 @@ arm_dllexport_p (decl)
 /* Return nonzero if DECL is a dllimport'd object.  */

 int
-arm_dllimport_p (decl)
-     tree decl;
+arm_dllimport_p (tree decl)
 {
   tree imp;

@@ -79,8 +77,7 @@ arm_dllimport_p (decl)
 /* Return nonzero if SYMBOL is marked as being dllexport'd.  */

 int
-arm_dllexport_name_p (symbol)
-     const char * symbol;
+arm_dllexport_name_p (const char *symbol)
 {
   return symbol[0] == ARM_PE_FLAG_CHAR && symbol[1] == 'e' && symbol[2] == '.';
 }
@@ -88,8 +85,7 @@ arm_dllexport_name_p (symbol)
 /* Return nonzero if SYMBOL is marked as being dllimport'd.  */

 int
-arm_dllimport_name_p (symbol)
-     const char * symbol;
+arm_dllimport_name_p (const char *symbol)
 {
   return symbol[0] == ARM_PE_FLAG_CHAR && symbol[1] == 'i' && symbol[2] == '.';
 }
@@ -98,8 +94,7 @@ arm_dllimport_name_p (symbol)
    Note that we override the previous setting (e.g.: dllimport).  */

 void
-arm_mark_dllexport (decl)
-     tree decl;
+arm_mark_dllexport (tree decl)
 {
   const char * oldname;
   char * newname;
@@ -134,8 +129,7 @@ arm_mark_dllexport (decl)
 /* Mark a DECL as being dllimport'd.  */

 void
-arm_mark_dllimport (decl)
-     tree decl;
+arm_mark_dllimport (tree decl)
 {
   const char * oldname;
   char * newname;
@@ -201,10 +195,7 @@ arm_mark_dllimport (decl)
 }

 void
-arm_pe_encode_section_info (decl, rtl, first)
-     tree decl;
-     rtx rtl;
-     int first ATTRIBUTE_UNUSED;
+arm_pe_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
 {
   /* This bit is copied from arm_encode_section_info.  */
   if (optimize > 0 && TREE_CONSTANT (decl))
@@ -239,9 +230,7 @@ arm_pe_encode_section_info (decl, rtl, f
 }

 void
-arm_pe_unique_section (decl, reloc)
-     tree decl;
-     int reloc;
+arm_pe_unique_section (tree decl, int reloc)
 {
   int len;
   const char * name;
diff -rup orig/egcc-SVN20070820/gcc/config/avr/avr-protos.h egcc-SVN20070820/gcc/config/avr/avr-protos.h
--- orig/egcc-SVN20070820/gcc/config/avr/avr-protos.h	2007-08-02 10:20:21.000000000 -0400
+++ egcc-SVN20070820/gcc/config/avr/avr-protos.h	2007-08-21 12:59:18.717903628 -0400
@@ -43,7 +43,7 @@ extern void asm_output_external (FILE *f
 extern int avr_progmem_p (tree decl, tree attributes);

 #ifdef RTX_CODE /* inside TREE_CODE */
-extern rtx avr_function_value (tree type, tree func);
+extern rtx avr_function_value (const_tree type, const_tree func);
 extern void init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
 				  rtx libname, tree fndecl);
 extern rtx function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
diff -rup orig/egcc-SVN20070820/gcc/config/avr/avr.c egcc-SVN20070820/gcc/config/avr/avr.c
--- orig/egcc-SVN20070820/gcc/config/avr/avr.c	2007-08-02 10:20:21.000000000 -0400
+++ egcc-SVN20070820/gcc/config/avr/avr.c	2007-08-21 12:59:18.724135535 -0400
@@ -78,7 +78,7 @@ static void avr_asm_out_dtor (rtx, int);
 static int avr_operand_rtx_cost (rtx, enum machine_mode, enum rtx_code);
 static bool avr_rtx_costs (rtx, int, int, int *);
 static int avr_address_cost (rtx);
-static bool avr_return_in_memory (tree, tree);
+static bool avr_return_in_memory (const_tree, const_tree);
 static struct machine_function * avr_init_machine_status (void);
 /* Allocate registers from r25 to r8 for parameters for function calls.  */
 #define FIRST_CUM_REG 26
@@ -4475,7 +4475,7 @@ avr_assemble_integer (rtx x, unsigned in
 void
 gas_output_limited_string(FILE *file, const char *str)
 {
-  const unsigned char *_limited_str = (unsigned char *) str;
+  const unsigned char *_limited_str = (const unsigned char *) str;
   unsigned ch;
   fprintf (file, "%s\"", STRING_ASM_OP);
   for (; (ch = *_limited_str); _limited_str++)
@@ -4528,7 +4528,7 @@ gas_output_ascii(FILE *file, const char
 	      fprintf (file, "\"\n");
 	      bytes_in_chunk = 0;
 	    }
-	  gas_output_limited_string (file, (char*)_ascii_bytes);
+	  gas_output_limited_string (file, (const char*)_ascii_bytes);
 	  _ascii_bytes = p;
 	}
       else
@@ -5615,7 +5615,7 @@ avr_libcall_value (enum machine_mode mod
    function returns a value of data type VALTYPE.  */

 rtx
-avr_function_value (tree type, tree func ATTRIBUTE_UNUSED)
+avr_function_value (const_tree type, const_tree func ATTRIBUTE_UNUSED)
 {
   unsigned int offs;

@@ -5935,7 +5935,7 @@ avr_asm_out_dtor (rtx symbol, int priori
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-avr_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+avr_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   if (TYPE_MODE (type) == BLKmode)
     {
diff -rup orig/egcc-SVN20070820/gcc/config/bfin/bfin-protos.h egcc-SVN20070820/gcc/config/bfin/bfin-protos.h
--- orig/egcc-SVN20070820/gcc/config/bfin/bfin-protos.h	2007-08-02 10:21:16.000000000 -0400
+++ egcc-SVN20070820/gcc/config/bfin/bfin-protos.h	2007-08-21 12:59:18.725137444 -0400
@@ -86,7 +86,7 @@ extern void asm_conditional_branch (rtx,
 extern rtx bfin_gen_compare (rtx, Mmode);

 extern int bfin_local_alignment (tree, int);
-extern int bfin_return_in_memory (tree);
+extern int bfin_return_in_memory (const_tree);
 extern void initialize_trampoline (rtx, rtx, rtx);
 extern bool bfin_legitimate_address_p (Mmode, rtx, int);
 extern rtx bfin_va_arg (tree, tree);
diff -rup orig/egcc-SVN20070820/gcc/config/bfin/bfin.c egcc-SVN20070820/gcc/config/bfin/bfin.c
--- orig/egcc-SVN20070820/gcc/config/bfin/bfin.c	2007-08-05 20:03:17.000000000 -0400
+++ egcc-SVN20070820/gcc/config/bfin/bfin.c	2007-08-21 12:59:18.730729844 -0400
@@ -1608,7 +1608,7 @@ bfin_arg_partial_bytes (CUMULATIVE_ARGS
 static bool
 bfin_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
 			enum machine_mode mode ATTRIBUTE_UNUSED,
-			tree type, bool named ATTRIBUTE_UNUSED)
+			const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST;
 }
@@ -1618,7 +1618,7 @@ bfin_pass_by_reference (CUMULATIVE_ARGS
    RETURN_IN_MEMORY.  */

 int
-bfin_return_in_memory (tree type)
+bfin_return_in_memory (const_tree type)
 {
   int size = int_size_in_bytes (type);
   return size > 2 * UNITS_PER_WORD || size == -1;
@@ -5374,11 +5374,11 @@ bfin_expand_builtin (tree exp, rtx targe
 #define TARGET_SCHED_ISSUE_RATE bfin_issue_rate

 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true

 #undef TARGET_ARG_PARTIAL_BYTES
 #define TARGET_ARG_PARTIAL_BYTES bfin_arg_partial_bytes
diff -rup orig/egcc-SVN20070820/gcc/config/c4x/c4x-c.c egcc-SVN20070820/gcc/config/c4x/c4x-c.c
--- orig/egcc-SVN20070820/gcc/config/c4x/c4x-c.c	2007-08-02 10:20:23.000000000 -0400
+++ egcc-SVN20070820/gcc/config/c4x/c4x-c.c	2007-08-21 12:59:18.732407509 -0400
@@ -60,10 +60,7 @@ static int c4x_parse_pragma (const char
   do { warning (OPT_Wpragmas, gmsgid, arg); return -1; } while (0)

 static int
-c4x_parse_pragma (name, func, sect)
-     const char *name;
-     tree *func;
-     tree *sect;
+c4x_parse_pragma (const char *name, tree *func, tree *sect)
 {
   tree f, s, x;

@@ -93,8 +90,7 @@ c4x_parse_pragma (name, func, sect)
 }

 void
-c4x_pr_CODE_SECTION (pfile)
-     cpp_reader *pfile ATTRIBUTE_UNUSED;
+c4x_pr_CODE_SECTION (cpp_reader *pfile ATTRIBUTE_UNUSED)
 {
   tree func, sect;

@@ -106,8 +102,7 @@ c4x_pr_CODE_SECTION (pfile)
 }

 void
-c4x_pr_DATA_SECTION (pfile)
-     cpp_reader *pfile ATTRIBUTE_UNUSED;
+c4x_pr_DATA_SECTION (cpp_reader *pfile ATTRIBUTE_UNUSED)
 {
   tree func, sect;

@@ -119,8 +114,7 @@ c4x_pr_DATA_SECTION (pfile)
 }

 void
-c4x_pr_FUNC_IS_PURE (pfile)
-     cpp_reader *pfile ATTRIBUTE_UNUSED;
+c4x_pr_FUNC_IS_PURE (cpp_reader *pfile ATTRIBUTE_UNUSED)
 {
   tree func;

@@ -130,8 +124,7 @@ c4x_pr_FUNC_IS_PURE (pfile)
 }

 void
-c4x_pr_FUNC_NEVER_RETURNS (pfile)
-     cpp_reader *pfile ATTRIBUTE_UNUSED;
+c4x_pr_FUNC_NEVER_RETURNS (cpp_reader *pfile ATTRIBUTE_UNUSED)
 {
   tree func;

@@ -141,8 +134,7 @@ c4x_pr_FUNC_NEVER_RETURNS (pfile)
 }

 void
-c4x_pr_INTERRUPT (pfile)
-     cpp_reader *pfile ATTRIBUTE_UNUSED;
+c4x_pr_INTERRUPT (cpp_reader *pfile ATTRIBUTE_UNUSED)
 {
   tree func;

@@ -154,7 +146,6 @@ c4x_pr_INTERRUPT (pfile)
 /* Used for FUNC_CANNOT_INLINE, FUNC_EXT_CALLED, FUNC_IS_SYSTEM,
    FUNC_NO_GLOBAL_ASG, and FUNC_NO_IND_ASG.  */
 void
-c4x_pr_ignored (pfile)
-     cpp_reader *pfile ATTRIBUTE_UNUSED;
+c4x_pr_ignored (cpp_reader *pfile ATTRIBUTE_UNUSED)
 {
 }
diff -rup orig/egcc-SVN20070820/gcc/config/cris/cris.c egcc-SVN20070820/gcc/config/cris/cris.c
--- orig/egcc-SVN20070820/gcc/config/cris/cris.c	2007-08-02 10:20:29.000000000 -0400
+++ egcc-SVN20070820/gcc/config/cris/cris.c	2007-08-21 12:59:18.736383219 -0400
@@ -119,7 +119,7 @@ static void cris_init_libfuncs (void);
 static bool cris_rtx_costs (rtx, int, int, int *);
 static int cris_address_cost (rtx);
 static bool cris_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				    tree, bool);
+				    const_tree, bool);
 static int cris_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				   tree, bool);
 static tree cris_md_asm_clobbers (tree, tree, tree);
@@ -169,7 +169,7 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_
 #define TARGET_ADDRESS_COST cris_address_cost

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_STRUCT_VALUE_RTX
 #define TARGET_STRUCT_VALUE_RTX cris_struct_value_rtx
 #undef TARGET_SETUP_INCOMING_VARARGS
@@ -3403,7 +3403,7 @@ cris_setup_incoming_varargs (CUMULATIVE_

 static bool
 cris_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
-			enum machine_mode mode, tree type,
+			enum machine_mode mode, const_tree type,
 			bool named ATTRIBUTE_UNUSED)
 {
   return (targetm.calls.must_pass_in_stack (mode, type)
diff -rup orig/egcc-SVN20070820/gcc/config/crx/crx.c egcc-SVN20070820/gcc/config/crx/crx.c
--- orig/egcc-SVN20070820/gcc/config/crx/crx.c	2007-08-02 10:20:22.000000000 -0400
+++ egcc-SVN20070820/gcc/config/crx/crx.c	2007-08-21 12:59:18.738450652 -0400
@@ -135,7 +135,7 @@ rtx crx_compare_op1 = NULL_RTX;
 static bool crx_fixed_condition_code_regs (unsigned int *, unsigned int *);
 static rtx crx_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
 				 int incoming ATTRIBUTE_UNUSED);
-static bool crx_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED);
+static bool crx_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED);
 static int crx_address_cost (rtx);

 /*****************************************************************************/
@@ -204,7 +204,7 @@ crx_struct_value_rtx (tree fntype ATTRIB
 /* Implements hook TARGET_RETURN_IN_MEMORY.  */

 static bool
-crx_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+crx_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   if (TYPE_MODE (type) == BLKmode)
     {
diff -rup orig/egcc-SVN20070820/gcc/config/darwin.c egcc-SVN20070820/gcc/config/darwin.c
--- orig/egcc-SVN20070820/gcc/config/darwin.c	2007-08-02 10:21:18.000000000 -0400
+++ egcc-SVN20070820/gcc/config/darwin.c	2007-08-22 12:46:00.788782472 -0400
@@ -267,7 +267,7 @@ machopic_define_symbol (rtx mem)
   SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_DEFINED;
 }

-static GTY(()) char * function_base;
+static GTY(()) const char * function_base;

 const char *
 machopic_function_base_name (void)
@@ -276,8 +276,7 @@ machopic_function_base_name (void)
   gcc_assert (!MACHO_DYNAMIC_NO_PIC_P);

   if (function_base == NULL)
-    function_base =
-      (char *) ggc_alloc_string ("<pic base>", sizeof ("<pic base>"));
+    function_base = ggc_alloc_string ("<pic base>", sizeof ("<pic base>"));

   current_function_uses_pic_offset_table = 1;

diff -rup orig/egcc-SVN20070820/gcc/config/fr30/fr30.c egcc-SVN20070820/gcc/config/fr30/fr30.c
--- orig/egcc-SVN20070820/gcc/config/fr30/fr30.c	2007-08-02 10:20:27.000000000 -0400
+++ egcc-SVN20070820/gcc/config/fr30/fr30.c	2007-08-21 12:59:18.740169526 -0400
@@ -122,7 +122,7 @@ static struct fr30_frame_info 	zero_fram

 static void fr30_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
 					 tree, int *, int);
-static bool fr30_must_pass_in_stack (enum machine_mode, tree);
+static bool fr30_must_pass_in_stack (enum machine_mode, const_tree);
 static int fr30_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				   tree, bool);

@@ -153,7 +153,7 @@ static int fr30_arg_partial_bytes (CUMUL
 #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"

 #undef  TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
 #undef  TARGET_PASS_BY_REFERENCE
 #define TARGET_PASS_BY_REFERENCE hook_pass_by_reference_must_pass_in_stack
 #undef  TARGET_ARG_PARTIAL_BYTES
@@ -669,7 +669,7 @@ fr30_print_operand (FILE *file, rtx x, i
    in registers.  */

 static bool
-fr30_must_pass_in_stack (enum machine_mode mode, tree type)
+fr30_must_pass_in_stack (enum machine_mode mode, const_tree type)
 {
   if (mode == BLKmode)
     return true;
diff -rup orig/egcc-SVN20070820/gcc/config/frv/frv.c egcc-SVN20070820/gcc/config/frv/frv.c
--- orig/egcc-SVN20070820/gcc/config/frv/frv.c	2007-08-02 10:19:45.000000000 -0400
+++ egcc-SVN20070820/gcc/config/frv/frv.c	2007-08-21 12:59:18.749955206 -0400
@@ -375,7 +375,7 @@ static void frv_output_const_unspec		(FI
 						 const struct frv_unspec *);
 static bool frv_function_ok_for_sibcall		(tree, tree);
 static rtx frv_struct_value_rtx			(tree, int);
-static bool frv_must_pass_in_stack (enum machine_mode mode, tree type);
+static bool frv_must_pass_in_stack (enum machine_mode mode, const_tree type);
 static int frv_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				  tree, bool);
 static void frv_output_dwarf_dtprel		(FILE *, int, rtx)
@@ -3114,7 +3114,7 @@ frv_init_cumulative_args (CUMULATIVE_ARG
    in registers.  */

 static bool
-frv_must_pass_in_stack (enum machine_mode mode, tree type)
+frv_must_pass_in_stack (enum machine_mode mode, const_tree type)
 {
   if (mode == BLKmode)
     return true;
diff -rup orig/egcc-SVN20070820/gcc/config/h8300/h8300.c egcc-SVN20070820/gcc/config/h8300/h8300.c
--- orig/egcc-SVN20070820/gcc/config/h8300/h8300.c	2007-08-02 10:21:13.000000000 -0400
+++ egcc-SVN20070820/gcc/config/h8300/h8300.c	2007-08-21 12:59:18.755703722 -0400
@@ -5706,7 +5706,7 @@ h8300_init_libfuncs (void)
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-h8300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+h8300_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   return (TYPE_MODE (type) == BLKmode
 	  || GET_MODE_SIZE (TYPE_MODE (type)) > (TARGET_H8300 ? 4 : 8));
diff -rup orig/egcc-SVN20070820/gcc/config/i386/i386-protos.h egcc-SVN20070820/gcc/config/i386/i386-protos.h
--- orig/egcc-SVN20070820/gcc/config/i386/i386-protos.h	2007-08-02 10:20:12.000000000 -0400
+++ egcc-SVN20070820/gcc/config/i386/i386-protos.h	2007-08-21 12:59:18.756853586 -0400
@@ -133,8 +133,8 @@ extern rtx ix86_libcall_value (enum mach
 extern bool ix86_function_value_regno_p (int);
 extern bool ix86_function_arg_regno_p (int);
 extern int ix86_function_arg_boundary (enum machine_mode, tree);
-extern int ix86_return_in_memory (tree);
-extern int ix86_sol10_return_in_memory (tree);
+extern int ix86_return_in_memory (const_tree);
+extern int ix86_sol10_return_in_memory (const_tree);
 extern void ix86_va_start (tree, rtx);
 extern rtx ix86_va_arg (tree, tree);

diff -rup orig/egcc-SVN20070820/gcc/config/i386/i386.c egcc-SVN20070820/gcc/config/i386/i386.c
--- orig/egcc-SVN20070820/gcc/config/i386/i386.c	2007-08-14 20:02:16.000000000 -0400
+++ egcc-SVN20070820/gcc/config/i386/i386.c	2007-08-22 21:15:38.379032955 -0400
@@ -1573,7 +1573,7 @@ static bool ext_80387_constants_init = 0


 static struct machine_function * ix86_init_machine_status (void);
-static rtx ix86_function_value (tree, tree, bool);
+static rtx ix86_function_value (const_tree, const_tree, bool);
 static int ix86_function_regparm (tree, tree);
 static void ix86_compute_frame_layout (struct ix86_frame *);
 static bool ix86_expand_vector_init_one_nonzero (bool, enum machine_mode,
@@ -3011,7 +3011,7 @@ ix86_function_regparm (tree type, tree d
    indirectly or considering a libcall.  Otherwise return 0.  */

 static int
-ix86_function_sseregparm (tree type, tree decl)
+ix86_function_sseregparm (const_tree type, const_tree decl)
 {
   gcc_assert (!TARGET_64BIT);

@@ -3038,7 +3038,8 @@ ix86_function_sseregparm (tree type, tre
      (and DFmode for SSE2) arguments in SSE registers.  */
   if (decl && TARGET_SSE_MATH && flag_unit_at_a_time && !profile_flag)
     {
-      struct cgraph_local_info *i = cgraph_local_info (decl);
+      /* FIXME: remove this CONST_CAST when cgraph.[ch] is constified.  */
+      struct cgraph_local_info *i = cgraph_local_info ((tree)CONST_CAST(decl));
       if (i && i->local)
 	return TARGET_SSE2 ? 2 : 1;
     }
@@ -3182,7 +3183,7 @@ ix86_function_arg_regno_p (int regno)
 /* Return if we do not know how to pass TYPE solely in registers.  */

 static bool
-ix86_must_pass_in_stack (enum machine_mode mode, tree type)
+ix86_must_pass_in_stack (enum machine_mode mode, const_tree type)
 {
   if (must_pass_in_stack_var_size_or_pad (mode, type))
     return true;
@@ -3263,7 +3264,7 @@ init_cumulative_args (CUMULATIVE_ARGS *c
    the middle-end decides to do with these vector types.  */

 static enum machine_mode
-type_natural_mode (tree type)
+type_natural_mode (const_tree type)
 {
   enum machine_mode mode = TYPE_MODE (type);

@@ -3377,7 +3378,7 @@ merge_classes (enum x86_64_reg_class cla
 */

 static int
-classify_argument (enum machine_mode mode, tree type,
+classify_argument (enum machine_mode mode, const_tree type,
 		   enum x86_64_reg_class classes[MAX_CLASSES], int bit_offset)
 {
   HOST_WIDE_INT bytes =
@@ -3649,7 +3650,7 @@ classify_argument (enum machine_mode mod
 /* Examine the argument and return set number of register required in each
    class.  Return 0 iff parameter should be passed in memory.  */
 static int
-examine_argument (enum machine_mode mode, tree type, int in_return,
+examine_argument (enum machine_mode mode, const_tree type, int in_return,
 		  int *int_nregs, int *sse_nregs)
 {
   enum x86_64_reg_class regclass[MAX_CLASSES];
@@ -3692,7 +3693,7 @@ examine_argument (enum machine_mode mode

 static rtx
 construct_container (enum machine_mode mode, enum machine_mode orig_mode,
-		     tree type, int in_return, int nintregs, int nsseregs,
+		     const_tree type, int in_return, int nintregs, int nsseregs,
 		     const int *intreg, int sse_regno)
 {
   /* The following variables hold the static issued_error state.  */
@@ -4191,7 +4192,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum
 static bool
 ix86_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
 			enum machine_mode mode ATTRIBUTE_UNUSED,
-			tree type, bool named ATTRIBUTE_UNUSED)
+			const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   if (TARGET_64BIT_MS_ABI)
     {
@@ -4342,7 +4343,7 @@ ix86_function_value_regno_p (int regno)

 static rtx
 function_value_32 (enum machine_mode orig_mode, enum machine_mode mode,
-		   tree fntype, tree fn)
+		   const_tree fntype, const_tree fn)
 {
   unsigned int regno;

@@ -4381,7 +4382,7 @@ function_value_32 (enum machine_mode ori

 static rtx
 function_value_64 (enum machine_mode orig_mode, enum machine_mode mode,
-		   tree valtype)
+		   const_tree valtype)
 {
   rtx ret;

@@ -4438,10 +4439,10 @@ function_value_ms_64 (enum machine_mode
 }

 static rtx
-ix86_function_value_1 (tree valtype, tree fntype_or_decl,
+ix86_function_value_1 (const_tree valtype, const_tree fntype_or_decl,
 		       enum machine_mode orig_mode, enum machine_mode mode)
 {
-  tree fn, fntype;
+  const_tree fn, fntype;

   fn = NULL_TREE;
   if (fntype_or_decl && DECL_P (fntype_or_decl))
@@ -4457,7 +4458,7 @@ ix86_function_value_1 (tree valtype, tre
 }

 static rtx
-ix86_function_value (tree valtype, tree fntype_or_decl,
+ix86_function_value (const_tree valtype, const_tree fntype_or_decl,
 		     bool outgoing ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode, orig_mode;
@@ -4476,7 +4477,7 @@ ix86_libcall_value (enum machine_mode mo
 /* Return true iff type is returned in memory.  */

 static int
-return_in_memory_32 (tree type, enum machine_mode mode)
+return_in_memory_32 (const_tree type, enum machine_mode mode)
 {
   HOST_WIDE_INT size;

@@ -4516,14 +4517,14 @@ return_in_memory_32 (tree type, enum mac
 }

 static int
-return_in_memory_64 (tree type, enum machine_mode mode)
+return_in_memory_64 (const_tree type, enum machine_mode mode)
 {
   int needed_intregs, needed_sseregs;
   return !examine_argument (mode, type, 1, &needed_intregs, &needed_sseregs);
 }

 static int
-return_in_memory_ms_64 (tree type, enum machine_mode mode)
+return_in_memory_ms_64 (const_tree type, enum machine_mode mode)
 {
   HOST_WIDE_INT size = int_size_in_bytes (type);

@@ -4536,9 +4537,9 @@ return_in_memory_ms_64 (tree type, enum
 }

 int
-ix86_return_in_memory (tree type)
+ix86_return_in_memory (const_tree type)
 {
-  enum machine_mode mode = type_natural_mode (type);
+  const enum machine_mode mode = type_natural_mode (type);

   if (TARGET_64BIT_MS_ABI)
     return return_in_memory_ms_64 (type, mode);
@@ -4554,7 +4555,7 @@ ix86_return_in_memory (tree type)
    are returned in memory, rather than in MMX registers.  */

 int
-ix86_sol10_return_in_memory (tree type)
+ix86_sol10_return_in_memory (const_tree type)
 {
   int size;
   enum machine_mode mode = type_natural_mode (type);
@@ -23620,7 +23621,7 @@ static const struct attribute_spec ix86_
 #define TARGET_MD_ASM_CLOBBERS ix86_md_asm_clobbers

 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
 #undef TARGET_STRUCT_VALUE_RTX
 #define TARGET_STRUCT_VALUE_RTX ix86_struct_value_rtx
 #undef TARGET_SETUP_INCOMING_VARARGS
diff -rup orig/egcc-SVN20070820/gcc/config/ia64/ia64-protos.h egcc-SVN20070820/gcc/config/ia64/ia64-protos.h
--- orig/egcc-SVN20070820/gcc/config/ia64/ia64-protos.h	2007-08-02 10:20:35.000000000 -0400
+++ egcc-SVN20070820/gcc/config/ia64/ia64-protos.h	2007-08-22 02:03:50.344273296 -0400
@@ -77,7 +77,7 @@ extern rtx ia64_function_arg (CUMULATIVE
 			      tree, int, int);
 extern rtx ia64_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
 extern rtx ia64_va_arg (tree, tree);
-extern rtx ia64_function_value (tree, tree);
+extern rtx ia64_function_value (const_tree, const_tree);
 #endif /* RTX_CODE */

 extern void ia64_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
@@ -100,7 +100,7 @@ extern void ia64_split_return_addr_rtx (

 #ifdef ARGS_SIZE_RTX
 /* expr.h defines ARGS_SIZE_RTX and `enum direction'.  */
-extern enum direction ia64_hpux_function_arg_padding (enum machine_mode, tree);
+extern enum direction ia64_hpux_function_arg_padding (enum machine_mode, const_tree);
 #endif /* ARGS_SIZE_RTX */

 extern void ia64_hpux_handle_builtin_pragma (struct cpp_reader *);
diff -rup orig/egcc-SVN20070820/gcc/config/ia64/ia64.c egcc-SVN20070820/gcc/config/ia64/ia64.c
--- orig/egcc-SVN20070820/gcc/config/ia64/ia64.c	2007-08-14 11:34:19.000000000 -0400
+++ egcc-SVN20070820/gcc/config/ia64/ia64.c	2007-08-22 02:03:44.871456966 -0400
@@ -195,13 +195,13 @@ static rtx gen_movdi_x (rtx, rtx, rtx);
 static rtx gen_fr_spill_x (rtx, rtx, rtx);
 static rtx gen_fr_restore_x (rtx, rtx, rtx);

-static enum machine_mode hfa_element_mode (tree, bool);
+static enum machine_mode hfa_element_mode (const_tree, bool);
 static void ia64_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
 					 tree, int *, int);
 static int ia64_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				   tree, bool);
 static bool ia64_function_ok_for_sibcall (tree, tree);
-static bool ia64_return_in_memory (tree, tree);
+static bool ia64_return_in_memory (const_tree, const_tree);
 static bool ia64_rtx_costs (rtx, int, int, int *);
 static void fix_range (const char *);
 static bool ia64_handle_option (size_t, const char *, int);
@@ -3870,7 +3870,7 @@ ia64_setup_incoming_varargs (CUMULATIVE_
    aggregates are excluded because our parallels crash the middle-end.  */

 static enum machine_mode
-hfa_element_mode (tree type, bool nested)
+hfa_element_mode (const_tree type, bool nested)
 {
   enum machine_mode element_mode = VOIDmode;
   enum machine_mode mode;
@@ -4346,7 +4346,7 @@ ia64_gimplify_va_arg (tree valist, tree
    in a register.  */

 static bool
-ia64_return_in_memory (tree valtype, tree fntype ATTRIBUTE_UNUSED)
+ia64_return_in_memory (const_tree valtype, const_tree fntype ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode;
   enum machine_mode hfa_mode;
@@ -4382,7 +4382,7 @@ ia64_return_in_memory (tree valtype, tre
 /* Return rtx for register that holds the function return value.  */

 rtx
-ia64_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+ia64_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode;
   enum machine_mode hfa_mode;
@@ -7376,7 +7376,8 @@ static htab_t bundle_state_table;
 static unsigned
 bundle_state_hash (const void *bundle_state)
 {
-  const struct bundle_state *state = (struct bundle_state *) bundle_state;
+  const struct bundle_state *const state
+    = (const struct bundle_state *) bundle_state;
   unsigned result, i;

   for (result = i = 0; i < dfa_state_size; i++)
@@ -7390,8 +7391,10 @@ bundle_state_hash (const void *bundle_st
 static int
 bundle_state_eq_p (const void *bundle_state_1, const void *bundle_state_2)
 {
-  const struct bundle_state * state1 = (struct bundle_state *) bundle_state_1;
-  const struct bundle_state * state2 = (struct bundle_state *) bundle_state_2;
+  const struct bundle_state *const state1
+    = (const struct bundle_state *) bundle_state_1;
+  const struct bundle_state *const state2
+    = (const struct bundle_state *) bundle_state_2;

   return (state1->insn_num == state2->insn_num
 	  && memcmp (state1->dfa_state, state2->dfa_state,
@@ -9235,7 +9238,7 @@ ia64_expand_builtin (tree exp, rtx targe
    most significant bits of the stack slot.  */

 enum direction
-ia64_hpux_function_arg_padding (enum machine_mode mode, tree type)
+ia64_hpux_function_arg_padding (enum machine_mode mode, const_tree type)
 {
    /* Exception to normal case for structures/unions/etc.  */

diff -rup orig/egcc-SVN20070820/gcc/config/iq2000/iq2000-protos.h egcc-SVN20070820/gcc/config/iq2000/iq2000-protos.h
--- orig/egcc-SVN20070820/gcc/config/iq2000/iq2000-protos.h	2007-08-02 10:20:31.000000000 -0400
+++ egcc-SVN20070820/gcc/config/iq2000/iq2000-protos.h	2007-08-21 12:59:18.798542410 -0400
@@ -47,9 +47,9 @@ extern void             gen_conditional_
 #ifdef TREE_CODE
 extern void             init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);
 extern void             function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
-extern struct rtx_def * function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
+extern struct rtx_def * function_arg (CUMULATIVE_ARGS *, enum machine_mode, const_tree, int);
 extern void             iq2000_va_start (tree, rtx);
-extern rtx              iq2000_function_value (tree, tree);
+extern rtx              iq2000_function_value (const_tree, const_tree);
 #endif

 #endif /* ! GCC_IQ2000_PROTOS_H */
diff -rup orig/egcc-SVN20070820/gcc/config/iq2000/iq2000.c egcc-SVN20070820/gcc/config/iq2000/iq2000.c
--- orig/egcc-SVN20070820/gcc/config/iq2000/iq2000.c	2007-08-02 10:20:31.000000000 -0400
+++ egcc-SVN20070820/gcc/config/iq2000/iq2000.c	2007-08-21 12:59:18.802924534 -0400
@@ -157,16 +157,15 @@ static section *iq2000_select_rtx_sectio
 					   unsigned HOST_WIDE_INT);
 static void iq2000_init_builtins      (void);
 static rtx  iq2000_expand_builtin     (tree, rtx, rtx, enum machine_mode, int);
-static bool iq2000_return_in_memory   (tree, tree);
+static bool iq2000_return_in_memory   (const_tree, const_tree);
 static void iq2000_setup_incoming_varargs (CUMULATIVE_ARGS *,
 					   enum machine_mode, tree, int *,
 					   int);
 static bool iq2000_rtx_costs          (rtx, int, int, int *);
 static int  iq2000_address_cost       (rtx);
 static section *iq2000_select_section (tree, int, unsigned HOST_WIDE_INT);
-static bool iq2000_return_in_memory   (tree, tree);
 static bool iq2000_pass_by_reference  (CUMULATIVE_ARGS *, enum machine_mode,
-				       tree, bool);
+				       const_tree, bool);
 static int  iq2000_arg_partial_bytes  (CUMULATIVE_ARGS *, enum machine_mode,
 				       tree, bool);

@@ -191,11 +190,11 @@ static int  iq2000_arg_partial_bytes  (C
 #define TARGET_HAVE_SWITCHABLE_BSS_SECTIONS false

 #undef  TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS	hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS	hook_bool_const_tree_true
 #undef  TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN	hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN	hook_bool_const_tree_true
 #undef  TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES	hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES	hook_bool_const_tree_true

 #undef  TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY		iq2000_return_in_memory
@@ -1184,7 +1183,7 @@ function_arg_advance (CUMULATIVE_ARGS *c
    and type TYPE in CUM, or 0 if the argument is to be passed on the stack.  */

 struct rtx_def *
-function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
+function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, const_tree type,
 	      int named)
 {
   rtx ret;
@@ -1202,7 +1201,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum
 	       "function_arg( {gp reg found = %d, arg # = %2d, words = %2d}, %4s, ",
 	       cum->gp_reg_found, cum->arg_number, cum->arg_words,
 	       GET_MODE_NAME (mode));
-      fprintf (stderr, "%p", (void *) type);
+      fprintf (stderr, "%p", (const void *) type);
       fprintf (stderr, ", %d ) = ", named);
     }

@@ -2199,7 +2198,7 @@ iq2000_select_section (tree decl, int re
    FUNC.  */

 rtx
-iq2000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+iq2000_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   int reg = GP_RETURN;
   enum machine_mode mode = TYPE_MODE (valtype);
@@ -2216,7 +2215,7 @@ iq2000_function_value (tree valtype, tre

 static bool
 iq2000_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-			  tree type, bool named ATTRIBUTE_UNUSED)
+			  const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   int size;

@@ -2825,7 +2824,7 @@ iq2000_expand_builtin (tree exp, rtx tar
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-iq2000_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+iq2000_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   return ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
 	  || (int_size_in_bytes (type) == -1));
diff -rup orig/egcc-SVN20070820/gcc/config/iq2000/iq2000.h egcc-SVN20070820/gcc/config/iq2000/iq2000.h
--- orig/egcc-SVN20070820/gcc/config/iq2000/iq2000.h	2007-08-02 10:20:30.000000000 -0400
+++ egcc-SVN20070820/gcc/config/iq2000/iq2000.h	2007-08-21 12:59:18.804651810 -0400
@@ -756,7 +756,8 @@ while (0)

 #undef ASM_OUTPUT_SKIP
 #define ASM_OUTPUT_SKIP(STREAM,SIZE)					\
-  fprintf (STREAM, "\t.space\t%u\n", (SIZE))
+  fprintf (STREAM, "\t.space\t" HOST_WIDE_INT_PRINT_UNSIGNED "\n",	\
+           (unsigned HOST_WIDE_INT)(SIZE))

 #define ASM_OUTPUT_ALIGN(STREAM,LOG)					\
   if ((LOG) != 0)                       				\
diff -rup orig/egcc-SVN20070820/gcc/config/m32c/m32c-protos.h egcc-SVN20070820/gcc/config/m32c/m32c-protos.h
--- orig/egcc-SVN20070820/gcc/config/m32c/m32c-protos.h	2007-08-02 10:19:53.000000000 -0400
+++ egcc-SVN20070820/gcc/config/m32c/m32c-protos.h	2007-08-21 12:59:18.805586504 -0400
@@ -50,7 +50,7 @@ void m32c_unpend_compare (void);
 #if defined(RTX_CODE) && defined(TREE_CODE)

 rtx  m32c_function_arg (CUMULATIVE_ARGS *, MM, tree, int);
-rtx  m32c_function_value (tree, tree);
+rtx  m32c_function_value (const_tree, const_tree);

 #endif

@@ -110,7 +110,7 @@ int  m32c_split_psi_p (rtx *);
 void m32c_function_arg_advance (CUMULATIVE_ARGS *, MM, tree, int);
 tree m32c_gimplify_va_arg_expr (tree, tree, tree *, tree *);
 void m32c_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
-bool m32c_promote_function_return (tree);
+bool m32c_promote_function_return (const_tree);
 int  m32c_special_page_vector_p (tree);

 #endif
diff -rup orig/egcc-SVN20070820/gcc/config/m32c/m32c.c egcc-SVN20070820/gcc/config/m32c/m32c.c
--- orig/egcc-SVN20070820/gcc/config/m32c/m32c.c	2007-08-02 10:19:52.000000000 -0400
+++ egcc-SVN20070820/gcc/config/m32c/m32c.c	2007-08-21 12:59:18.810417770 -0400
@@ -69,8 +69,8 @@ static bool m32c_fixed_condition_code_re
 static struct machine_function *m32c_init_machine_status (void);
 static void m32c_insert_attributes (tree, tree *);
 static bool m32c_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				    tree, bool);
-static bool m32c_promote_prototypes (tree);
+				    const_tree, bool);
+static bool m32c_promote_prototypes (const_tree);
 static int m32c_pushm_popm (Push_Pop_Type);
 static bool m32c_strict_argument_naming (CUMULATIVE_ARGS *);
 static rtx m32c_struct_value_rtx (tree, int);
@@ -445,7 +445,7 @@ m32c_init_expanders (void)
 #undef TARGET_PROMOTE_FUNCTION_RETURN
 #define TARGET_PROMOTE_FUNCTION_RETURN m32c_promote_function_return
 bool
-m32c_promote_function_return (tree fntype ATTRIBUTE_UNUSED)
+m32c_promote_function_return (const_tree fntype ATTRIBUTE_UNUSED)
 {
   return false;
 }
@@ -1427,7 +1427,7 @@ m32c_initial_elimination_offset (int fro
 #undef TARGET_PROMOTE_PROTOTYPES
 #define TARGET_PROMOTE_PROTOTYPES m32c_promote_prototypes
 static bool
-m32c_promote_prototypes (tree fntype ATTRIBUTE_UNUSED)
+m32c_promote_prototypes (const_tree fntype ATTRIBUTE_UNUSED)
 {
   return 0;
 }
@@ -1514,7 +1514,7 @@ m32c_function_arg (CUMULATIVE_ARGS * ca,
 static bool
 m32c_pass_by_reference (CUMULATIVE_ARGS * ca ATTRIBUTE_UNUSED,
 			enum machine_mode mode ATTRIBUTE_UNUSED,
-			tree type ATTRIBUTE_UNUSED,
+			const_tree type ATTRIBUTE_UNUSED,
 			bool named ATTRIBUTE_UNUSED)
 {
   return 0;
@@ -1639,10 +1639,10 @@ m32c_libcall_value (enum machine_mode mo
 /* Implements FUNCTION_VALUE.  Functions and libcalls have the same
    conventions.  */
 rtx
-m32c_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+m32c_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   /* return reg or parallel */
-  enum machine_mode mode = TYPE_MODE (valtype);
+  const enum machine_mode mode = TYPE_MODE (valtype);
   return m32c_libcall_value (mode);
 }

diff -rup orig/egcc-SVN20070820/gcc/config/m32r/m32r.c egcc-SVN20070820/gcc/config/m32r/m32r.c
--- orig/egcc-SVN20070820/gcc/config/m32r/m32r.c	2007-08-02 10:20:03.000000000 -0400
+++ egcc-SVN20070820/gcc/config/m32r/m32r.c	2007-08-21 12:59:18.813724287 -0400
@@ -81,13 +81,13 @@ static int    m32r_issue_rate (void);

 static void m32r_encode_section_info (tree, rtx, int);
 static bool m32r_in_small_data_p (tree);
-static bool m32r_return_in_memory (tree, tree);
+static bool m32r_return_in_memory (const_tree, const_tree);
 static void m32r_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
 					 tree, int *, int);
 static void init_idents (void);
 static bool m32r_rtx_costs (rtx, int, int, int *);
 static bool m32r_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				    tree, bool);
+				    const_tree, bool);
 static int m32r_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				   tree, bool);

@@ -129,7 +129,7 @@ static int m32r_arg_partial_bytes (CUMUL
 #define TARGET_ADDRESS_COST hook_int_rtx_0

 #undef  TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
 #undef  TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY m32r_return_in_memory
 #undef  TARGET_SETUP_INCOMING_VARARGS
@@ -458,7 +458,7 @@ m32r_in_small_data_p (tree decl)
   section = DECL_SECTION_NAME (decl);
   if (section)
     {
-      char *name = (char *) TREE_STRING_POINTER (section);
+      const char *const name = TREE_STRING_POINTER (section);
       if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0)
 	return true;
     }
@@ -639,7 +639,7 @@ memreg_operand (rtx op, enum machine_mod

 static bool
 m32r_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
-			enum machine_mode mode, tree type,
+			enum machine_mode mode, const_tree type,
 			bool named ATTRIBUTE_UNUSED)
 {
   int size;
@@ -1006,7 +1006,7 @@ m32r_arg_partial_bytes (CUMULATIVE_ARGS
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-m32r_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+m32r_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   return m32r_pass_by_reference (NULL, TYPE_MODE (type), type, false);
 }
diff -rup orig/egcc-SVN20070820/gcc/config/m68hc11/m68hc11-protos.h egcc-SVN20070820/gcc/config/m68hc11/m68hc11-protos.h
--- orig/egcc-SVN20070820/gcc/config/m68hc11/m68hc11-protos.h	2007-08-02 10:20:28.000000000 -0400
+++ egcc-SVN20070820/gcc/config/m68hc11/m68hc11-protos.h	2007-08-21 12:59:18.814595686 -0400
@@ -111,7 +111,7 @@ extern void m68hc11_init_cumulative_args
 extern rtx m68hc11_function_arg (const CUMULATIVE_ARGS* ,
                                  enum machine_mode,
                                  tree, int);
-extern int m68hc11_function_arg_padding (enum machine_mode, tree);
+extern int m68hc11_function_arg_padding (enum machine_mode, const_tree);

 extern void m68hc11_function_epilogue (FILE*,int);

diff -rup orig/egcc-SVN20070820/gcc/config/m68hc11/m68hc11.c egcc-SVN20070820/gcc/config/m68hc11/m68hc11.c
--- orig/egcc-SVN20070820/gcc/config/m68hc11/m68hc11.c	2007-08-02 10:20:28.000000000 -0400
+++ egcc-SVN20070820/gcc/config/m68hc11/m68hc11.c	2007-08-21 12:59:18.820163440 -0400
@@ -88,7 +88,7 @@ static int autoinc_mode (rtx);
 static int m68hc11_make_autoinc_notes (rtx *, void *);
 static void m68hc11_init_libfuncs (void);
 static rtx m68hc11_struct_value_rtx (tree, int);
-static bool m68hc11_return_in_memory (tree, tree);
+static bool m68hc11_return_in_memory (const_tree, const_tree);

 /* Must be set to 1 to produce debug messages.  */
 int debug_m6811 = 0;
@@ -1479,7 +1479,7 @@ m68hc11_function_arg (const CUMULATIVE_A

    Structures are stored left shifted in their argument slot.  */
 int
-m68hc11_function_arg_padding (enum machine_mode mode, tree type)
+m68hc11_function_arg_padding (enum machine_mode mode, const_tree type)
 {
   if (type != 0 && AGGREGATE_TYPE_P (type))
     return upward;
@@ -5483,7 +5483,7 @@ m68hc11_struct_value_rtx (tree fntype AT
    in the register (D + X = 4).  */

 static bool
-m68hc11_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+m68hc11_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   if (TYPE_MODE (type) == BLKmode)
     {
diff -rup orig/egcc-SVN20070820/gcc/config/m68hc11/m68hc11.h egcc-SVN20070820/gcc/config/m68hc11/m68hc11.h
--- orig/egcc-SVN20070820/gcc/config/m68hc11/m68hc11.h	2007-08-02 10:20:28.000000000 -0400
+++ egcc-SVN20070820/gcc/config/m68hc11/m68hc11.h	2007-08-21 12:59:18.822493094 -0400
@@ -1407,6 +1407,7 @@ do {
 /* Output #ident as a .ident.  */

 /* output external reference */
+#undef ASM_OUTPUT_EXTERNAL
 #define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \
   {fputs ("\t; extern\t", FILE); \
   assemble_name (FILE, NAME); \
diff -rup orig/egcc-SVN20070820/gcc/config/m68k/m68k-protos.h egcc-SVN20070820/gcc/config/m68k/m68k-protos.h
--- orig/egcc-SVN20070820/gcc/config/m68k/m68k-protos.h	2007-08-02 10:20:38.000000000 -0400
+++ egcc-SVN20070820/gcc/config/m68k/m68k-protos.h	2007-08-21 12:59:18.823315362 -0400
@@ -60,7 +60,7 @@ extern bool m68k_matches_u_p (rtx);
 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
 extern int valid_dbcc_comparison_p_2 (rtx, enum machine_mode);
 extern rtx m68k_libcall_value (enum machine_mode);
-extern rtx m68k_function_value (tree, tree);
+extern rtx m68k_function_value (const_tree, const_tree);
 extern int emit_move_sequence (rtx *, enum machine_mode, rtx);
 extern bool m68k_movem_pattern_p (rtx, rtx, HOST_WIDE_INT, bool);
 extern const char *m68k_output_movem (rtx *, rtx, HOST_WIDE_INT, bool);
diff -rup orig/egcc-SVN20070820/gcc/config/m68k/m68k.c egcc-SVN20070820/gcc/config/m68k/m68k.c
--- orig/egcc-SVN20070820/gcc/config/m68k/m68k.c	2007-08-02 10:20:38.000000000 -0400
+++ egcc-SVN20070820/gcc/config/m68k/m68k.c	2007-08-21 12:59:18.828052767 -0400
@@ -194,7 +194,7 @@ int m68k_last_compare_had_fp_operands;
 #define TARGET_ATTRIBUTE_TABLE m68k_attribute_table

 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true

 #undef TARGET_STRUCT_VALUE_RTX
 #define TARGET_STRUCT_VALUE_RTX m68k_struct_value_rtx
@@ -4347,7 +4347,7 @@ m68k_libcall_value (enum machine_mode mo
 }

 rtx
-m68k_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+m68k_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode;

diff -rup orig/egcc-SVN20070820/gcc/config/mcore/mcore-protos.h egcc-SVN20070820/gcc/config/mcore/mcore-protos.h
--- orig/egcc-SVN20070820/gcc/config/mcore/mcore-protos.h	2007-08-02 10:20:49.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mcore/mcore-protos.h	2007-08-21 12:59:18.829024030 -0400
@@ -36,11 +36,11 @@ extern int          mcore_naked_function

 #ifdef TREE_CODE
 #ifdef HAVE_MACHINE_MODES
-extern int          mcore_num_arg_regs           	(enum machine_mode, tree);
+extern int          mcore_num_arg_regs           	(enum machine_mode, const_tree);
 #endif /* HAVE_MACHINE_MODES */

 #ifdef RTX_CODE
-extern rtx          mcore_function_value         	(tree, tree);
+extern rtx          mcore_function_value         	(const_tree, const_tree);
 #endif /* RTX_CODE */
 #endif /* TREE_CODE */

diff -rup orig/egcc-SVN20070820/gcc/config/mcore/mcore.c egcc-SVN20070820/gcc/config/mcore/mcore.c
--- orig/egcc-SVN20070820/gcc/config/mcore/mcore.c	2007-08-02 10:20:49.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mcore/mcore.c	2007-08-21 12:59:18.832982536 -0400
@@ -126,7 +126,7 @@ static rtx        emit_new_cond_insn
 static rtx        conditionalize_block          (rtx);
 static void       conditionalize_optimization   (void);
 static void       mcore_reorg                   (void);
-static rtx        handle_structs_in_regs        (enum machine_mode, tree, int);
+static rtx        handle_structs_in_regs        (enum machine_mode, const_tree, int);
 static void       mcore_mark_dllexport          (tree);
 static void       mcore_mark_dllimport          (tree);
 static int        mcore_dllexport_p             (tree);
@@ -145,7 +145,7 @@ static int        mcore_and_cost
 static int        mcore_ior_cost               	(rtx);
 static bool       mcore_rtx_costs		(rtx, int, int, int *);
 static void       mcore_external_libcall	(rtx);
-static bool       mcore_return_in_memory	(tree, tree);
+static bool       mcore_return_in_memory	(const_tree, const_tree);
 static int        mcore_arg_partial_bytes       (CUMULATIVE_ARGS *,
 						 enum machine_mode,
 						 tree, bool);
@@ -187,11 +187,11 @@ static int        mcore_arg_partial_byte
 #define TARGET_MACHINE_DEPENDENT_REORG	mcore_reorg

 #undef  TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS	hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS	hook_bool_const_tree_true
 #undef  TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN	hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN	hook_bool_const_tree_true
 #undef  TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES	hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES	hook_bool_const_tree_true

 #undef  TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY		mcore_return_in_memory
@@ -2662,7 +2662,7 @@ mcore_override_options (void)
    hold a function argument of mode MODE and type TYPE.  */

 int
-mcore_num_arg_regs (enum machine_mode mode, tree type)
+mcore_num_arg_regs (enum machine_mode mode, const_tree type)
 {
   int size;

@@ -2678,7 +2678,7 @@ mcore_num_arg_regs (enum machine_mode mo
 }

 static rtx
-handle_structs_in_regs (enum machine_mode mode, tree type, int reg)
+handle_structs_in_regs (enum machine_mode mode, const_tree type, int reg)
 {
   int size;

@@ -2722,7 +2722,7 @@ handle_structs_in_regs (enum machine_mod
 }

 rtx
-mcore_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+mcore_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode;
   int unsigned_p;
@@ -3102,8 +3102,8 @@ mcore_external_libcall (rtx fun)
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-mcore_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+mcore_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
-  HOST_WIDE_INT size = int_size_in_bytes (type);
+  const HOST_WIDE_INT size = int_size_in_bytes (type);
   return (size == -1 || size > 2 * UNITS_PER_WORD);
 }
diff -rup orig/egcc-SVN20070820/gcc/config/mips/mips-protos.h egcc-SVN20070820/gcc/config/mips/mips-protos.h
--- orig/egcc-SVN20070820/gcc/config/mips/mips-protos.h	2007-08-10 14:11:26.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mips/mips-protos.h	2007-08-21 12:59:18.834165447 -0400
@@ -223,7 +223,7 @@ extern void function_arg_advance (CUMULA
 extern struct rtx_def *function_arg (const CUMULATIVE_ARGS *,
 				     enum machine_mode, tree, int);
 extern int function_arg_boundary (enum machine_mode, tree);
-extern bool mips_pad_arg_upward (enum machine_mode, tree);
+extern bool mips_pad_arg_upward (enum machine_mode, const_tree);
 extern bool mips_pad_reg_upward (enum machine_mode, tree);
 extern void mips_va_start (tree, rtx);

@@ -262,7 +262,7 @@ extern enum mips_loadgp_style mips_curre
 extern void mips_expand_prologue (void);
 extern void mips_expand_epilogue (int);
 extern int mips_can_use_return_insn (void);
-extern struct rtx_def *mips_function_value (tree, tree, enum machine_mode);
+extern struct rtx_def *mips_function_value (const_tree, const_tree, enum machine_mode);

 extern bool mips_cannot_change_mode_class (enum machine_mode,
 					   enum machine_mode, enum reg_class);
diff -rup orig/egcc-SVN20070820/gcc/config/mips/mips.c egcc-SVN20070820/gcc/config/mips/mips.c
--- orig/egcc-SVN20070820/gcc/config/mips/mips.c	2007-08-15 20:02:32.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mips/mips.c	2007-08-21 12:59:18.847945802 -0400
@@ -346,8 +346,8 @@ static section *mips_select_rtx_section
 static section *mips_function_rodata_section (tree);
 static bool mips_in_small_data_p (tree);
 static bool mips_use_anchors_for_symbol_p (rtx);
-static int mips_fpr_return_fields (tree, tree *);
-static bool mips_return_in_msb (tree);
+static int mips_fpr_return_fields (const_tree, tree *);
+static bool mips_return_in_msb (const_tree);
 static rtx mips_return_fpr_pair (enum machine_mode mode,
 				 enum machine_mode mode1, HOST_WIDE_INT,
 				 enum machine_mode mode2, HOST_WIDE_INT);
@@ -381,7 +381,7 @@ static bool mips_strict_matching_cpu_nam
 static bool mips_matching_cpu_name_p (const char *, const char *);
 static const struct mips_cpu_info *mips_parse_cpu (const char *);
 static const struct mips_cpu_info *mips_cpu_info_from_isa (int);
-static bool mips_return_in_memory (tree, tree);
+static bool mips_return_in_memory (const_tree, const_tree);
 static bool mips_strict_argument_naming (CUMULATIVE_ARGS *);
 static void mips_macc_chains_record (rtx);
 static void mips_macc_chains_reorder (rtx *, int);
@@ -402,9 +402,9 @@ static void mips_setup_incoming_varargs
 static tree mips_build_builtin_va_list (void);
 static tree mips_gimplify_va_arg_expr (tree, tree, tree *, tree *);
 static bool mips_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode mode,
-				    tree, bool);
+				    const_tree, bool);
 static bool mips_callee_copies (CUMULATIVE_ARGS *, enum machine_mode mode,
-				tree, bool);
+				const_tree, bool);
 static int mips_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode mode,
 				   tree, bool);
 static bool mips_valid_pointer_mode (enum machine_mode);
@@ -1278,11 +1278,11 @@ static const unsigned char mips16e_save_
 #define TARGET_GIMPLIFY_VA_ARG_EXPR mips_gimplify_va_arg_expr

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true

 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY mips_return_in_memory
@@ -4376,7 +4376,7 @@ function_arg_boundary (enum machine_mode
    byte does.  */

 bool
-mips_pad_arg_upward (enum machine_mode mode, tree type)
+mips_pad_arg_upward (enum machine_mode mode, const_tree type)
 {
   /* On little-endian targets, the first byte of every stack argument
      is passed in the first byte of the stack slot.  */
@@ -8439,7 +8439,7 @@ mips_use_anchors_for_symbol_p (rtx symbo
    type.  */

 static int
-mips_fpr_return_fields (tree valtype, tree *fields)
+mips_fpr_return_fields (const_tree valtype, tree *fields)
 {
   tree field;
   int i;
@@ -8479,7 +8479,7 @@ mips_fpr_return_fields (tree valtype, tr
       - the structure is not returned in floating-point registers.  */

 static bool
-mips_return_in_msb (tree valtype)
+mips_return_in_msb (const_tree valtype)
 {
   tree fields[2];

@@ -8524,7 +8524,7 @@ mips_return_fpr_pair (enum machine_mode
    VALTYPE is null and MODE is the mode of the return value.  */

 rtx
-mips_function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
+mips_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
 		     enum machine_mode mode)
 {
   if (valtype)
@@ -8600,7 +8600,7 @@ mips_function_value (tree valtype, tree

 static bool
 mips_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
-			enum machine_mode mode, tree type,
+			enum machine_mode mode, const_tree type,
 			bool named ATTRIBUTE_UNUSED)
 {
   if (mips_abi == ABI_EABI)
@@ -8624,7 +8624,7 @@ mips_pass_by_reference (CUMULATIVE_ARGS
 static bool
 mips_callee_copies (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
 		    enum machine_mode mode ATTRIBUTE_UNUSED,
-		    tree type ATTRIBUTE_UNUSED, bool named)
+		    const_tree type ATTRIBUTE_UNUSED, bool named)
 {
   return mips_abi == ABI_EABI && named;
 }
@@ -10808,7 +10808,7 @@ mips_hard_regno_nregs (int regno, enum m
    course.  */

 static bool
-mips_return_in_memory (tree type, tree fndecl ATTRIBUTE_UNUSED)
+mips_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED)
 {
   if (TARGET_OLDABI)
     return (TYPE_MODE (type) == BLKmode);
diff -rup orig/egcc-SVN20070820/gcc/config/mips/mips.h egcc-SVN20070820/gcc/config/mips/mips.h
--- orig/egcc-SVN20070820/gcc/config/mips/mips.h	2007-08-11 20:02:45.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mips/mips.h	2007-08-22 11:23:42.013696541 -0400
@@ -2613,7 +2613,7 @@ while (0)

 #undef ASM_DECLARE_OBJECT_NAME
 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
-  mips_declare_object (STREAM, NAME, "", ":\n", 0)
+  mips_declare_object (STREAM, NAME, "", ":\n")

 /* Globalizing directive for a label.  */
 #define GLOBAL_ASM_OP "\t.globl\t"
diff -rup orig/egcc-SVN20070820/gcc/config/mmix/mmix-protos.h egcc-SVN20070820/gcc/config/mmix/mmix-protos.h
--- orig/egcc-SVN20070820/gcc/config/mmix/mmix-protos.h	2007-08-02 10:21:15.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mmix/mmix-protos.h	2007-08-21 12:59:18.849405416 -0400
@@ -53,7 +53,7 @@ extern int mmix_local_regno (int);
 extern int mmix_dbx_register_number (int);
 extern int mmix_use_simple_return (void);
 extern void mmix_make_decl_one_only (tree);
-extern rtx mmix_function_outgoing_value (tree, tree);
+extern rtx mmix_function_outgoing_value (const_tree, const_tree);
 extern int mmix_function_value_regno_p (int);
 extern int mmix_data_alignment (tree, int);
 extern int mmix_constant_alignment (tree, int);
diff -rup orig/egcc-SVN20070820/gcc/config/mmix/mmix.c egcc-SVN20070820/gcc/config/mmix/mmix.c
--- orig/egcc-SVN20070820/gcc/config/mmix/mmix.c	2007-08-02 10:21:15.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mmix/mmix.c	2007-08-21 12:59:18.852905177 -0400
@@ -134,8 +134,8 @@ static void mmix_file_start (void);
 static void mmix_file_end (void);
 static bool mmix_rtx_costs (rtx, int, int, int *);
 static rtx mmix_struct_value_rtx (tree, int);
-static bool mmix_pass_by_reference (const CUMULATIVE_ARGS *,
-				    enum machine_mode, tree, bool);
+static bool mmix_pass_by_reference (CUMULATIVE_ARGS *,
+				    enum machine_mode, const_tree, bool);

 /* Target structure macros.  Listed by node.  See `Using and Porting GCC'
    for a general description.  */
@@ -187,7 +187,7 @@ static bool mmix_pass_by_reference (cons
 #define TARGET_MACHINE_DEPENDENT_REORG mmix_reorg

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #if 0
 /* Apparently not doing TRT if int < register-size.  FIXME: Perhaps
    FUNCTION_VALUE and LIBCALL_VALUE needs tweaking as some ports say.  */
@@ -592,8 +592,8 @@ mmix_function_arg (const CUMULATIVE_ARGS
    everything that goes by value.  */

 static bool
-mmix_pass_by_reference (const CUMULATIVE_ARGS *argsp, enum machine_mode mode,
-			tree type, bool named ATTRIBUTE_UNUSED)
+mmix_pass_by_reference (CUMULATIVE_ARGS *argsp, enum machine_mode mode,
+			const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   /* FIXME: Check: I'm not sure the must_pass_in_stack check is
      necessary.  */
@@ -624,7 +624,7 @@ mmix_function_arg_regno_p (int regno, in
 /* FUNCTION_OUTGOING_VALUE.  */

 rtx
-mmix_function_outgoing_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+mmix_function_outgoing_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode = TYPE_MODE (valtype);
   enum machine_mode cmode;
@@ -1141,7 +1141,7 @@ mmix_encode_section_info (tree decl, rtx
       char *newstr;

       /* Why is the return type of ggc_alloc_string const?  */
-      newstr = (char *) ggc_alloc_string ("", len + 1);
+      newstr = (char *) CONST_CAST (ggc_alloc_string ("", len + 1));

       strcpy (newstr + 1, str);
       *newstr = '@';
diff -rup orig/egcc-SVN20070820/gcc/config/mn10300/mn10300-protos.h egcc-SVN20070820/gcc/config/mn10300/mn10300-protos.h
--- orig/egcc-SVN20070820/gcc/config/mn10300/mn10300-protos.h	2007-08-02 10:20:33.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mn10300/mn10300-protos.h	2007-08-21 12:59:18.853752731 -0400
@@ -48,7 +48,7 @@ extern bool mn10300_wide_const_load_uses
 #ifdef TREE_CODE
 extern struct rtx_def *function_arg (CUMULATIVE_ARGS *,
 				     enum machine_mode, tree, int);
-extern rtx mn10300_function_value (tree, tree, int);
+extern rtx mn10300_function_value (const_tree, const_tree, int);
 #endif /* TREE_CODE */

 extern void expand_prologue (void);
diff -rup orig/egcc-SVN20070820/gcc/config/mn10300/mn10300.c egcc-SVN20070820/gcc/config/mn10300/mn10300.c
--- orig/egcc-SVN20070820/gcc/config/mn10300/mn10300.c	2007-08-11 20:02:43.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mn10300/mn10300.c	2007-08-22 11:34:37.776003409 -0400
@@ -72,10 +72,10 @@ static int mn10300_address_cost_1 (rtx,
 static int mn10300_address_cost (rtx);
 static bool mn10300_rtx_costs (rtx, int, int, int *);
 static void mn10300_file_start (void);
-static bool mn10300_return_in_memory (tree, tree);
+static bool mn10300_return_in_memory (const_tree, const_tree);
 static rtx mn10300_builtin_saveregs (void);
 static bool mn10300_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				       tree, bool);
+				       const_tree, bool);
 static int mn10300_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				      tree, bool);

@@ -102,7 +102,7 @@ static int mn10300_arg_partial_bytes (CU
 #define TARGET_ENCODE_SECTION_INFO mn10300_encode_section_info

 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY mn10300_return_in_memory
 #undef TARGET_PASS_BY_REFERENCE
@@ -1431,7 +1431,7 @@ initial_offset (int from, int to)
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-mn10300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+mn10300_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   /* Return values > 8 bytes in length in memory.  */
   return (int_size_in_bytes (type) > 8
@@ -1482,7 +1482,7 @@ mn10300_va_start (tree valist, rtx nexta

 static bool
 mn10300_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
-			   enum machine_mode mode, tree type,
+			   enum machine_mode mode, const_tree type,
 			   bool named ATTRIBUTE_UNUSED)
 {
   unsigned HOST_WIDE_INT size;
@@ -1592,7 +1592,7 @@ mn10300_arg_partial_bytes (CUMULATIVE_AR
    callers relying on this extra copy.  */

 rtx
-mn10300_function_value (tree valtype, tree func, int outgoing)
+mn10300_function_value (const_tree valtype, const_tree func, int outgoing)
 {
   rtx rv;
   enum machine_mode mode = TYPE_MODE (valtype);
diff -rup orig/egcc-SVN20070820/gcc/config/mn10300/mn10300.h egcc-SVN20070820/gcc/config/mn10300/mn10300.h
--- orig/egcc-SVN20070820/gcc/config/mn10300/mn10300.h	2007-08-02 10:20:33.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mn10300/mn10300.h	2007-08-21 12:59:18.858218474 -0400
@@ -734,7 +734,7 @@ while (0)
 	switch (XINT ((X), 1))						\
 	  {								\
 	  case UNSPEC_INT_LABEL:					\
-	    asm_fprintf ((STREAM), ".%LLIL%d",				\
+	    asm_fprintf ((STREAM), ".%LLIL" HOST_WIDE_INT_PRINT_DEC,	\
  			 INTVAL (XVECEXP ((X), 0, 0)));			\
 	    break;							\
 	  case UNSPEC_PIC:						\
diff -rup orig/egcc-SVN20070820/gcc/config/mt/mt-protos.h egcc-SVN20070820/gcc/config/mt/mt-protos.h
--- orig/egcc-SVN20070820/gcc/config/mt/mt-protos.h	2007-08-02 10:20:32.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mt/mt-protos.h	2007-08-21 12:59:18.858976567 -0400
@@ -60,6 +60,6 @@ extern void         mt_init_cumulative_a
 extern rtx          mt_function_arg	 (const CUMULATIVE_ARGS *, enum machine_mode, tree, int, int);
 extern void	    mt_va_start	 (tree, rtx);
 extern enum reg_class mt_secondary_reload_class (enum reg_class, enum machine_mode, rtx);
-extern rtx	    mt_function_value	 (tree, enum machine_mode, tree);
+extern rtx	    mt_function_value	 (const_tree, enum machine_mode, const_tree);
 #endif
 #endif
diff -rup orig/egcc-SVN20070820/gcc/config/mt/mt.c egcc-SVN20070820/gcc/config/mt/mt.c
--- orig/egcc-SVN20070820/gcc/config/mt/mt.c	2007-08-02 10:20:32.000000000 -0400
+++ egcc-SVN20070820/gcc/config/mt/mt.c	2007-08-21 12:59:18.862051431 -0400
@@ -631,9 +631,9 @@ mt_arg_partial_bytes (CUMULATIVE_ARGS *
 /* Implement TARGET_PASS_BY_REFERENCE hook.  */
 static bool
 mt_pass_by_reference (CUMULATIVE_ARGS * cum ATTRIBUTE_UNUSED,
-		       enum machine_mode mode ATTRIBUTE_UNUSED,
-		       tree type,
-		       bool named ATTRIBUTE_UNUSED)
+		      enum machine_mode mode ATTRIBUTE_UNUSED,
+		      const_tree type,
+		      bool named ATTRIBUTE_UNUSED)
 {
   return (type && int_size_in_bytes (type) > 4 * UNITS_PER_WORD);
 }
@@ -1464,7 +1464,7 @@ mt_secondary_reload_class (enum reg_clas
 /* Handle FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE, and LIBCALL_VALUE
    macros.  */
 rtx
-mt_function_value (tree valtype, enum machine_mode mode, tree func_decl ATTRIBUTE_UNUSED)
+mt_function_value (const_tree valtype, enum machine_mode mode, const_tree func_decl ATTRIBUTE_UNUSED)
 {
   if ((mode) == DImode || (mode) == DFmode)
     return gen_rtx_MEM (mode, gen_rtx_REG (mode, RETURN_VALUE_REGNUM));
@@ -1631,7 +1631,7 @@ mt_split_words (enum machine_mode nmode,

 /* Implement TARGET_MUST_PASS_IN_STACK hook.  */
 static bool
-mt_pass_in_stack (enum machine_mode mode ATTRIBUTE_UNUSED, tree type)
+mt_pass_in_stack (enum machine_mode mode ATTRIBUTE_UNUSED, const_tree type)
 {
   return (((type) != 0
 	   && (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
@@ -2469,7 +2469,7 @@ const struct attribute_spec mt_attribute
 #undef  TARGET_STRUCT_VALUE_RTX
 #define TARGET_STRUCT_VALUE_RTX		mt_struct_value_rtx
 #undef  TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES	hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES	hook_bool_const_tree_true
 #undef  TARGET_PASS_BY_REFERENCE
 #define TARGET_PASS_BY_REFERENCE	mt_pass_by_reference
 #undef  TARGET_MUST_PASS_IN_STACK
diff -rup orig/egcc-SVN20070820/gcc/config/pa/pa-protos.h egcc-SVN20070820/gcc/config/pa/pa-protos.h
--- orig/egcc-SVN20070820/gcc/config/pa/pa-protos.h	2007-08-02 10:21:03.000000000 -0400
+++ egcc-SVN20070820/gcc/config/pa/pa-protos.h	2007-08-21 12:59:18.863092470 -0400
@@ -124,7 +124,7 @@ extern int pc_or_label_operand (rtx, enu
 #ifdef ARGS_SIZE_RTX
 /* expr.h defines ARGS_SIZE_RTX and `enum direction' */
 #ifdef TREE_CODE
-extern enum direction function_arg_padding (enum machine_mode, tree);
+extern enum direction function_arg_padding (enum machine_mode, const_tree);
 #endif
 #endif /* ARGS_SIZE_RTX */
 extern int non_hard_reg_operand (rtx, enum machine_mode);
@@ -160,9 +160,9 @@ extern int reloc_needed (tree);
 #ifdef RTX_CODE
 extern rtx function_arg (CUMULATIVE_ARGS *, enum machine_mode,
 			 tree, int);
-extern rtx function_value (tree, tree);
+extern rtx function_value (const_tree, const_tree);
 #endif
-extern bool pa_return_in_memory (tree, tree);
+extern bool pa_return_in_memory (const_tree, const_tree);
 #endif /* TREE_CODE */

 extern void pa_asm_output_aligned_bss (FILE *, const char *,
diff -rup orig/egcc-SVN20070820/gcc/config/pa/pa.c egcc-SVN20070820/gcc/config/pa/pa.c
--- orig/egcc-SVN20070820/gcc/config/pa/pa.c	2007-08-02 10:21:03.000000000 -0400
+++ egcc-SVN20070820/gcc/config/pa/pa.c	2007-08-21 12:59:18.873550464 -0400
@@ -148,7 +148,7 @@ static void pa_hpux_init_libfuncs (void)
 #endif
 static rtx pa_struct_value_rtx (tree, int);
 static bool pa_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				  tree, bool);
+				  const_tree, bool);
 static int pa_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				 tree, bool);
 static struct machine_function * pa_init_machine_status (void);
@@ -285,9 +285,9 @@ static size_t n_deferred_plabels = 0;
 #endif

 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true

 #undef TARGET_STRUCT_VALUE_RTX
 #define TARGET_STRUCT_VALUE_RTX pa_struct_value_rtx
@@ -5789,7 +5789,7 @@ pa_eh_return_handler_rtx (void)

 static bool
 pa_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
-		      enum machine_mode mode, tree type,
+		      enum machine_mode mode, const_tree type,
 		      bool named ATTRIBUTE_UNUSED)
 {
   HOST_WIDE_INT size;
@@ -5806,7 +5806,7 @@ pa_pass_by_reference (CUMULATIVE_ARGS *c
 }

 enum direction
-function_arg_padding (enum machine_mode mode, tree type)
+function_arg_padding (enum machine_mode mode, const_tree type)
 {
   if (mode == BLKmode
       || (TARGET_64BIT && type && AGGREGATE_TYPE_P (type)))
@@ -9032,7 +9032,7 @@ insn_refs_are_delayed (rtx insn)
    to match the HP Compiler ABI.  */

 rtx
-function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode valmode;

@@ -9492,7 +9492,7 @@ pa_struct_value_rtx (tree fntype ATTRIBU
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 bool
-pa_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+pa_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   /* SOM ABI says that objects larger than 64 bits are returned in memory.
      PA64 ABI says that objects larger than 128 bits are returned in memory.
diff -rup orig/egcc-SVN20070820/gcc/config/pdp11/pdp11.c egcc-SVN20070820/gcc/config/pdp11/pdp11.c
--- orig/egcc-SVN20070820/gcc/config/pdp11/pdp11.c	2007-08-02 10:20:20.000000000 -0400
+++ egcc-SVN20070820/gcc/config/pdp11/pdp11.c	2007-08-22 10:56:12.384710668 -0400
@@ -146,7 +146,7 @@ static bool pdp11_assemble_integer (rtx,
 static void pdp11_output_function_prologue (FILE *, HOST_WIDE_INT);
 static void pdp11_output_function_epilogue (FILE *, HOST_WIDE_INT);
 static bool pdp11_rtx_costs (rtx, int, int, int *);
-static bool pdp11_return_in_memory (tree, tree);
+static bool pdp11_return_in_memory (const_tree, const_tree);

 /* Initialize the GCC target structure.  */
 #undef TARGET_ASM_BYTE_OP
@@ -384,7 +384,8 @@ pdp11_output_function_epilogue (FILE *st
 	/* change fp -> r5 due to the compile error on libgcc2.c */
 	for (i =7 ; i >= 0 ; i--)
 	  if (df_regs_ever_live_p (i) && ! call_used_regs[i])
-		fprintf(stream, "\tmov %#o(r5), %s\n",(-fsize-2*j--)&0xffff, reg_names[i]);
+		fprintf(stream, "\tmov %#" HOST_WIDE_INT_PRINT "o(r5), %s\n",
+			(-fsize-2*j--)&0xffff, reg_names[i]);

 	/* get ACs */
 	via_ac = FIRST_PSEUDO_REGISTER -1;
@@ -402,7 +403,8 @@ pdp11_output_function_epilogue (FILE *st
 		&& df_regs_ever_live_p (i)
 		&& ! call_used_regs[i])
 	    {
-		fprintf(stream, "\tldd %#o(r5), %s\n", (-fsize-k)&0xffff, reg_names[i]);
+		fprintf(stream, "\tldd %#" HOST_WIDE_INT_PRINT "o(r5), %s\n",
+			(-fsize-k)&0xffff, reg_names[i]);
 		k -= 8;
 	    }

@@ -412,7 +414,8 @@ pdp11_output_function_epilogue (FILE *st
 	    {
 	        gcc_assert (LOAD_FPU_REG_P(via_ac));

-		fprintf(stream, "\tldd %#o(r5), %s\n", (-fsize-k)&0xffff, reg_names[via_ac]);
+		fprintf(stream, "\tldd %#" HOST_WIDE_INT_PRINT "o(r5), %s\n",
+			(-fsize-k)&0xffff, reg_names[via_ac]);
 		fprintf(stream, "\tstd %s, %s\n", reg_names[via_ac], reg_names[i]);
 		k -= 8;
 	    }
@@ -453,7 +456,8 @@ pdp11_output_function_epilogue (FILE *st
 		fprintf(stream, "\tmov (sp)+, %s\n", reg_names[i]);

 	if (fsize)
-	    fprintf((stream), "\tadd $%#o, sp\n", (fsize)&0xffff);
+	    fprintf((stream), "\tadd $%#" HOST_WIDE_INT_PRINT "o, sp\n",
+		    (fsize)&0xffff);
     }

     fprintf (stream, "\trts pc\n");
@@ -1080,8 +1084,7 @@ static const int move_costs[N_REG_CLASSE
    -- as we do here with 22 -- or not ? */

 int
-register_move_cost(c1, c2)
-  enum reg_class c1, c2;
+register_move_cost(enum reg_class c1, enum reg_class c2)
 {
     return move_costs[(int)c1][(int)c2];
 }
@@ -1752,7 +1755,7 @@ output_addr_const_pdp11 (FILE *file, rtx
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-pdp11_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+pdp11_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   /* Should probably return DImode and DFmode in memory, lest
      we fill up all regs!
diff -rup orig/egcc-SVN20070820/gcc/config/pdp11/pdp11.h egcc-SVN20070820/gcc/config/pdp11/pdp11.h
--- orig/egcc-SVN20070820/gcc/config/pdp11/pdp11.h	2007-08-02 10:20:20.000000000 -0400
+++ egcc-SVN20070820/gcc/config/pdp11/pdp11.h	2007-08-21 12:59:18.877890738 -0400
@@ -983,7 +983,7 @@ extern struct rtx_def *cc0_reg_rtx;
       long sval[2];							\
       REAL_VALUE_FROM_CONST_DOUBLE (r, X);				\
       REAL_VALUE_TO_TARGET_DOUBLE (r, sval);				\
-      fprintf (FILE, "$%#o", sval[0] >> 16); }				\
+      fprintf (FILE, "$%#lo", sval[0] >> 16); }				\
   else { putc ('$', FILE); output_addr_const_pdp11 (FILE, X); }}

 /* Print a memory address as an operand to reference that memory location.  */
diff -rup orig/egcc-SVN20070820/gcc/config/rs6000/rs6000-protos.h egcc-SVN20070820/gcc/config/rs6000/rs6000-protos.h
--- orig/egcc-SVN20070820/gcc/config/rs6000/rs6000-protos.h	2007-08-11 20:02:45.000000000 -0400
+++ egcc-SVN20070820/gcc/config/rs6000/rs6000-protos.h	2007-08-21 12:59:18.878858400 -0400
@@ -123,7 +123,7 @@ extern void function_arg_advance (CUMULA
 extern int function_arg_boundary (enum machine_mode, tree);
 extern rtx function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
 extern tree altivec_resolve_overloaded_builtin (tree, tree);
-extern rtx rs6000_function_value (tree, tree);
+extern rtx rs6000_function_value (const_tree, const_tree);
 extern rtx rs6000_libcall_value (enum machine_mode);
 extern rtx rs6000_va_arg (tree, tree);
 extern int function_ok_for_sibcall (tree);
@@ -131,7 +131,7 @@ extern void rs6000_elf_declare_function_
 extern bool rs6000_elf_in_small_data_p (tree);
 #ifdef ARGS_SIZE_RTX
 /* expr.h defines ARGS_SIZE_RTX and `enum direction' */
-extern enum direction function_arg_padding (enum machine_mode, tree);
+extern enum direction function_arg_padding (enum machine_mode, const_tree);
 #endif /* ARGS_SIZE_RTX */

 #endif /* TREE_CODE */
diff -rup orig/egcc-SVN20070820/gcc/config/rs6000/rs6000.c egcc-SVN20070820/gcc/config/rs6000/rs6000.c
--- orig/egcc-SVN20070820/gcc/config/rs6000/rs6000.c	2007-08-16 10:44:44.000000000 -0400
+++ egcc-SVN20070820/gcc/config/rs6000/rs6000.c	2007-08-21 12:59:18.903139639 -0400
@@ -740,7 +740,7 @@ static void rs6000_output_function_epilo
 static void rs6000_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT,
 				    tree);
 static rtx rs6000_emit_set_long_const (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
-static bool rs6000_return_in_memory (tree, tree);
+static bool rs6000_return_in_memory (const_tree, const_tree);
 static void rs6000_file_start (void);
 #if TARGET_ELF
 static int rs6000_elf_reloc_rw_mask (void);
@@ -871,16 +871,16 @@ static void rs6000_darwin64_record_arg_f
 					      HOST_WIDE_INT,
 					      rtx[], int *);
 static void rs6000_darwin64_record_arg_recurse (CUMULATIVE_ARGS *,
-					       tree, HOST_WIDE_INT,
-					       rtx[], int *);
-static rtx rs6000_darwin64_record_arg (CUMULATIVE_ARGS *, tree, int, bool);
+						const_tree, HOST_WIDE_INT,
+						rtx[], int *);
+static rtx rs6000_darwin64_record_arg (CUMULATIVE_ARGS *, const_tree, int, bool);
 static rtx rs6000_mixed_function_arg (enum machine_mode, tree, int);
 static void rs6000_move_block_from_reg (int regno, rtx x, int nregs);
 static void setup_incoming_varargs (CUMULATIVE_ARGS *,
 				    enum machine_mode, tree,
 				    int *, int);
 static bool rs6000_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				      tree, bool);
+				      const_tree, bool);
 static int rs6000_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				     tree, bool);
 static const char *invalid_arg_for_unprototyped_fn (tree, tree, tree);
@@ -893,7 +893,7 @@ static void rs6000_darwin_file_start (vo

 static tree rs6000_build_builtin_va_list (void);
 static tree rs6000_gimplify_va_arg (tree, tree, tree *, tree *);
-static bool rs6000_must_pass_in_stack (enum machine_mode, tree);
+static bool rs6000_must_pass_in_stack (enum machine_mode, const_tree);
 static bool rs6000_scalar_mode_supported_p (enum machine_mode);
 static bool rs6000_vector_mode_supported_p (enum machine_mode);
 static int get_vec_cmp_insn (enum rtx_code, enum machine_mode,
@@ -1125,9 +1125,9 @@ static const char alt_reg_names[][8] =
 /* On rs6000, function arguments are promoted, as are function return
    values.  */
 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true

 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY rs6000_return_in_memory
@@ -4765,7 +4765,7 @@ rs6000_emit_move (rtx dest, rtx source,
    memory always.  The cast to unsigned makes -1 > 8.  */

 static bool
-rs6000_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+rs6000_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   /* In the darwin64 abi, try to use registers for larger structs
      if possible.  */
@@ -4887,7 +4887,7 @@ init_cumulative_args (CUMULATIVE_ARGS *c
 /* Return true if TYPE must be passed on the stack and not in registers.  */

 static bool
-rs6000_must_pass_in_stack (enum machine_mode mode, tree type)
+rs6000_must_pass_in_stack (enum machine_mode mode, const_tree type)
 {
   if (DEFAULT_ABI == ABI_AIX || TARGET_64BIT)
     return must_pass_in_stack_var_size (mode, type);
@@ -4905,7 +4905,7 @@ rs6000_must_pass_in_stack (enum machine_
    argument slot.  */

 enum direction
-function_arg_padding (enum machine_mode mode, tree type)
+function_arg_padding (enum machine_mode mode, const_tree type)
 {
 #ifndef AGGREGATE_PADDING_FIXED
 #define AGGREGATE_PADDING_FIXED 0
@@ -5464,7 +5464,7 @@ rs6000_darwin64_record_arg_flush (CUMULA
 /* Recursive workhorse for the following.  */

 static void
-rs6000_darwin64_record_arg_recurse (CUMULATIVE_ARGS *cum, tree type,
+rs6000_darwin64_record_arg_recurse (CUMULATIVE_ARGS *cum, const_tree type,
 				    HOST_WIDE_INT startbitpos, rtx rvec[],
 				    int *k)
 {
@@ -5534,7 +5534,7 @@ rs6000_darwin64_record_arg_recurse (CUMU
    calling convention.  */

 static rtx
-rs6000_darwin64_record_arg (CUMULATIVE_ARGS *orig_cum, tree type,
+rs6000_darwin64_record_arg (CUMULATIVE_ARGS *orig_cum, const_tree type,
 			    int named, bool retval)
 {
   rtx rvec[FIRST_PSEUDO_REGISTER];
@@ -5992,7 +5992,7 @@ rs6000_arg_partial_bytes (CUMULATIVE_ARG

 static bool
 rs6000_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
-			  enum machine_mode mode, tree type,
+			  enum machine_mode mode, const_tree type,
 			  bool named ATTRIBUTE_UNUSED)
 {
   if (DEFAULT_ABI == ABI_V4 && TARGET_IEEEQUAD && mode == TFmode)
@@ -7737,13 +7737,13 @@ altivec_expand_dst_builtin (tree exp, rt
   tree arg0, arg1, arg2;
   enum machine_mode mode0, mode1, mode2;
   rtx pat, op0, op1, op2;
-  struct builtin_description *d;
+  const struct builtin_description *d;
   size_t i;

   *expandedp = false;

   /* Handle DST variants.  */
-  d = (struct builtin_description *) bdesc_dst;
+  d = bdesc_dst;
   for (i = 0; i < ARRAY_SIZE (bdesc_dst); i++, d++)
     if (d->code == fcode)
       {
@@ -7896,8 +7896,8 @@ altivec_expand_vec_ext_builtin (tree exp
 static rtx
 altivec_expand_builtin (tree exp, rtx target, bool *expandedp)
 {
-  struct builtin_description *d;
-  struct builtin_description_predicates *dp;
+  const struct builtin_description *d;
+  const struct builtin_description_predicates *dp;
   size_t i;
   enum insn_code icode;
   tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0);
@@ -8026,13 +8026,13 @@ altivec_expand_builtin (tree exp, rtx ta
     }

   /* Expand abs* operations.  */
-  d = (struct builtin_description *) bdesc_abs;
+  d = bdesc_abs;
   for (i = 0; i < ARRAY_SIZE (bdesc_abs); i++, d++)
     if (d->code == fcode)
       return altivec_expand_abs_builtin (d->icode, exp, target);

   /* Expand the AltiVec predicates.  */
-  dp = (struct builtin_description_predicates *) bdesc_altivec_preds;
+  dp = bdesc_altivec_preds;
   for (i = 0; i < ARRAY_SIZE (bdesc_altivec_preds); i++, dp++)
     if (dp->code == fcode)
       return altivec_expand_predicate_builtin (dp->icode, dp->opcode,
@@ -8407,7 +8407,7 @@ rs6000_expand_builtin (tree exp, rtx tar
 {
   tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0);
   unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
-  struct builtin_description *d;
+  const struct builtin_description *d;
   size_t i;
   rtx ret;
   bool success;
@@ -8492,7 +8492,7 @@ rs6000_expand_builtin (tree exp, rtx tar
       return rs6000_expand_binop_builtin (d->icode, exp, target);

   /* Handle simple ternary operations.  */
-  d = (struct builtin_description *) bdesc_3arg;
+  d = bdesc_3arg;
   for (i = 0; i < ARRAY_SIZE  (bdesc_3arg); i++, d++)
     if (d->code == fcode)
       return rs6000_expand_ternop_builtin (d->icode, exp, target);
@@ -8867,8 +8867,8 @@ spe_init_builtins (void)
 static void
 altivec_init_builtins (void)
 {
-  struct builtin_description *d;
-  struct builtin_description_predicates *dp;
+  const struct builtin_description *d;
+  const struct builtin_description_predicates *dp;
   size_t i;
   tree ftype;

@@ -9049,12 +9049,12 @@ altivec_init_builtins (void)
   def_builtin (MASK_ALTIVEC, "__builtin_vec_ctu", opaque_ftype_opaque_int, ALTIVEC_BUILTIN_VEC_CTU);

   /* Add the DST variants.  */
-  d = (struct builtin_description *) bdesc_dst;
+  d = bdesc_dst;
   for (i = 0; i < ARRAY_SIZE (bdesc_dst); i++, d++)
     def_builtin (d->mask, d->name, void_ftype_pcvoid_int_int, d->code);

   /* Initialize the predicates.  */
-  dp = (struct builtin_description_predicates *) bdesc_altivec_preds;
+  dp = bdesc_altivec_preds;
   for (i = 0; i < ARRAY_SIZE (bdesc_altivec_preds); i++, dp++)
     {
       enum machine_mode mode1;
@@ -9092,7 +9092,7 @@ altivec_init_builtins (void)
     }

   /* Initialize the abs* operators.  */
-  d = (struct builtin_description *) bdesc_abs;
+  d = bdesc_abs;
   for (i = 0; i < ARRAY_SIZE (bdesc_abs); i++, d++)
     {
       enum machine_mode mode0;
@@ -9223,7 +9223,7 @@ altivec_init_builtins (void)
 static void
 rs6000_common_init_builtins (void)
 {
-  struct builtin_description *d;
+  const struct builtin_description *d;
   size_t i;

   tree v4sf_ftype_v4sf_v4sf_v16qi
@@ -9420,7 +9420,7 @@ rs6000_common_init_builtins (void)
 				V8HI_type_node, V8HI_type_node, NULL_TREE);

   /* Add the simple ternary operators.  */
-  d = (struct builtin_description *) bdesc_3arg;
+  d = bdesc_3arg;
   for (i = 0; i < ARRAY_SIZE (bdesc_3arg); i++, d++)
     {
       enum machine_mode mode0, mode1, mode2, mode3;
@@ -20749,7 +20749,7 @@ rs6000_complex_function_value (enum mach
    fp1, unless -msoft-float.  */

 rtx
-rs6000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+rs6000_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode;
   unsigned int regno;
diff -rup orig/egcc-SVN20070820/gcc/config/s390/s390-protos.h egcc-SVN20070820/gcc/config/s390/s390-protos.h
--- orig/egcc-SVN20070820/gcc/config/s390/s390-protos.h	2007-08-02 10:19:50.000000000 -0400
+++ egcc-SVN20070820/gcc/config/s390/s390-protos.h	2007-08-21 12:59:18.904947093 -0400
@@ -121,7 +121,7 @@ extern void s390_function_arg_advance (C
 				       tree, int);
 #ifdef RTX_CODE
 extern rtx s390_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
-extern rtx s390_function_value (tree, enum machine_mode);
+extern rtx s390_function_value (const_tree, enum machine_mode);
 extern void s390_va_start (tree, rtx);
 #endif /* RTX_CODE */
 #endif /* TREE_CODE */
diff -rup orig/egcc-SVN20070820/gcc/config/s390/s390.c egcc-SVN20070820/gcc/config/s390/s390.c
--- orig/egcc-SVN20070820/gcc/config/s390/s390.c	2007-08-02 10:19:46.000000000 -0400
+++ egcc-SVN20070820/gcc/config/s390/s390.c	2007-08-21 12:59:18.914497039 -0400
@@ -7644,7 +7644,7 @@ s390_emit_epilogue (bool sibcall)
    MODE must be specified.  */

 static int
-s390_function_arg_size (enum machine_mode mode, tree type)
+s390_function_arg_size (enum machine_mode mode, const_tree type)
 {
   if (type)
     return int_size_in_bytes (type);
@@ -7742,7 +7742,7 @@ s390_function_arg_integer (enum machine_

 static bool
 s390_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
-			enum machine_mode mode, tree type,
+			enum machine_mode mode, const_tree type,
 			bool named ATTRIBUTE_UNUSED)
 {
   int size = s390_function_arg_size (mode, type);
@@ -7842,7 +7842,7 @@ s390_function_arg (CUMULATIVE_ARGS *cum,
    hidden first argument.  */

 static bool
-s390_return_in_memory (tree type, tree fundecl ATTRIBUTE_UNUSED)
+s390_return_in_memory (const_tree type, const_tree fundecl ATTRIBUTE_UNUSED)
 {
   /* We accept small integral (and similar) types.  */
   if (INTEGRAL_TYPE_P (type)
@@ -7869,7 +7869,7 @@ s390_return_in_memory (tree type, tree f
    value of mode MODE from a libcall.  */

 rtx
-s390_function_value (tree type, enum machine_mode mode)
+s390_function_value (const_tree type, enum machine_mode mode)
 {
   if (type)
     {
@@ -9318,9 +9318,9 @@ s390_reorg (void)
 #define TARGET_GIMPLIFY_VA_ARG_EXPR s390_gimplify_va_arg

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
 #undef TARGET_PASS_BY_REFERENCE
 #define TARGET_PASS_BY_REFERENCE s390_pass_by_reference

diff -rup orig/egcc-SVN20070820/gcc/config/score/score-protos.h egcc-SVN20070820/gcc/config/score/score-protos.h
--- orig/egcc-SVN20070820/gcc/config/score/score-protos.h	2007-08-02 10:20:51.000000000 -0400
+++ egcc-SVN20070820/gcc/config/score/score-protos.h	2007-08-21 12:59:18.915795736 -0400
@@ -55,7 +55,7 @@ void score_init_cumulative_args (CUMULAT
 void score_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
                                  tree type, int named);

-rtx score_function_value (tree valtype, tree func, enum machine_mode mode);
+rtx score_function_value (const_tree valtype, const_tree func, enum machine_mode mode);

 rtx score_va_arg (tree va_list, tree type);

@@ -71,7 +71,8 @@ int score_register_move_cost (enum machi
                               enum reg_class from);

 void score_declare_object (FILE *stream, const char *name,
-                           const char *directive, const char *fmt, ...);
+                           const char *directive, const char *fmt, ...)
+     ATTRIBUTE_PRINTF_4;

 void score_declare_object_name (FILE *stream, const char *name, tree decl);

diff -rup orig/egcc-SVN20070820/gcc/config/score/score.c egcc-SVN20070820/gcc/config/score/score.c
--- orig/egcc-SVN20070820/gcc/config/score/score.c	2007-08-17 04:30:33.000000000 -0400
+++ egcc-SVN20070820/gcc/config/score/score.c	2007-08-21 12:59:18.918274784 -0400
@@ -59,8 +59,8 @@
 #define CE_REG_CLASS_P(C) \
   ((C) == HI_REG || (C) == LO_REG || (C) == CE_REGS)

-static int score_arg_partial_bytes (const CUMULATIVE_ARGS *,
-                                    enum machine_mode, tree, int);
+static int score_arg_partial_bytes (CUMULATIVE_ARGS *,
+                                    enum machine_mode, tree, bool);

 static int score_symbol_insns (enum score_symbol_type);

@@ -104,13 +104,13 @@ static int score_address_cost (rtx);
 #define TARGET_ASM_CAN_OUTPUT_MI_THUNK  hook_bool_tree_hwi_hwi_tree_true

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS    hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS    hook_bool_const_tree_true

 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN  hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN  hook_bool_const_tree_true

 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES       hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES       hook_bool_const_tree_true

 #undef TARGET_MUST_PASS_IN_STACK
 #define TARGET_MUST_PASS_IN_STACK       must_pass_in_stack_var_size
@@ -137,7 +137,7 @@ static int score_address_cost (rtx);
    small structures are returned in a register.
    Objects with varying size must still be returned in memory.  */
 static bool
-score_return_in_memory (tree type, tree fndecl ATTRIBUTE_UNUSED)
+score_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED)
 {
   return ((TYPE_MODE (type) == BLKmode)
           || (int_size_in_bytes (type) > 2 * UNITS_PER_WORD)
@@ -147,7 +147,7 @@ score_return_in_memory (tree type, tree
 /* Return nonzero when an argument must be passed by reference.  */
 static bool
 score_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
-                         enum machine_mode mode, tree type,
+                         enum machine_mode mode, const_tree type,
                          bool named ATTRIBUTE_UNUSED)
 {
   /* If we have a variable-sized parameter, we have no choice.  */
@@ -156,7 +156,7 @@ score_pass_by_reference (CUMULATIVE_ARGS

 /* Return a legitimate address for REG + OFFSET.  */
 static rtx
-score_add_offset (rtx temp, rtx reg, HOST_WIDE_INT offset)
+score_add_offset (rtx temp ATTRIBUTE_UNUSED, rtx reg, HOST_WIDE_INT offset)
 {
   if (!IMM_IN_RANGE (offset, 15, 1))
     {
@@ -685,8 +685,8 @@ score_function_arg_advance (CUMULATIVE_A

 /* Implement TARGET_ARG_PARTIAL_BYTES macro.  */
 static int
-score_arg_partial_bytes (const CUMULATIVE_ARGS *cum,
-                         enum machine_mode mode, tree type, int named)
+score_arg_partial_bytes (CUMULATIVE_ARGS *cum,
+                         enum machine_mode mode, tree type, bool named)
 {
   struct score_arg_info info;
   classify_arg (cum, mode, type, named, &info);
@@ -730,7 +730,7 @@ score_function_arg (const CUMULATIVE_ARG
    VALTYPE is the return type and MODE is VOIDmode.  For libcalls,
    VALTYPE is null and MODE is the mode of the return value.  */
 rtx
-score_function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
+score_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
                       enum machine_mode mode)
 {
   if (valtype)
diff -rup orig/egcc-SVN20070820/gcc/config/score/score.h egcc-SVN20070820/gcc/config/score/score.h
--- orig/egcc-SVN20070820/gcc/config/score/score.h	2007-08-17 04:30:34.000000000 -0400
+++ egcc-SVN20070820/gcc/config/score/score.h	2007-08-21 12:59:18.919887953 -0400
@@ -791,7 +791,7 @@ typedef struct score_args

 #undef ASM_DECLARE_OBJECT_NAME
 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
-  score_declare_object (STREAM, NAME, "", ":\n", 0)
+  score_declare_object (STREAM, NAME, "", ":\n")

 /* This says how to output an external.  It would be possible not to
    output anything and let undefined symbol become external. However
diff -rup orig/egcc-SVN20070820/gcc/config/sh/sh-protos.h egcc-SVN20070820/gcc/config/sh/sh-protos.h
--- orig/egcc-SVN20070820/gcc/config/sh/sh-protos.h	2007-08-02 10:20:17.000000000 -0400
+++ egcc-SVN20070820/gcc/config/sh/sh-protos.h	2007-08-21 12:59:18.920927631 -0400
@@ -137,7 +137,7 @@ extern int initial_elimination_offset (i
 extern int fldi_ok (void);
 extern int sh_hard_regno_rename_ok (unsigned int, unsigned int);
 extern int sh_cfun_interrupt_handler_p (void);
-extern int sh_attr_renesas_p (tree);
+extern int sh_attr_renesas_p (const_tree);
 extern int sh_cfun_attr_renesas_p (void);
 extern void sh_initialize_trampoline (rtx, rtx, rtx);
 extern bool sh_cannot_change_mode_class
@@ -161,7 +161,7 @@ extern rtx sh_function_arg (CUMULATIVE_A
 extern void sh_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
 extern int sh_pass_in_reg_p (CUMULATIVE_ARGS *, enum machine_mode, tree);
 extern void sh_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, signed int, enum machine_mode);
-extern bool sh_promote_prototypes (tree);
+extern bool sh_promote_prototypes (const_tree);

 extern rtx replace_n_hard_rtx (rtx, rtx *, int , int);
 extern int shmedia_cleanup_truncate (rtx *, void *);
diff -rup orig/egcc-SVN20070820/gcc/config/sh/sh.c egcc-SVN20070820/gcc/config/sh/sh.c
--- orig/egcc-SVN20070820/gcc/config/sh/sh.c	2007-08-11 20:02:42.000000000 -0400
+++ egcc-SVN20070820/gcc/config/sh/sh.c	2007-08-21 12:59:18.932488359 -0400
@@ -242,7 +242,7 @@ static struct save_entry_s *sh5_schedule
 						struct save_schedule_s *, int);

 static rtx sh_struct_value_rtx (tree, int);
-static bool sh_return_in_memory (tree, tree);
+static bool sh_return_in_memory (const_tree, const_tree);
 static rtx sh_builtin_saveregs (void);
 static void sh_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
 static bool sh_strict_argument_naming (CUMULATIVE_ARGS *);
@@ -250,9 +250,9 @@ static bool sh_pretend_outgoing_varargs_
 static tree sh_build_builtin_va_list (void);
 static tree sh_gimplify_va_arg_expr (tree, tree, tree *, tree *);
 static bool sh_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				  tree, bool);
+				  const_tree, bool);
 static bool sh_callee_copies (CUMULATIVE_ARGS *, enum machine_mode,
-			      tree, bool);
+			      const_tree, bool);
 static int sh_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 			         tree, bool);
 static int sh_dwarf_calling_convention (tree);
@@ -7354,7 +7354,7 @@ sh_gimplify_va_arg_expr (tree valist, tr
 }

 bool
-sh_promote_prototypes (tree type)
+sh_promote_prototypes (const_tree type)
 {
   if (TARGET_HITACHI)
     return 0;
@@ -7369,8 +7369,8 @@ sh_promote_prototypes (tree type)
    loads them into the full 64-bits registers.  */

 static int
-shcompact_byref (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-		 tree type, bool named)
+shcompact_byref (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
+		 const_tree type, bool named)
 {
   unsigned HOST_WIDE_INT size;

@@ -7394,7 +7394,7 @@ shcompact_byref (CUMULATIVE_ARGS *cum, e

 static bool
 sh_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-		      tree type, bool named)
+		      const_tree type, bool named)
 {
   if (targetm.calls.must_pass_in_stack (mode, type))
     return true;
@@ -7416,7 +7416,7 @@ sh_pass_by_reference (CUMULATIVE_ARGS *c

 static bool
 sh_callee_copies (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-		  tree type, bool named ATTRIBUTE_UNUSED)
+		  const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   /* ??? How can it possibly be correct to return true only on the
      caller side of the equation?  Is there someplace else in the
@@ -7715,7 +7715,7 @@ sh_struct_value_rtx (tree fndecl, int in
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-sh_return_in_memory (tree type, tree fndecl)
+sh_return_in_memory (const_tree type, const_tree fndecl)
 {
   if (TARGET_SH5)
     {
@@ -8052,7 +8052,7 @@ sh_handle_renesas_attribute (tree *node

 /* True if __attribute__((renesas)) or -mrenesas.  */
 int
-sh_attr_renesas_p (tree td)
+sh_attr_renesas_p (const_tree td)
 {
   if (TARGET_HITACHI)
     return 1;
diff -rup orig/egcc-SVN20070820/gcc/config/sparc/sparc-protos.h egcc-SVN20070820/gcc/config/sparc/sparc-protos.h
--- orig/egcc-SVN20070820/gcc/config/sparc/sparc-protos.h	2007-08-02 10:20:01.000000000 -0400
+++ egcc-SVN20070820/gcc/config/sparc/sparc-protos.h	2007-08-21 12:59:18.933879318 -0400
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.
 #define __SPARC_PROTOS_H__

 #ifdef TREE_CODE
-extern struct rtx_def *function_value (tree, enum machine_mode, int);
+extern struct rtx_def *function_value (const_tree, enum machine_mode, int);
 extern void function_arg_advance (CUMULATIVE_ARGS *,
 				  enum machine_mode, tree, int);
 extern struct rtx_def *function_arg (const CUMULATIVE_ARGS *,
@@ -36,7 +36,7 @@ extern void sparc_va_start (tree, rtx);
 extern unsigned long sparc_type_code (tree);
 #ifdef ARGS_SIZE_RTX
 /* expr.h defines ARGS_SIZE_RTX and `enum direction' */
-extern enum direction function_arg_padding (enum machine_mode, tree);
+extern enum direction function_arg_padding (enum machine_mode, const_tree);
 #endif /* ARGS_SIZE_RTX */
 #endif /* TREE_CODE */

diff -rup orig/egcc-SVN20070820/gcc/config/sparc/sparc.c egcc-SVN20070820/gcc/config/sparc/sparc.c
--- orig/egcc-SVN20070820/gcc/config/sparc/sparc.c	2007-08-11 20:02:41.000000000 -0400
+++ egcc-SVN20070820/gcc/config/sparc/sparc.c	2007-08-21 12:59:18.943617387 -0400
@@ -381,14 +381,14 @@ static rtx sparc_tls_got (void);
 static const char *get_some_local_dynamic_name (void);
 static int get_some_local_dynamic_name_1 (rtx *, void *);
 static bool sparc_rtx_costs (rtx, int, int, int *);
-static bool sparc_promote_prototypes (tree);
+static bool sparc_promote_prototypes (const_tree);
 static rtx sparc_struct_value_rtx (tree, int);
-static bool sparc_return_in_memory (tree, tree);
+static bool sparc_return_in_memory (const_tree, const_tree);
 static bool sparc_strict_argument_naming (CUMULATIVE_ARGS *);
 static tree sparc_gimplify_va_arg (tree, tree, tree *, tree *);
 static bool sparc_vector_mode_supported_p (enum machine_mode);
 static bool sparc_pass_by_reference (CUMULATIVE_ARGS *,
-				     enum machine_mode, tree, bool);
+				     enum machine_mode, const_tree, bool);
 static int sparc_arg_partial_bytes (CUMULATIVE_ARGS *,
 				    enum machine_mode, tree, bool);
 static void sparc_dwarf_handle_frame_unspec (const char *, rtx, int);
@@ -494,13 +494,13 @@ static bool fpu_option_set = false;
    no-op for TARGET_ARCH32 this is ok.  Otherwise we'd need to add a runtime
    test for this value.  */
 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true

 /* This is only needed for TARGET_ARCH64, but since PROMOTE_FUNCTION_MODE is a
    no-op for TARGET_ARCH32 this is ok.  Otherwise we'd need to add a runtime
    test for this value.  */
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true

 #undef TARGET_PROMOTE_PROTOTYPES
 #define TARGET_PROMOTE_PROTOTYPES sparc_promote_prototypes
@@ -4469,7 +4469,7 @@ init_cumulative_args (struct sparc_args
    When a prototype says `char' or `short', really pass an `int'.  */

 static bool
-sparc_promote_prototypes (tree fntype ATTRIBUTE_UNUSED)
+sparc_promote_prototypes (const_tree fntype ATTRIBUTE_UNUSED)
 {
   return TARGET_ARCH32 ? true : false;
 }
@@ -4681,17 +4681,17 @@ struct function_arg_record_value_parms
 static void function_arg_record_value_3
  (HOST_WIDE_INT, struct function_arg_record_value_parms *);
 static void function_arg_record_value_2
- (tree, HOST_WIDE_INT, struct function_arg_record_value_parms *, bool);
+ (const_tree, HOST_WIDE_INT, struct function_arg_record_value_parms *, bool);
 static void function_arg_record_value_1
- (tree, HOST_WIDE_INT, struct function_arg_record_value_parms *, bool);
-static rtx function_arg_record_value (tree, enum machine_mode, int, int, int);
+ (const_tree, HOST_WIDE_INT, struct function_arg_record_value_parms *, bool);
+static rtx function_arg_record_value (const_tree, enum machine_mode, int, int, int);
 static rtx function_arg_union_value (int, enum machine_mode, int, int);

 /* A subroutine of function_arg_record_value.  Traverse the structure
    recursively and determine how many registers will be required.  */

 static void
-function_arg_record_value_1 (tree type, HOST_WIDE_INT startbitpos,
+function_arg_record_value_1 (const_tree type, HOST_WIDE_INT startbitpos,
 			     struct function_arg_record_value_parms *parms,
 			     bool packed_p)
 {
@@ -4847,7 +4847,7 @@ function_arg_record_value_3 (HOST_WIDE_I
    to make that happen.  */

 static void
-function_arg_record_value_2 (tree type, HOST_WIDE_INT startbitpos,
+function_arg_record_value_2 (const_tree type, HOST_WIDE_INT startbitpos,
 			     struct function_arg_record_value_parms *parms,
 			     bool packed_p)
 {
@@ -4954,7 +4954,7 @@ function_arg_record_value_2 (tree type,
    REGBASE is the regno of the base register for the parameter array.  */

 static rtx
-function_arg_record_value (tree type, enum machine_mode mode,
+function_arg_record_value (const_tree type, enum machine_mode mode,
 			   int slotno, int named, int regbase)
 {
   HOST_WIDE_INT typesize = int_size_in_bytes (type);
@@ -5327,7 +5327,7 @@ sparc_arg_partial_bytes (CUMULATIVE_ARGS

 static bool
 sparc_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
-			 enum machine_mode mode, tree type,
+			 enum machine_mode mode, const_tree type,
 			 bool named ATTRIBUTE_UNUSED)
 {
   if (TARGET_ARCH32)
@@ -5424,7 +5424,7 @@ function_arg_advance (struct sparc_args
    argument slot.  */

 enum direction
-function_arg_padding (enum machine_mode mode, tree type)
+function_arg_padding (enum machine_mode mode, const_tree type)
 {
   if (TARGET_ARCH64 && type != 0 && AGGREGATE_TYPE_P (type))
     return upward;
@@ -5437,7 +5437,7 @@ function_arg_padding (enum machine_mode
    Specify whether to return the return value in memory.  */

 static bool
-sparc_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+sparc_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   if (TARGET_ARCH32)
     /* Original SPARC 32-bit ABI says that structures and unions,
@@ -5545,7 +5545,7 @@ sparc_struct_value_rtx (tree fndecl, int
    except that up to 32 bytes may be returned in registers.  */

 rtx
-function_value (tree type, enum machine_mode mode, int incoming_p)
+function_value (const_tree type, enum machine_mode mode, int incoming_p)
 {
   /* Beware that the two values are swapped here wrt function_arg.  */
   int regbase = (incoming_p
diff -rup orig/egcc-SVN20070820/gcc/config/spu/spu-protos.h egcc-SVN20070820/gcc/config/spu/spu-protos.h
--- orig/egcc-SVN20070820/gcc/config/spu/spu-protos.h	2007-08-02 10:19:54.000000000 -0400
+++ egcc-SVN20070820/gcc/config/spu/spu-protos.h	2007-08-21 12:59:18.944815421 -0400
@@ -59,7 +59,7 @@ extern int spu_legitimate_address (enum
 				   int reg_ok_strict);
 extern rtx spu_legitimize_address (rtx x, rtx oldx, enum machine_mode mode);
 extern int spu_initial_elimination_offset (int from, int to);
-extern rtx spu_function_value (tree type, tree func);
+extern rtx spu_function_value (const_tree type, const_tree func);
 extern rtx spu_function_arg (int cum, enum machine_mode mode, tree type,
 			     int named);
 extern void spu_va_start (tree valist, rtx nextarg);
diff -rup orig/egcc-SVN20070820/gcc/config/spu/spu.c egcc-SVN20070820/gcc/config/spu/spu.c
--- orig/egcc-SVN20070820/gcc/config/spu/spu.c	2007-08-09 19:21:39.000000000 -0400
+++ egcc-SVN20070820/gcc/config/spu/spu.c	2007-08-21 12:59:18.951088857 -0400
@@ -113,8 +113,8 @@ static tree spu_handle_vector_attribute
 					 int flags,
 					 unsigned char *no_add_attrs);
 static int spu_naked_function_p (tree func);
-static unsigned char spu_pass_by_reference (int *cum, enum machine_mode mode,
-					    tree type, unsigned char named);
+static unsigned char spu_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+					    const_tree type, unsigned char named);
 static tree spu_build_builtin_va_list (void);
 static tree spu_gimplify_va_arg_expr (tree valist, tree type, tree * pre_p,
 				      tree * post_p);
@@ -128,7 +128,7 @@ static unsigned char spu_rtx_costs (rtx
 				    int *total);
 static unsigned char spu_function_ok_for_sibcall (tree decl, tree exp);
 static void spu_init_libfuncs (void);
-static bool spu_return_in_memory (tree type, tree fntype);
+static bool spu_return_in_memory (const_tree type, const_tree fntype);
 static void fix_range (const char *);
 static void spu_encode_section_info (tree, rtx, int);
 static tree spu_builtin_mul_widen_even (tree);
@@ -3020,7 +3020,7 @@ spu_initial_elimination_offset (int from
 }

 rtx
-spu_function_value (tree type, tree func ATTRIBUTE_UNUSED)
+spu_function_value (const_tree type, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode = TYPE_MODE (type);
   int byte_size = ((mode == BLKmode)
@@ -3102,7 +3102,7 @@ spu_function_arg (CUMULATIVE_ARGS cum,
 static bool
 spu_pass_by_reference (CUMULATIVE_ARGS * cum ATTRIBUTE_UNUSED,
 		       enum machine_mode mode ATTRIBUTE_UNUSED,
-		       tree type, bool named ATTRIBUTE_UNUSED)
+		       const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST;
 }
@@ -4396,7 +4396,7 @@ spu_gen_subreg (enum machine_mode mode,
 }

 static bool
-spu_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+spu_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   return (TYPE_MODE (type) == BLKmode
 	  && ((type) == 0
diff -rup orig/egcc-SVN20070820/gcc/config/stormy16/stormy16-protos.h egcc-SVN20070820/gcc/config/stormy16/stormy16-protos.h
--- orig/egcc-SVN20070820/gcc/config/stormy16/stormy16-protos.h	2007-08-02 10:20:26.000000000 -0400
+++ egcc-SVN20070820/gcc/config/stormy16/stormy16-protos.h	2007-08-21 12:59:18.952111892 -0400
@@ -44,7 +44,7 @@ extern rtx xstormy16_function_arg
 #if defined (TREE_CODE) && defined (RTX_CODE)
 extern void xstormy16_expand_builtin_va_start (tree, rtx);
 extern void xstormy16_initialize_trampoline (rtx, rtx, rtx);
-extern rtx xstormy16_function_value (tree, tree);
+extern rtx xstormy16_function_value (const_tree, const_tree);
 #endif

 #ifdef RTX_CODE
diff -rup orig/egcc-SVN20070820/gcc/config/stormy16/stormy16.c egcc-SVN20070820/gcc/config/stormy16/stormy16.c
--- orig/egcc-SVN20070820/gcc/config/stormy16/stormy16.c	2007-08-02 10:20:26.000000000 -0400
+++ egcc-SVN20070820/gcc/config/stormy16/stormy16.c	2007-08-21 12:59:18.955513071 -0400
@@ -58,7 +58,7 @@ static void xstormy16_init_builtins (voi
 static rtx xstormy16_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
 static bool xstormy16_rtx_costs (rtx, int, int, int *);
 static int xstormy16_address_cost (rtx);
-static bool xstormy16_return_in_memory (tree, tree);
+static bool xstormy16_return_in_memory (const_tree, const_tree);

 /* Define the information needed to generate branch and scc insns.  This is
    stored from the compare operation.  */
@@ -1515,7 +1515,7 @@ xstormy16_initialize_trampoline (rtx add
 /* Worker function for FUNCTION_VALUE.  */

 rtx
-xstormy16_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+xstormy16_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode;
   mode = TYPE_MODE (valtype);
@@ -2637,9 +2637,9 @@ xstormy16_reorg (void)
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-xstormy16_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+xstormy16_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
-  HOST_WIDE_INT size = int_size_in_bytes (type);
+  const HOST_WIDE_INT size = int_size_in_bytes (type);
   return (size == -1 || size > UNITS_PER_WORD * NUM_ARGUMENT_REGISTERS);
 }

@@ -2670,11 +2670,11 @@ xstormy16_return_in_memory (tree type, t
 #define TARGET_GIMPLIFY_VA_ARG_EXPR xstormy16_expand_builtin_va_arg

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true

 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY xstormy16_return_in_memory
diff -rup orig/egcc-SVN20070820/gcc/config/v850/v850.c egcc-SVN20070820/gcc/config/v850/v850.c
--- orig/egcc-SVN20070820/gcc/config/v850/v850.c	2007-08-02 10:21:12.000000000 -0400
+++ egcc-SVN20070820/gcc/config/v850/v850.c	2007-08-21 12:59:18.958970502 -0400
@@ -66,11 +66,11 @@ static void v850_asm_init_sections   (vo
 static section *v850_select_section (tree, int, unsigned HOST_WIDE_INT);
 static void v850_encode_data_area    (tree, rtx);
 static void v850_encode_section_info (tree, rtx, int);
-static bool v850_return_in_memory    (tree, tree);
+static bool v850_return_in_memory    (const_tree, const_tree);
 static void v850_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
 					 tree, int *, int);
 static bool v850_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
-				    tree, bool);
+				    const_tree, bool);
 static int v850_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
 				   tree, bool);

@@ -143,7 +143,7 @@ static GTY(()) section *zbss_section;
 #define TARGET_MACHINE_DEPENDENT_REORG v850_reorg

 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true

 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY v850_return_in_memory
@@ -223,7 +223,7 @@ v850_handle_option (size_t code, const c

 static bool
 v850_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
-			enum machine_mode mode, tree type,
+			enum machine_mode mode, const_tree type,
 			bool named ATTRIBUTE_UNUSED)
 {
   unsigned HOST_WIDE_INT size;
@@ -2929,7 +2929,7 @@ v850_select_section (tree exp,
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-v850_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+v850_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   /* Return values > 8 bytes in length in memory.  */
   return int_size_in_bytes (type) > 8 || TYPE_MODE (type) == BLKmode;
diff -rup orig/egcc-SVN20070820/gcc/config/vax/vax.c egcc-SVN20070820/gcc/config/vax/vax.c
--- orig/egcc-SVN20070820/gcc/config/vax/vax.c	2007-08-02 10:21:10.000000000 -0400
+++ egcc-SVN20070820/gcc/config/vax/vax.c	2007-08-21 12:59:18.960731065 -0400
@@ -82,7 +82,7 @@ static rtx vax_struct_value_rtx (tree, i
 #define TARGET_ADDRESS_COST vax_address_cost

 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true

 #undef TARGET_STRUCT_VALUE_RTX
 #define TARGET_STRUCT_VALUE_RTX vax_struct_value_rtx
diff -rup orig/egcc-SVN20070820/gcc/config/xtensa/xtensa.c egcc-SVN20070820/gcc/config/xtensa/xtensa.c
--- orig/egcc-SVN20070820/gcc/config/xtensa/xtensa.c	2007-08-02 10:20:24.000000000 -0400
+++ egcc-SVN20070820/gcc/config/xtensa/xtensa.c	2007-08-21 12:59:18.964424631 -0400
@@ -130,7 +130,7 @@ static rtx gen_float_relational (enum rt
 static rtx gen_conditional_move (rtx);
 static rtx fixup_subreg_mem (rtx);
 static struct machine_function * xtensa_init_machine_status (void);
-static bool xtensa_return_in_msb (tree);
+static bool xtensa_return_in_msb (const_tree);
 static void printx (FILE *, signed int);
 static void xtensa_function_epilogue (FILE *, HOST_WIDE_INT);
 static rtx xtensa_builtin_saveregs (void);
@@ -140,7 +140,7 @@ static section *xtensa_select_rtx_sectio
 					   unsigned HOST_WIDE_INT);
 static bool xtensa_rtx_costs (rtx, int, int, int *);
 static tree xtensa_build_builtin_va_list (void);
-static bool xtensa_return_in_memory (tree, tree);
+static bool xtensa_return_in_memory (const_tree, const_tree);
 static tree xtensa_gimplify_va_arg_expr (tree, tree, tree *, tree *);
 static void xtensa_init_builtins (void);
 static tree xtensa_fold_builtin (tree, tree, bool);
@@ -179,11 +179,11 @@ static const int reg_nonleaf_alloc_order
 #define TARGET_BUILD_BUILTIN_VA_LIST xtensa_build_builtin_va_list

 #undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
 #undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
 #undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true

 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY xtensa_return_in_memory
@@ -1842,7 +1842,7 @@ function_arg_boundary (enum machine_mode


 static bool
-xtensa_return_in_msb (tree valtype)
+xtensa_return_in_msb (const_tree valtype)
 {
   return (TARGET_BIG_ENDIAN
 	  && AGGREGATE_TYPE_P (valtype)
@@ -3100,7 +3100,7 @@ xtensa_rtx_costs (rtx x, int code, int o
 /* Worker function for TARGET_RETURN_IN_MEMORY.  */

 static bool
-xtensa_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+xtensa_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   return ((unsigned HOST_WIDE_INT) int_size_in_bytes (type)
 	  > 4 * UNITS_PER_WORD);
diff -rup orig/egcc-SVN20070820/gcc/explow.c egcc-SVN20070820/gcc/explow.c
--- orig/egcc-SVN20070820/gcc/explow.c	2007-08-08 20:02:07.000000000 -0400
+++ egcc-SVN20070820/gcc/explow.c	2007-08-21 12:59:18.966738921 -0400
@@ -778,10 +778,10 @@ copy_to_suggested_reg (rtx x, rtx target
 #endif

 enum machine_mode
-promote_mode (tree type, enum machine_mode mode, int *punsignedp,
+promote_mode (const_tree type, enum machine_mode mode, int *punsignedp,
 	      int for_call ATTRIBUTE_UNUSED)
 {
-  enum tree_code code = TREE_CODE (type);
+  const enum tree_code code = TREE_CODE (type);
   int unsignedp = *punsignedp;

 #ifndef PROMOTE_MODE
@@ -1476,7 +1476,7 @@ probe_stack_range (HOST_WIDE_INT first,
    and 0 otherwise.  */

 rtx
-hard_function_value (tree valtype, tree func, tree fntype,
+hard_function_value (const_tree valtype, const_tree func, const_tree fntype,
 		     int outgoing ATTRIBUTE_UNUSED)
 {
   rtx val;
diff -rup orig/egcc-SVN20070820/gcc/expr.h egcc-SVN20070820/gcc/expr.h
--- orig/egcc-SVN20070820/gcc/expr.h	2007-08-14 11:34:22.000000000 -0400
+++ egcc-SVN20070820/gcc/expr.h	2007-08-21 12:59:18.968193974 -0400
@@ -567,7 +567,7 @@ extern HOST_WIDE_INT int_expr_size (tree

 /* Return an rtx that refers to the value returned by a function
    in its original home.  This becomes invalid if any more code is emitted.  */
-extern rtx hard_function_value (tree, tree, tree, int);
+extern rtx hard_function_value (const_tree, const_tree, const_tree, int);

 extern rtx prepare_call_address (rtx, rtx, rtx *, int, int);

@@ -688,7 +688,7 @@ extern rtx force_reg (enum machine_mode,
 extern rtx force_not_mem (rtx);

 /* Return mode and signedness to use when object is promoted.  */
-extern enum machine_mode promote_mode (tree, enum machine_mode, int *, int);
+extern enum machine_mode promote_mode (const_tree, enum machine_mode, int *, int);

 /* Remove some bytes from the stack.  An rtx says how many.  */
 extern void adjust_stack (rtx);
diff -rup orig/egcc-SVN20070820/gcc/final.c egcc-SVN20070820/gcc/final.c
--- orig/egcc-SVN20070820/gcc/final.c	2007-08-18 20:02:28.000000000 -0400
+++ egcc-SVN20070820/gcc/final.c	2007-08-21 12:59:18.972537448 -0400
@@ -1523,7 +1523,9 @@ profile_function (FILE *file ATTRIBUTE_U

 #if defined(ASM_OUTPUT_REG_PUSH)
   if (sval && svrtx != NULL_RTX && REG_P (svrtx))
-    ASM_OUTPUT_REG_PUSH (file, REGNO (svrtx));
+    {
+      ASM_OUTPUT_REG_PUSH (file, REGNO (svrtx));
+    }
 #endif

 #if defined(STATIC_CHAIN_INCOMING_REGNUM) && defined(ASM_OUTPUT_REG_PUSH)
@@ -1554,7 +1556,9 @@ profile_function (FILE *file ATTRIBUTE_U

 #if defined(ASM_OUTPUT_REG_PUSH)
   if (sval && svrtx != NULL_RTX && REG_P (svrtx))
-    ASM_OUTPUT_REG_POP (file, REGNO (svrtx));
+    {
+      ASM_OUTPUT_REG_POP (file, REGNO (svrtx));
+    }
 #endif
 }

diff -rup orig/egcc-SVN20070820/gcc/function.c egcc-SVN20070820/gcc/function.c
--- orig/egcc-SVN20070820/gcc/function.c	2007-08-05 20:03:19.000000000 -0400
+++ egcc-SVN20070820/gcc/function.c	2007-08-21 12:59:18.978546584 -0400
@@ -1742,17 +1742,17 @@ struct tree_opt_pass pass_instantiate_vi
    EXP may be a type node or an expression (whose type is tested).  */

 int
-aggregate_value_p (tree exp, tree fntype)
+aggregate_value_p (const_tree exp, const_tree fntype)
 {
   int i, regno, nregs;
   rtx reg;

-  tree type = (TYPE_P (exp)) ? exp : TREE_TYPE (exp);
+  const_tree type = (TYPE_P (exp)) ? exp : TREE_TYPE (exp);

   /* DECL node associated with FNTYPE when relevant, which we might need to
      check for by-invisible-reference returns, typically for CALL_EXPR input
      EXPressions.  */
-  tree fndecl = NULL_TREE;
+  const_tree fndecl = NULL_TREE;

   if (fntype)
     switch (TREE_CODE (fntype))
diff -rup orig/egcc-SVN20070820/gcc/hooks.c egcc-SVN20070820/gcc/hooks.c
--- orig/egcc-SVN20070820/gcc/hooks.c	2007-08-16 10:44:45.000000000 -0400
+++ egcc-SVN20070820/gcc/hooks.c	2007-08-21 12:59:18.979630992 -0400
@@ -202,6 +202,12 @@ hook_bool_tree_true (tree a ATTRIBUTE_UN
 }

 bool
+hook_bool_const_tree_true (const_tree a ATTRIBUTE_UNUSED)
+{
+  return true;
+}
+
+bool
 hook_bool_tree_tree_false (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
 {
   return false;
diff -rup orig/egcc-SVN20070820/gcc/hooks.h egcc-SVN20070820/gcc/hooks.h
--- orig/egcc-SVN20070820/gcc/hooks.h	2007-08-16 10:44:45.000000000 -0400
+++ egcc-SVN20070820/gcc/hooks.h	2007-08-21 12:59:18.980330513 -0400
@@ -33,6 +33,7 @@ extern bool hook_bool_mode_rtx_true (enu
 extern bool hook_bool_tree_false (tree);
 extern bool hook_bool_const_tree_false (const_tree);
 extern bool hook_bool_tree_true (tree);
+extern bool hook_bool_const_tree_true (const_tree);
 extern bool hook_bool_tree_hwi_hwi_tree_false (tree, HOST_WIDE_INT, HOST_WIDE_INT,
 					tree);
 extern bool hook_bool_tree_hwi_hwi_tree_true (tree, HOST_WIDE_INT, HOST_WIDE_INT,
diff -rup orig/egcc-SVN20070820/gcc/sdbout.c egcc-SVN20070820/gcc/sdbout.c
--- orig/egcc-SVN20070820/gcc/sdbout.c	2007-07-26 23:03:55.000000000 -0400
+++ egcc-SVN20070820/gcc/sdbout.c	2007-08-21 12:59:18.982556302 -0400
@@ -259,7 +259,7 @@ do { fprintf (asm_out_file, "\t.tag\t");
 /* Set the sdb tag identifier string for TYPE to NAME.  */

 #define SET_KNOWN_TYPE_TAG(TYPE, NAME) \
-  TYPE_SYMTAB_POINTER (TYPE) = (char *)(NAME)
+  TYPE_SYMTAB_POINTER (TYPE) = (const char *)(NAME)

 /* Return the name (a string) of the struct, union or enum tag
    described by the TREE_LIST node LINK.  This is 0 for an anonymous one.  */
@@ -580,7 +580,7 @@ plain_type_1 (tree type, int level)
     case QUAL_UNION_TYPE:
     case ENUMERAL_TYPE:
       {
-	char *tag;
+	const char *tag;
 #ifdef SDB_ALLOW_FORWARD_REFERENCES
 	sdbout_record_type_name (type);
 #endif
diff -rup orig/egcc-SVN20070820/gcc/target-def.h egcc-SVN20070820/gcc/target-def.h
--- orig/egcc-SVN20070820/gcc/target-def.h	2007-08-20 20:03:33.000000000 -0400
+++ egcc-SVN20070820/gcc/target-def.h	2007-08-21 12:59:18.984159309 -0400
@@ -528,13 +528,13 @@

 #define TARGET_ARM_EABI_UNWINDER false

-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_false
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_false
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_false
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_false
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_false

 #define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null
 #define TARGET_RETURN_IN_MEMORY default_return_in_memory
-#define TARGET_RETURN_IN_MSB hook_bool_tree_false
+#define TARGET_RETURN_IN_MSB hook_bool_const_tree_false

 #define TARGET_EXPAND_BUILTIN_SAVEREGS default_expand_builtin_saveregs
 #define TARGET_SETUP_INCOMING_VARARGS default_setup_incoming_varargs
diff -rup orig/egcc-SVN20070820/gcc/target.h egcc-SVN20070820/gcc/target.h
--- orig/egcc-SVN20070820/gcc/target.h	2007-08-20 20:03:27.000000000 -0400
+++ egcc-SVN20070820/gcc/target.h	2007-08-21 12:59:18.988387077 -0400
@@ -742,18 +742,18 @@ struct gcc_target

   /* Functions relating to calls - argument passing, returns, etc.  */
   struct calls {
-    bool (*promote_function_args) (tree fntype);
-    bool (*promote_function_return) (tree fntype);
-    bool (*promote_prototypes) (tree fntype);
+    bool (*promote_function_args) (const_tree fntype);
+    bool (*promote_function_return) (const_tree fntype);
+    bool (*promote_prototypes) (const_tree fntype);
     rtx (*struct_value_rtx) (tree fndecl, int incoming);
-    bool (*return_in_memory) (tree type, tree fndecl);
-    bool (*return_in_msb) (tree type);
+    bool (*return_in_memory) (const_tree type, const_tree fndecl);
+    bool (*return_in_msb) (const_tree type);

     /* Return true if a parameter must be passed by reference.  TYPE may
        be null if this is a libcall.  CA may be null if this query is
        from __builtin_va_arg.  */
     bool (*pass_by_reference) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
-			       tree type, bool named_arg);
+			       const_tree type, bool named_arg);

     rtx (*expand_builtin_saveregs) (void);
     /* Returns pretend_argument_size.  */
@@ -774,13 +774,13 @@ struct gcc_target
        but must be passed on the stack.  */
     /* ??? This predicate should be applied strictly after pass-by-reference.
        Need audit to verify that this is the case.  */
-    bool (* must_pass_in_stack) (enum machine_mode mode, tree t);
+    bool (* must_pass_in_stack) (enum machine_mode mode, const_tree t);

     /* Return true if type TYPE, mode MODE, which is passed by reference,
        should have the object copy generated by the callee rather than
        the caller.  It is never called for TYPE requiring constructors.  */
     bool (* callee_copies) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
-			    tree type, bool named);
+			    const_tree type, bool named);

     /* Return zero for arguments passed entirely on the stack or entirely
        in registers.  If passed in both, return the number of bytes passed
@@ -795,7 +795,7 @@ struct gcc_target

     /* Return an rtx for the return value location of the function
        specified by FN_DECL_OR_TYPE with a return type of RET_TYPE.  */
-    rtx (*function_value) (tree ret_type, tree fn_decl_or_type,
+    rtx (*function_value) (const_tree ret_type, const_tree fn_decl_or_type,
 			   bool outgoing);

     /* Return an rtx for the argument pointer incoming to the
diff -rup orig/egcc-SVN20070820/gcc/targhooks.c egcc-SVN20070820/gcc/targhooks.c
--- orig/egcc-SVN20070820/gcc/targhooks.c	2007-08-20 20:03:27.000000000 -0400
+++ egcc-SVN20070820/gcc/targhooks.c	2007-08-21 12:59:18.991157951 -0400
@@ -84,8 +84,8 @@ default_cc_modes_compatible (enum machin
 }

 bool
-default_return_in_memory (tree type,
-			  tree fntype ATTRIBUTE_UNUSED)
+default_return_in_memory (const_tree type,
+			  const_tree fntype ATTRIBUTE_UNUSED)
 {
 #ifndef RETURN_IN_MEMORY
   return (TYPE_MODE (type) == BLKmode);
@@ -229,7 +229,7 @@ default_cxx_get_cookie_size (tree type)

 bool
 hook_pass_by_reference_must_pass_in_stack (CUMULATIVE_ARGS *c ATTRIBUTE_UNUSED,
-	enum machine_mode mode ATTRIBUTE_UNUSED, tree type ATTRIBUTE_UNUSED,
+	enum machine_mode mode ATTRIBUTE_UNUSED, const_tree type ATTRIBUTE_UNUSED,
 	bool named_arg ATTRIBUTE_UNUSED)
 {
   return targetm.calls.must_pass_in_stack (mode, type);
@@ -241,7 +241,7 @@ hook_pass_by_reference_must_pass_in_stac
 bool
 hook_callee_copies_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
 			  enum machine_mode mode ATTRIBUTE_UNUSED,
-			  tree type ATTRIBUTE_UNUSED, bool named)
+			  const_tree type ATTRIBUTE_UNUSED, bool named)
 {
   return named;
 }
@@ -382,7 +382,7 @@ bool
 hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false (
 	CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
 	enum machine_mode mode ATTRIBUTE_UNUSED,
-	tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
+	const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
 {
   return false;
 }
@@ -391,7 +391,7 @@ bool
 hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true (
 	CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
 	enum machine_mode mode ATTRIBUTE_UNUSED,
-	tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
+	const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
 {
   return true;
 }
@@ -516,8 +516,8 @@ hook_bool_rtx_commutative_p (rtx x, int
 }

 rtx
-default_function_value (tree ret_type ATTRIBUTE_UNUSED,
-			tree fn_decl_or_type,
+default_function_value (const_tree ret_type ATTRIBUTE_UNUSED,
+			const_tree fn_decl_or_type,
 			bool outgoing ATTRIBUTE_UNUSED)
 {
   /* The old interface doesn't handle receiving the function type.  */
diff -rup orig/egcc-SVN20070820/gcc/targhooks.h egcc-SVN20070820/gcc/targhooks.h
--- orig/egcc-SVN20070820/gcc/targhooks.h	2007-08-20 20:03:27.000000000 -0400
+++ egcc-SVN20070820/gcc/targhooks.h	2007-08-21 12:59:18.992907952 -0400
@@ -22,7 +22,7 @@ extern void default_external_libcall (rt
 extern enum machine_mode default_cc_modes_compatible (enum machine_mode,
 						      enum machine_mode);

-extern bool default_return_in_memory (tree, tree);
+extern bool default_return_in_memory (const_tree, const_tree);

 extern rtx default_expand_builtin_saveregs (void);
 extern void default_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
@@ -47,9 +47,9 @@ extern tree default_cxx_guard_type (void
 extern tree default_cxx_get_cookie_size (tree);

 extern bool hook_pass_by_reference_must_pass_in_stack
-  (CUMULATIVE_ARGS *, enum machine_mode mode, tree, bool);
+  (CUMULATIVE_ARGS *, enum machine_mode mode, const_tree, bool);
 extern bool hook_callee_copies_named
-  (CUMULATIVE_ARGS *ca, enum machine_mode, tree, bool);
+  (CUMULATIVE_ARGS *ca, enum machine_mode, const_tree, bool);

 extern void default_unwind_emit (FILE *, rtx);

@@ -75,15 +75,15 @@ extern bool hook_bool_CUMULATIVE_ARGS_fa
 extern bool hook_bool_CUMULATIVE_ARGS_true (CUMULATIVE_ARGS *);

 extern bool hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false
-  (CUMULATIVE_ARGS *, enum machine_mode, tree, bool);
+  (CUMULATIVE_ARGS *, enum machine_mode, const_tree, bool);
 extern bool hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true
-  (CUMULATIVE_ARGS *, enum machine_mode, tree, bool);
+  (CUMULATIVE_ARGS *, enum machine_mode, const_tree, bool);
 extern int hook_int_CUMULATIVE_ARGS_mode_tree_bool_0
   (CUMULATIVE_ARGS *, enum machine_mode, tree, bool);
 extern const char *hook_invalid_arg_for_unprototyped_fn
   (tree, tree, tree);
 extern bool hook_bool_rtx_commutative_p (rtx, int);
-extern rtx default_function_value (tree, tree, bool);
+extern rtx default_function_value (const_tree, const_tree, bool);
 extern rtx default_internal_arg_pointer (void);
 extern enum reg_class default_secondary_reload (bool, rtx, enum reg_class,
 						enum machine_mode,
diff -rup orig/egcc-SVN20070820/gcc/tree-ssa-structalias.c egcc-SVN20070820/gcc/tree-ssa-structalias.c
--- orig/egcc-SVN20070820/gcc/tree-ssa-structalias.c	2007-08-19 20:03:40.000000000 -0400
+++ egcc-SVN20070820/gcc/tree-ssa-structalias.c	2007-08-21 12:59:18.999335904 -0400
@@ -1647,6 +1647,7 @@ typedef struct equiv_class_label
   bitmap labels;
   hashval_t hashcode;
 } *equiv_class_label_t;
+typedef const struct equiv_class_label *const_equiv_class_label_t;

 /* A hashtable for mapping a bitmap of labels->pointer equivalence
    classes.  */
@@ -1661,7 +1662,7 @@ static htab_t location_equiv_class_table
 static hashval_t
 equiv_class_label_hash (const void *p)
 {
-  const equiv_class_label_t ecl = (equiv_class_label_t) p;
+  const_equiv_class_label_t const ecl = (const_equiv_class_label_t) p;
   return ecl->hashcode;
 }

@@ -1670,8 +1671,8 @@ equiv_class_label_hash (const void *p)
 static int
 equiv_class_label_eq (const void *p1, const void *p2)
 {
-  const equiv_class_label_t eql1 = (equiv_class_label_t) p1;
-  const equiv_class_label_t eql2 = (equiv_class_label_t) p2;
+  const_equiv_class_label_t const eql1 = (const_equiv_class_label_t) p1;
+  const_equiv_class_label_t const eql2 = (const_equiv_class_label_t) p2;
   return bitmap_equal_p (eql1->labels, eql2->labels);
 }

diff -rup orig/egcc-SVN20070820/gcc/tree-vectorizer.c egcc-SVN20070820/gcc/tree-vectorizer.c
--- orig/egcc-SVN20070820/gcc/tree-vectorizer.c	2007-08-19 20:03:38.000000000 -0400
+++ egcc-SVN20070820/gcc/tree-vectorizer.c	2007-08-21 12:59:19.002405967 -0400
@@ -1378,7 +1378,7 @@ new_stmt_vec_info (tree stmt, loop_vec_i
 static bool
 bb_in_loop_p (const_basic_block bb, const void *data)
 {
-  struct loop *loop = (struct loop *)data;
+  const struct loop *const loop = (const struct loop *)data;
   if (flow_bb_inside_loop_p (loop, bb))
     return true;
   return false;
diff -rup orig/egcc-SVN20070820/gcc/tree.c egcc-SVN20070820/gcc/tree.c
--- orig/egcc-SVN20070820/gcc/tree.c	2007-08-20 20:03:27.000000000 -0400
+++ egcc-SVN20070820/gcc/tree.c	2007-08-21 12:59:19.011180537 -0400
@@ -7972,7 +7972,7 @@ range_in_array_bounds_p (tree ref)
    location.  */

 bool
-needs_to_live_in_memory (tree t)
+needs_to_live_in_memory (const_tree t)
 {
   if (TREE_CODE (t) == SSA_NAME)
     t = SSA_NAME_VAR (t);
diff -rup orig/egcc-SVN20070820/gcc/tree.h egcc-SVN20070820/gcc/tree.h
--- orig/egcc-SVN20070820/gcc/tree.h	2007-08-20 20:03:27.000000000 -0400
+++ egcc-SVN20070820/gcc/tree.h	2007-08-21 12:59:19.019146600 -0400
@@ -2311,7 +2311,7 @@ struct tree_type GTY(())
   tree reference_to;
   union tree_type_symtab {
     int GTY ((tag ("0"))) address;
-    char * GTY ((tag ("1"))) pointer;
+    const char * GTY ((tag ("1"))) pointer;
     struct die_struct * GTY ((tag ("2"))) die;
   } GTY ((desc ("debug_hooks == &sdb_debug_hooks ? 1 : debug_hooks == &dwarf2_debug_hooks ? 2 : 0"),
 	  descbits ("2"))) symtab;
@@ -4803,7 +4803,7 @@ extern void expand_function_start (tree)
 extern void stack_protect_prologue (void);
 extern void stack_protect_epilogue (void);
 extern void recompute_tree_invariant_for_addr_expr (tree);
-extern bool needs_to_live_in_memory (tree);
+extern bool needs_to_live_in_memory (const_tree);
 extern tree reconstruct_complex_type (tree, tree);

 extern int real_onep (const_tree);
@@ -4858,7 +4858,7 @@ extern void free_temp_slots (void);
 extern void pop_temp_slots (void);
 extern void push_temp_slots (void);
 extern void preserve_temp_slots (rtx);
-extern int aggregate_value_p (tree, tree);
+extern int aggregate_value_p (const_tree, const_tree);
 extern void push_function_context (void);
 extern void pop_function_context (void);
 extern void push_function_context_to (tree);
@@ -4921,8 +4921,8 @@ extern int call_expr_flags (const_tree);

 extern int setjmp_call_p (const_tree);
 extern bool alloca_call_p (const_tree);
-extern bool must_pass_in_stack_var_size (enum machine_mode, tree);
-extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, tree);
+extern bool must_pass_in_stack_var_size (enum machine_mode, const_tree);
+extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree);

 /* In attribs.c.  */

diff -rup orig/egcc-SVN20070820/gcc/vmsdbgout.c egcc-SVN20070820/gcc/vmsdbgout.c
--- orig/egcc-SVN20070820/gcc/vmsdbgout.c	2007-08-18 20:02:28.000000000 -0400
+++ egcc-SVN20070820/gcc/vmsdbgout.c	2007-08-22 11:12:26.318922752 -0400
@@ -149,13 +149,13 @@ static char *full_name (const char *);
 static unsigned int lookup_filename (const char *);
 static void addr_const_to_string (char *, rtx);
 static int write_debug_header (DST_HEADER *, const char *, int);
-static int write_debug_addr (char *, const char *, int);
+static int write_debug_addr (const char *, const char *, int);
 static int write_debug_data1 (unsigned int, const char *, int);
 static int write_debug_data2 (unsigned int, const char *, int);
 static int write_debug_data4 (unsigned long, const char *, int);
 static int write_debug_data8 (unsigned long long, const char *, int);
-static int write_debug_delta4 (char *, char *, const char *, int);
-static int write_debug_string (char *, const char *, int);
+static int write_debug_delta4 (const char *, const char *, const char *, int);
+static int write_debug_string (const char *, const char *, int);
 static int write_modbeg (int);
 static int write_modend (int);
 static int write_rtnbeg (int, int);
@@ -381,7 +381,7 @@ static char text_end_label[MAX_ARTIFICIA
   do						\
     {						\
       register int slen = strlen(P);		\
-      register char *p = (P);			\
+      register const char *p = (P);		\
       register int i;				\
       fprintf (FILE, "\t.ascii \"");		\
       for (i = 0; i < slen; i++)		\
@@ -579,7 +579,7 @@ write_debug_header (DST_HEADER *header,
    nonzero.  */

 static int
-write_debug_addr (char *symbol, const char *comment, int dosizeonly)
+write_debug_addr (const char *symbol, const char *comment, int dosizeonly)
 {
   if (!dosizeonly)
     {
@@ -668,8 +668,8 @@ write_debug_data8 (unsigned long long da
    DOSIZEONLY is nonzero.  */

 static int
-write_debug_delta4 (char *label1, char *label2, const char *comment,
-		    int dosizeonly)
+write_debug_delta4 (const char *label1, const char *label2,
+		    const char *comment, int dosizeonly)
 {
   if (!dosizeonly)
     {
@@ -687,7 +687,7 @@ write_debug_delta4 (char *label1, char *
    nonzero.  */

 static int
-write_debug_string (char *string, const char *comment, int dosizeonly)
+write_debug_string (const char *string, const char *comment, int dosizeonly)
 {
   if (!dosizeonly)
     {
@@ -788,7 +788,7 @@ write_modend (int dosizeonly)
 static int
 write_rtnbeg (int rtnnum, int dosizeonly)
 {
-  char *rtnname;
+  const char *rtnname;
   int rtnnamelen;
   char *rtnentryname;
   int totsize = 0;
@@ -797,7 +797,7 @@ write_rtnbeg (int rtnnum, int dosizeonly
   DST_PROLOG prolog;
   vms_func_ref fde = &func_table[rtnnum];

-  rtnname = (char *)fde->vms_func_name;
+  rtnname = fde->vms_func_name;
   rtnnamelen = strlen (rtnname);
   rtnentryname = concat (rtnname, "..en", NULL);

@@ -825,7 +825,7 @@ write_rtnbeg (int rtnnum, int dosizeonly
 				   dosizeonly);
       totsize += write_debug_data1 (strlen (go), "length of main_name",
 				    dosizeonly);
-      totsize += write_debug_string ((char *) go, "main name", dosizeonly);
+      totsize += write_debug_string (go, "main name", dosizeonly);
     }

   /* The header length never includes the length byte.  */
@@ -1441,7 +1441,7 @@ lookup_filename (const char *file_name)
   static unsigned int last_file_lookup_index = 0;
   register char *fn;
   register unsigned i;
-  char *fnam;
+  const char *fnam;
   long long cdt;
   long ebk;
   short ffb;
@@ -1480,7 +1480,7 @@ lookup_filename (const char *file_name)
       ebk = 0;
       ffb = 0;
       rfo = 0;
-      fnam = (char *) "";
+      fnam = "";
       flen = 0;
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-23 16:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-23 16:55 [PATCH INSTALLED]: const typedefs part 16/N Kaveh R. GHAZI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).