This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Move FIELD_DECL, PARM_DECL, VAR_DECL to their ownstructures


This is an updated version of the previous patch, with VAR_DECL split
into it's own structure, as well as documentation (though the
documentation is currently ahead of where we are).

It produces significant memory benefits on every testcase i've thrown at
it.

For a random C++ testcase, a preprocessed version of 14340.C (from the
testsuite), we have at -O2 (as reported by the time/mem reporting):


Before:
28518 kB

After:
27471 kB

A savings of 3.6% of memory.

On a random C testcase, a preprocessed kernel file, we have:

Before:
86793 kB

After:
82805 kB

A savings of 4.5% of memory

Similar savings can be seen in basically any file you throw at it.

Performance benefits range from 2-5% as well, though some C++ is
actually slightly slower right now because I have to update the
structure to have a bit for whether DECL_SHADOWED_VAR is NULL.  We
currently end up doing a lot of hash *lookups* because it's in the "hot
path" but it's almost always NULL.
I'd like to do that in a followup patch, if possible.

New sizes of structures on my 32 bit machine (All structures were
previously 108 bytes):
(gdb) p sizeof (struct tree_decl_minimal)
$2 = 36
(gdb) p sizeof (struct tree_decl_common)
$3 = 72
(gdb) p sizeof (struct tree_decl_with_rtl)
$4 = 76
(gdb) p sizeof (struct tree_decl_with_vis)
$5 = 88
(gdb) p sizeof (struct tree_parm_decl)
$6 = 80
(gdb) p sizeof (struct tree_var_decl)
$7 = 88
(gdb) p sizeof (struct tree_field_decl)
$8 = 92
(gdb)   

15%-26% savings, IOW.

(We could save more if DECL_SECTION_NAME was moved to cgraph global decl
nodes, and maybe something done with DECL_ASSEMBLER_NAME).

Bootstrapped and regtested on i686-pc-linux-gnu and powerpc-darwin.

Okay for mainline?



2005-06-06  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.in (TREE_H): Add treestruct.def.
	(c-decl.o): Add pointer-set.h
	* c-decl.c (diagnose_mismatched_decls): Don't attempt to look at
	visibility on regular DECL's.
	(merge_decls): Fix the copying of decl nodes of various types for
	the new structures.  Don't update RTL, section name, weak status,
	etc, on DECL's without RTL.	
	(grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone.
	Don't check volatile on non-variable types.
	(store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK
	to check whether we have seen arguments.
	* c-objc-common.c (c_tree_printer): Reverse order of tests so that
	flag is checked before field (flag is common, field is not).	
	* dwarf2out.c (decl_ultimate_origin):  Only DECL's with
	TS_DECL_COMMON could have an origin.
	(add_location_or_const_value_attribute): Don't check section name
	on non-var/function decls.
	(dwarf2out_var_location): Reverse order of tests.
	* emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace
	with DECL_WRTL_CHECK.
	* expmed.c (make_tree): rtl is now in decl_with_rtl.
	* fold-const.c (fold_binary): Don't check weakness on
	non-var/function decls.
	(tree_expr_nonzero_p): Ditto.
	(fold_checksum_tree): Use tree_decl_extra as sizeof
	buffer.
	* ggc-page.c (extra_order_size_table): Add sizes for
	tree_decl_non_common, tree_parm_decl,  tree_var_decl, and
	tree_field_decl.
	* gimplify.c (gimplify_bind_expr): Only set
	DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL.
	* integrate.c (copy_decl_for_inlining): Don't set RTL on decl's
	without RTL.
	* langhooks-def.h (LANG_HOOK_INIT_TS): New.
	* langhooks.h (init_ts). New langhook.
	* passes.c (rest_of_decl_compilation): Reverse order of tests.
	* print-tree.c (print_node): Update to only print fields that
	exist in the structures the passed decl has.
	* toplev.c (wrapup_global_declarations): Don't reset
	DECL_DEFER_OUTPUT on DECL's that don't contain it.
	* tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed.
	* tree-inline.c (remap_decl): Ditto.
	* tree-outof-ssa.c (create_temp): Reverse order of tests.
	* tree-pretty-print.c (print_declaration): Don't print
	DECL_REGISTER on things that don't contain it.
	* tree-vrp.c (expr_computes_nonzero): Don't check weakness on
	non-var/function decls.
	* tree.c (tree_contains_struct): New structure.
	(tree_map): Move to tree.h.
	(tree_map_eq): Externalize.
	(tree_map_hash): Ditto.
	(tree_map_marked_p): Ditto.
	(init_ttree): Set up tree_contains_struct and call langhook.
	(decl_assembler_name): Use DECL_NON_COMMON_CHECK..
	(tree_code_size): Update for new structures.
	(tree_node_structure): Update for new structures.
	(make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls
	without the field.
	(build_decl_stat): Ditto for visibility.
	(ts_enum_names): New.
	(tree_contains_struct_check_failed): New function.
	* treestruct.def: New file.
	* tree.h (CODE_CONTAINS_STRUCT): New macro.
	(CONTAINS_STRUCT_CHECK): Ditto.
	(tree_contains_struct_check_failed): New prototype.
	(DECL_CHECK): Removed.
	(DECL_MINIMAL_CHECK): New.
	(DECL_COMMON_CHECK): Ditto.
	(DECL_WRTL_CHECK): Ditto.
	(DECL_NON_COMMON_CHECK): Ditto.
	(DECL_BY_REFERENCE): Use DECL_COMMON_CHECK.
	(DECL_UNSIGNED): Ditto.
	(struct tree_decl_minimal): New structure.
	(DECL_NAME): Check/use minimal.
	(DECL_CONTEXT): Ditto.
	(DECL_FIELD_CONTEXT): Ditto.
	(DECL_SOURCE_LOCATION): Ditto.
	(DECL_SOURCE_LINE): Ditto.
	(DECL_SOURCE_FILE): Ditto.
	(struct tree_decl_common): New structure.
	(DECL_ABSTRACT_ORIGIN): Check/use common.
	(DECL_ORIGIN): Ditto.
	(DECL_FROM_INLINE): Ditto.
	(DECL_ATTRIBUTES): Ditto.
	(DECL_INITIAL): Ditto.
	(DECL_SIZE): Ditto.
	(DECL_SIZE_UNIT): Ditto.
	(DECL_ALIGN): Ditto.
	(DECL_ALIGN_UNIT): Ditto.
	(DECL_USER_ALIGN): Ditto.
	(DECL_MODE): Ditto.
	(DECL_DEBUG_EXPR_IS_FROM): Ditto
	(DECL_FUNCTION_CODE): Ditto.
	(DECL_IGNORED_P): Ditto.
	(DECL_ABSTRACT): Ditto.
	(DECL_LANG_SPECIFIC): Ditto.
	(DECL_EXTERNAL): Ditto.
	(TYPE_DECL_SUPPRESS_DEBUG): Ditto.
	(DECL_NONLOCAL): Ditto.
	(DECL_VIRTUAL_P): Ditto.
	(DECL_ARTIFICIAL): Ditto.
	(DECL_LANG_FLAG_0): Ditto.
	(DECL_LANG_FLAG_1): Ditto.
	(DECL_LANG_FLAG_2): Ditto.
	(DECL_LANG_FLAG_3): Ditto.
	(DECL_LANG_FLAG_4): Ditto.
	(DECL_LANG_FLAG_5): Ditto.
	(DECL_LANG_FLAG_6): Ditto.
	(DECL_LANG_FLAG_7): Ditto.
	(DECL_POINTER_ALIAS_SET): Ditto.
	(LABEL_DECL_UID): Ditto.
	(DECL_PRESERVE_P): Ditto.
	(struct tree_decl_with_rtl): New structure.
	(DECL_VALUE_EXPR): Check/use tree_decl_with_rtl.
	(DECL_RTL): Ditto.
	(SET_DECL_RTL): Ditto.
	(HAS_RTL_P): New macro.
	(DECL_RTL_SET_P): Use it.
	(COPY_DECL_RTL): Check/use tree_decl_with_rtl.
	(DECL_RTL_IF_SET): Ditto.
	(DECL_REGISTER): Check but not use, DECL_WRTL.
	(struct tree_decl_non_common): New structure.
	(DECL_ARGUMENTS): Check/use tree_decl_non_common.
	(DECL_RESULT_FLD): Ditto
	(DECL_RESULT): Ditto
	(DECL_ORIGINAL_TYPE): Ditto
	(DECL_HARD_REGISTER): Ditto
	(DECL_VISIBILITY): Ditto
	(DECL_VISIBILITY_SPECIFIED): Ditto
	(DECL_UNINLINABLE): Ditto
	(DECL_THREAD_LOCAL): Ditto
	(DECL_SAVED_TREE): Ditto
	(DECL_IS_MALLOC): Ditto
	(DECL_IS_PURE): Ditto
	(DECL_IS_NOVOPS): Ditto
	(DECL_DEFER_OUTPUT): Ditto
	(DECL_NON_ADDR_CONST_P): Ditto
	(DECL_WEAK): Ditto
	(DECL_ONE_ONLY): Ditto
	(DECL_COMDAT): Ditto
	(DECL_COMMON): Ditto
	(DECL_IN_TEXT_SECTION): Ditto
	(DECL_ERROR_ISSUED): Ditto
	(DECL_INLINE): Ditto
	(DECL_STRUCT_FUNCTION): Ditto
	(DECL_VINDEX): Ditto
	(DECL_DEBUG_EXPR): Ditto
	(DECL_SECTION_NAME): Ditto
	(struct tree_field_decl): New structure.	
	(DECL_FIELD_OFFSET): Check/use field_decl structure.
	(DECL_FIELD_BIT_OFFSET): Ditto
	(DECL_BIT_FIELD_TYPE): Ditto
	(DECL_QUALIFIER): Ditto
	(DECL_FCONTEXT): Ditto
	(struct tree_parm_decl): New structure.
	(DECL_ARG_TYPE): Check/use parm_decl structure.
	(DECL_INCOMING_RTL): Ditto.
	(union tree_node): Add decl_extra and field_decl and parm_decl.
	* var-tracking.c (track_expr_p): Reverse order of tests.

In ada/
	* utils.c (create_param_decl): DECL_ARG_TYPE_AS_WRITTEN is
	removed.
	
In cp/
	* Make-lang.in: Add gt-cp-lang.h.
	(cp-lang.o): Ditto.	
	* class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
	the field.
	* config-lang.in: Add cp-lang.c to gtfiles.
	* cp-lang.c: Include hashtab.h.
	(cp_init_ts): New function.
	(LANG_HOOK_INIT_TS): Use macro.
	(decl_shadowed_for_var_lookup): New function.
	(decl_shadowed_for_var_insert): Ditto.
	* cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
	(NON_THUNK_FUNCTION_CHECK): Ditto.
	(DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
	(DECL_INIT_PRIORITY): Ditto.
	(DECL_SHADOWED_FOR_VAR): Use hashtable.
	(SET_DECL_SHADOWED_FOR_VAR): Ditto.
	* decl.c (duplicate_decls): Update for new/updated structures.
	(poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
	* pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
	SET_DECL_RTL.

In doc/ 
	* c-tree.texi: Add documentation on DECL node internal structure.
In fortran/
	* trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
	is removed.
	
In java/
	* java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
	(LABEL_PENDING_CHAIN): Ditto.
	(LABEL_PC): Ditto.
	(DECL_BIT_INDEX): Ditto.	

In objc/
	* objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
	removed.
	* objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
	(KEYWORD_KEY_NAME): Use decl_minimal.
	(METHOD_SEL_NAME): Ditto..
	(METHOD_SEL_ARGS): Use decl_non_common.
	(METHOD_ADD_ARGS): Ditto.
	(METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
	(METHOD_DEFINITION): Ditto.
	(METHOD_ENCODING): Ditto.
	* objc-lang.c: (objc_init_ts): New function.
Index: doc/c-tree.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/c-tree.texi,v
retrieving revision 1.72
diff -u -p -r1.72 c-tree.texi
--- doc/c-tree.texi	5 Mar 2005 19:56:27 -0000	1.72
+++ doc/c-tree.texi	6 Jun 2005 14:17:22 -0000
@@ -847,6 +847,15 @@ internal representation, except for decl
 (represented by @code{FUNCTION_DECL} nodes), which are described in
 @ref{Functions}.
 
+@menu
+* Working with declarations::  Macros and functions that work on
+declarations.
+* Internal structure:: How declaration nodes are represented. 
+@end menu
+
+@node Working with declarations
+@subsection Working with declarations
+
 Some macros can be used with any kind of declaration.  These include:
 @ftable @code
 @item DECL_NAME
@@ -991,6 +1000,179 @@ Back ends can safely ignore these nodes.
 
 @end table
 
+@node Internal structure
+@subsection Internal structure
+
+@code{DECL} nodes are represented internally as a hierarchy of
+structures.
+
+@menu
+* Current structure hierarchy::  The current DECL node structure
+hierarchy.
+* Adding new DECL node types:: How to add a new DECL node to a
+frontend.
+@end menu
+
+@node Current structure hierarchy
+@subsubsection Current structure hierarchy
+
+@table @code
+
+@item struct tree_decl_minimal
+This is the minimal structure to inherit from in order for common
+@code{DECL} macros to work.  The fields it contains are a unique ID,
+source location, context, and name.
+
+@item struct tree_decl_common
+This structure inherits from @code{struct tree_decl_minimal}.  It
+contains fields that most @code{DECL} nodes need, such as a field to
+store alignment, machine mode, size, and attributes.
+
+@item struct tree_field_decl
+This structure inherits from @code{struct tree_decl_common}.  It is
+used to represent @code{FIELD_DECL}.
+
+@item struct tree_label_decl
+This structure inherits from @code{struct tree_decl_common}.  It is
+used to represent @code{LABEL_DECL}.
+
+@item struct tree_translation_unit_decl
+This structure inherits from @code{struct tree_decl_common}.  It is
+used to represent @code{TRANSLATION_UNIT_DECL}.
+
+@item struct tree_decl_with_rtl
+This structure inherits from @code{struct tree_decl_common}.  It
+contains a field to store the low-level RTL associated with a
+@code{DECL} node.
+
+@item struct tree_result_decl
+This structure inherits from @code{struct tree_decl_with_rtl}.  It is
+used to represent @code{RESULT_DECL}.
+
+@item struct tree_const_decl
+This structure inherits from @code{struct tree_decl_with_rtl}.  It is
+used to represent @code{CONST_DECL}.
+
+@item struct tree_parm_decl
+This structure inherits from @code{struct tree_decl_with_rtl}.  It is
+used to represent @code{PARM_DECL}.  
+
+@item struct tree_decl_with_vis
+This structure inherits from @code{struct tree_decl_with_rtl}.  It
+contains fields necessary to store visibility information, as well as
+a section name and assembler name.
+
+@item struct tree_var_decl
+This structure inherits from @code{struct tree_decl_with_vis}.  It is
+used to represent @code{VAR_DECL}.  
+
+@item struct tree_function_decl
+This structure inherits from @code{struct tree_decl_with_vis}.  It is
+used to represent @code{FUNCTION_DECL}.  
+
+@end table
+@node Adding new DECL node types
+@subsubsection Adding new DECL node types
+
+Adding a new @code{DECL} tree consists of the following steps
+
+@table @asis
+
+@item Add a new tree code for the @code{DECL} node
+For language specific @code{DECL} nodes, there is a @file{.def} file
+in each frontend directory where the tree code should be added.
+For @code{DECL} nodes that are part of the middle-end, the code should
+be added to @file{tree.def}.
+
+@item Create a new structure type for the @code{DECL} node
+These structures should inherit from one of the existing structures in
+the language hierarchy by using that structure as the first member.
+
+@smallexample
+struct tree_foo_decl
+@{
+   struct tree_decl_with_vis common;
+@}
+@end smallexample
+
+Would create a structure name @code{tree_foo_decl} that inherits from
+@code{struct tree_decl_with_vis}.
+
+For language specific @code{DECL} nodes, this new structure type
+should go in the appropriate @file{.h} file.
+For @code{DECL} nodes that are part of the middle-end, the structure
+type should go in @file{tree.h}.
+
+@item Add a member to the tree structure enumerator for the node
+For garbage collection and dynamic checking purposes, each @code{DECL}
+node structure type is required to have a unique enumerator value
+specified with it.
+For language specific @code{DECL} nodes, this new enumerator value
+should go in the approriate @file{.def} file.
+For @code{DECL} nodes that are part of the middle-end, the enumerator
+values are specified in @file{treestruct.def}.
+
+@item Update @code{union tree_node}
+In order to make your new structure type usable, it must be added to
+@code{union tree_node}.
+For language specific @code{DECL} nodes, a new entry should be added
+to the approriate @file{.h} file of the form
+@smallexample
+  struct tree_foo_decl GTY ((tag ("TS_VAR_DECL"))) foo_decl;
+@end smallexample
+For @code{DECL} nodes that are part of the middle-end, the additional
+member goes directly into @code{union tree_node} in @file{tree.h}.
+
+@item Update dynamic checking info
+In order to be able to check whether accessing a named portion of
+@code{union tree_node} is legal, and whether a certain @code{DECL} node
+contains one of the enumerated @code{DECL} node structures in the
+hierarchy, a simple lookup table is used.
+This lookup table needs to be kept up to date with the tree structure
+hierarchy, or else checking and containment macros will fail
+inapproriately.
+
+For language specific @code{DECL} nodes, their is an @code{init_ts}
+function in an approriate @file{.c} file, which initializes the lookup
+table.
+Code setting up the table for new @code{DECL} nodes should be added
+there.
+For each @code{DECL} tree code and enumerator value representing a
+member of the inheritance  hierarchy, the table should contain 1 if
+that tree code inherits (directly or indirectly) from that member.
+Thus, a @code{FOO_DECL} node derived from @code{struct decl_with_rtl},
+and enumerator value @code{TS_FOO_DECL}, would be set up as follows
+@smallexample
+tree_contains_struct[FOO_DECL][TS_FOO_DECL] = 1;
+tree_contains_struct[FOO_DECL][TS_DECL_WRTL] = 1;
+tree_contains_struct[FOO_DECL][TS_DECL_COMMON] = 1;
+tree_contains_struct[FOO_DECL][TS_DECL_MINIMAL] = 1;
+@end smallexample
+
+For @code{DECL} nodes that are part of the middle-end, the setup code
+goes into @file{tree.c}.
+
+@item Add macros to access any new fields and flags
+
+Each added field or flag should have a macro that is used to access
+it, that performs approriate checking to ensure only the right type of
+@code{DECL} nodes access the field.
+
+These macros generally take the following form
+@smallexample
+#define FOO_DECL_FIELDNAME(NODE) FOO_DECL_CHECK(NODE)->foo_decl.fieldname
+@end smallexample
+However, if the structure is simply a base class for further
+structures, something like the following should be used
+@smallexample
+#define BASE_STRUCT_CHECK(T) CONTAINS_STRUCT_CHECK(T, TS_BASE_STRUCT)
+#define BASE_STRUCT_FIELDNAME(NODE) \
+   (BASE_STRUCT_CHECK(NODE)->base_struct.fieldname
+@end smallexample
+
+@end table
+
+
 @c ---------------------------------------------------------------------
 @c Functions
 @c ---------------------------------------------------------------------
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1496
diff -u -p -r1.1496 Makefile.in
--- Makefile.in	4 Jun 2005 17:07:50 -0000	1.1496
+++ Makefile.in	6 Jun 2005 14:17:17 -0000
@@ -718,7 +718,7 @@ RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
 RTL_H = $(RTL_BASE_H) genrtl.h
 PARAMS_H = params.h params.def
 TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h builtins.def \
-          input.h statistics.h vec.h
+          input.h statistics.h vec.h treestruct.def
 BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \
           hard-reg-set.h cfghooks.h $(OBSTACK_H)
 GCOV_IO_H = gcov-io.h gcov-iov.h auto-host.h
@@ -1406,7 +1406,8 @@ c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM
     $(EXPR_H) debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) \
     opts.h $(C_PRAGMA_H) gt-c-decl.h $(CGRAPH_H) $(HASHTAB_H) libfuncs.h \
     except.h $(LANGHOOKS_DEF_H) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \
-    $(DIAGNOSTIC_H) input.h langhooks.h $(TREE_GIMPLE_H) tree-mudflap.h
+    $(DIAGNOSTIC_H) input.h langhooks.h $(TREE_GIMPLE_H) tree-mudflap.h  \
+    pointer-set.h
 c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \
     $(RTL_H) toplev.h $(TM_P_H) langhooks.h $(GGC_H) $(TREE_FLOW_H) \
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.661
diff -u -p -r1.661 c-decl.c
--- c-decl.c	3 Jun 2005 22:25:13 -0000	1.661
+++ c-decl.c	6 Jun 2005 14:17:18 -0000
@@ -60,6 +60,7 @@ Software Foundation, 59 Temple Place - S
 #include "libfuncs.h"
 #include "except.h"
 #include "langhooks-def.h"
+#include "pointer-set.h"
 
 /* In grokdeclarator, distinguish syntactic contexts of declarators.  */
 enum decl_context
@@ -1491,7 +1492,8 @@ diagnose_mismatched_decls (tree newdecl,
 
   /* warnings */
   /* All decls must agree on a visibility.  */
-  if (DECL_VISIBILITY_SPECIFIED (newdecl) && DECL_VISIBILITY_SPECIFIED (olddecl)
+  if (CODE_CONTAINS_STRUCT (TREE_CODE (newdecl), TS_DECL_WITH_VIS) 
+      && DECL_VISIBILITY_SPECIFIED (newdecl) && DECL_VISIBILITY_SPECIFIED (olddecl)
       && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl))
     {
       warning (0, "%Jredeclaration of %qD with different visibility "
@@ -1657,8 +1659,6 @@ merge_decls (tree newdecl, tree olddecl,
 	  }
     }
 
-  /* Keep the old rtl since we can safely use it.  */
-  COPY_DECL_RTL (olddecl, newdecl);
 
   /* Merge the type qualifiers.  */
   if (TREE_READONLY (newdecl))
@@ -1693,153 +1693,180 @@ merge_decls (tree newdecl, tree olddecl,
    if (DECL_INITIAL (newdecl) == 0)
     DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
 
-  /* Merge the section attribute.
-     We want to issue an error if the sections conflict but that must be
-     done later in decl_attributes since we are called before attributes
-     are assigned.  */
-  if (DECL_SECTION_NAME (newdecl) == NULL_TREE)
-    DECL_SECTION_NAME (newdecl) = DECL_SECTION_NAME (olddecl);
-
-  /* Copy the assembler name.
-     Currently, it can only be defined in the prototype.  */
-  COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl);
+   if (CODE_CONTAINS_STRUCT (TREE_CODE (olddecl), TS_DECL_WITH_VIS))
+     {
+       /* Merge the section attribute.
+	  We want to issue an error if the sections conflict but that must be
+	  done later in decl_attributes since we are called before attributes
+	  are assigned.  */
+       if (DECL_SECTION_NAME (newdecl) == NULL_TREE)
+	 DECL_SECTION_NAME (newdecl) = DECL_SECTION_NAME (olddecl);
+       
+       /* Copy the assembler name.
+	  Currently, it can only be defined in the prototype.  */
+       COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl);
 
-  /* Use visibility of whichever declaration had it specified */
-  if (DECL_VISIBILITY_SPECIFIED (olddecl))
-    {
-      DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
-      DECL_VISIBILITY_SPECIFIED (newdecl) = 1;
-    }
-
-  if (TREE_CODE (newdecl) == FUNCTION_DECL)
-    {
-      DECL_STATIC_CONSTRUCTOR(newdecl) |= DECL_STATIC_CONSTRUCTOR(olddecl);
-      DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl);
-      DECL_NO_LIMIT_STACK (newdecl) |= DECL_NO_LIMIT_STACK (olddecl);
-      DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (newdecl)
-	|= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl);
-      TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
-      TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
-      DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
-      DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl);
-      DECL_IS_NOVOPS (newdecl) |= DECL_IS_NOVOPS (olddecl);
-    }
-
-  /* Merge the storage class information.  */
-  merge_weak (newdecl, olddecl);
+       /* Use visibility of whichever declaration had it specified */
+       if (DECL_VISIBILITY_SPECIFIED (olddecl))
+	 {
+	   DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
+	   DECL_VISIBILITY_SPECIFIED (newdecl) = 1;
+	 }
+       
+       if (TREE_CODE (newdecl) == FUNCTION_DECL)
+	 {
+	   DECL_STATIC_CONSTRUCTOR(newdecl) |= DECL_STATIC_CONSTRUCTOR(olddecl);
+	   DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl);
+	   DECL_NO_LIMIT_STACK (newdecl) |= DECL_NO_LIMIT_STACK (olddecl);
+	   DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (newdecl)
+	     |= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl);
+	   TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
+	   TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
+	   DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
+	   DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl);
+	   DECL_IS_NOVOPS (newdecl) |= DECL_IS_NOVOPS (olddecl);
+	 }
+       
+       /* Merge the storage class information.  */
+       merge_weak (newdecl, olddecl);
 
-  /* For functions, static overrides non-static.  */
-  if (TREE_CODE (newdecl) == FUNCTION_DECL)
-    {
-      TREE_PUBLIC (newdecl) &= TREE_PUBLIC (olddecl);
-      /* This is since we don't automatically
-	 copy the attributes of NEWDECL into OLDDECL.  */
-      TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl);
-      /* If this clears `static', clear it in the identifier too.  */
-      if (!TREE_PUBLIC (olddecl))
-	TREE_PUBLIC (DECL_NAME (olddecl)) = 0;
-    }
-  if (DECL_EXTERNAL (newdecl))
-    {
-      TREE_STATIC (newdecl) = TREE_STATIC (olddecl);
-      DECL_EXTERNAL (newdecl) = DECL_EXTERNAL (olddecl);
-
-      /* An extern decl does not override previous storage class.  */
-      TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl);
-      if (!DECL_EXTERNAL (newdecl))
-	{
-	  DECL_CONTEXT (newdecl) = DECL_CONTEXT (olddecl);
-	  DECL_COMMON (newdecl) = DECL_COMMON (olddecl);
-	}
-    }
-  else
-    {
-      TREE_STATIC (olddecl) = TREE_STATIC (newdecl);
-      TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl);
-    }
+       /* For functions, static overrides non-static.  */
+       if (TREE_CODE (newdecl) == FUNCTION_DECL)
+	 {
+	   TREE_PUBLIC (newdecl) &= TREE_PUBLIC (olddecl);
+	   /* This is since we don't automatically
+	      copy the attributes of NEWDECL into OLDDECL.  */
+	   TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl);
+	   /* If this clears `static', clear it in the identifier too.  */
+	   if (!TREE_PUBLIC (olddecl))
+	     TREE_PUBLIC (DECL_NAME (olddecl)) = 0;
+	 }
+     }
+   
+   if (DECL_EXTERNAL (newdecl))
+     {
+       TREE_STATIC (newdecl) = TREE_STATIC (olddecl);
+       DECL_EXTERNAL (newdecl) = DECL_EXTERNAL (olddecl);
+
+       /* An extern decl does not override previous storage class.  */
+       TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl);
+       if (!DECL_EXTERNAL (newdecl))
+	 {
+	   DECL_CONTEXT (newdecl) = DECL_CONTEXT (olddecl);
+	   DECL_COMMON (newdecl) = DECL_COMMON (olddecl);
+	 }
+     }
+   else
+     {
+       TREE_STATIC (olddecl) = TREE_STATIC (newdecl);
+       TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl);
+     }
+   
+   if (TREE_CODE (newdecl) == FUNCTION_DECL) 
+     {
+       /* If we're redefining a function previously defined as extern
+	  inline, make sure we emit debug info for the inline before we
+	  throw it away, in case it was inlined into a function that hasn't
+	  been written out yet.  */
+       if (new_is_definition && DECL_INITIAL (olddecl))
+	 {
+	   if (TREE_USED (olddecl)
+	       /* In unit-at-a-time mode we never inline re-defined extern
+		  inline functions.  */
+	       && !flag_unit_at_a_time
+	       && cgraph_function_possibly_inlined_p (olddecl))
+	     (*debug_hooks->outlining_inline_function) (olddecl);
+
+	   /* The new defn must not be inline.  */
+	   DECL_INLINE (newdecl) = 0;
+	   DECL_UNINLINABLE (newdecl) = 1;
+	 }
+       else
+	 {
+	   /* If either decl says `inline', this fn is inline,
+	      unless its definition was passed already.  */
+	   if (DECL_DECLARED_INLINE_P (newdecl)
+	       || DECL_DECLARED_INLINE_P (olddecl))
+	     DECL_DECLARED_INLINE_P (newdecl) = 1;
 
-  if (TREE_CODE (newdecl) == FUNCTION_DECL)
-    {
-      /* If we're redefining a function previously defined as extern
-	 inline, make sure we emit debug info for the inline before we
-	 throw it away, in case it was inlined into a function that hasn't
-	 been written out yet.  */
-      if (new_is_definition && DECL_INITIAL (olddecl))
-	{
-	  if (TREE_USED (olddecl)
-	      /* In unit-at-a-time mode we never inline re-defined extern
-	         inline functions.  */
-	      && !flag_unit_at_a_time
-	      && cgraph_function_possibly_inlined_p (olddecl))
-	    (*debug_hooks->outlining_inline_function) (olddecl);
-
-	  /* The new defn must not be inline.  */
-	  DECL_INLINE (newdecl) = 0;
-	  DECL_UNINLINABLE (newdecl) = 1;
-	}
-      else
-	{
-	  /* If either decl says `inline', this fn is inline,
-	     unless its definition was passed already.  */
-	  if (DECL_DECLARED_INLINE_P (newdecl)
-	      || DECL_DECLARED_INLINE_P (olddecl))
-	    DECL_DECLARED_INLINE_P (newdecl) = 1;
-
-	  DECL_UNINLINABLE (newdecl) = DECL_UNINLINABLE (olddecl)
-	    = (DECL_UNINLINABLE (newdecl) || DECL_UNINLINABLE (olddecl));
-	}
-
-      if (DECL_BUILT_IN (olddecl))
-	{
-	  /* If redeclaring a builtin function, it stays built in.
-	     But it gets tagged as having been declared.  */
-	  DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
-	  DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
-	  C_DECL_DECLARED_BUILTIN (newdecl) = 1;
-	  if (new_is_prototype)
-	    C_DECL_BUILTIN_PROTOTYPE (newdecl) = 0;
-	  else
-	    C_DECL_BUILTIN_PROTOTYPE (newdecl)
-	      = C_DECL_BUILTIN_PROTOTYPE (olddecl);
-	}
+	   DECL_UNINLINABLE (newdecl) = DECL_UNINLINABLE (olddecl)
+	     = (DECL_UNINLINABLE (newdecl) || DECL_UNINLINABLE (olddecl));
+	 }
 
-      /* Also preserve various other info from the definition.  */
-      if (!new_is_definition)
-	{
-	  DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
-	  DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
-	  DECL_STRUCT_FUNCTION (newdecl) = DECL_STRUCT_FUNCTION (olddecl);
-	  DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
-	  DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
-
-	  /* Set DECL_INLINE on the declaration if we've got a body
-	     from which to instantiate.  */
-	  if (DECL_INLINE (olddecl) && !DECL_UNINLINABLE (newdecl))
-	    {
-	      DECL_INLINE (newdecl) = 1;
-	      DECL_ABSTRACT_ORIGIN (newdecl)
-		= DECL_ABSTRACT_ORIGIN (olddecl);
-	    }
-	}
-      else
-	{
-	  /* If a previous declaration said inline, mark the
-	     definition as inlinable.  */
-	  if (DECL_DECLARED_INLINE_P (newdecl)
-	      && !DECL_UNINLINABLE (newdecl))
-	    DECL_INLINE (newdecl) = 1;
-	}
-    }
+       if (DECL_BUILT_IN (olddecl))
+	 {
+	   /* If redeclaring a builtin function, it stays built in.
+	      But it gets tagged as having been declared.  */
+	   DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
+	   DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
+	   C_DECL_DECLARED_BUILTIN (newdecl) = 1;
+	   if (new_is_prototype)
+	     C_DECL_BUILTIN_PROTOTYPE (newdecl) = 0;
+	   else
+	     C_DECL_BUILTIN_PROTOTYPE (newdecl)
+	       = C_DECL_BUILTIN_PROTOTYPE (olddecl);
+	 }
 
-  /* Copy most of the decl-specific fields of NEWDECL into OLDDECL.
+       /* Also preserve various other info from the definition.  */
+       if (!new_is_definition)
+	 {
+	   DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
+	   DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
+	   DECL_STRUCT_FUNCTION (newdecl) = DECL_STRUCT_FUNCTION (olddecl);
+	   DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
+	   DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
+
+	   /* Set DECL_INLINE on the declaration if we've got a body
+	      from which to instantiate.  */
+	   if (DECL_INLINE (olddecl) && !DECL_UNINLINABLE (newdecl))
+	     {
+	       DECL_INLINE (newdecl) = 1;
+	       DECL_ABSTRACT_ORIGIN (newdecl)
+		 = DECL_ABSTRACT_ORIGIN (olddecl);
+	     }
+	 }
+       else
+	 {
+	   /* If a previous declaration said inline, mark the
+	      definition as inlinable.  */
+	   if (DECL_DECLARED_INLINE_P (newdecl)
+	       && !DECL_UNINLINABLE (newdecl))
+	     DECL_INLINE (newdecl) = 1;
+	 }
+     }
+   
+   /* Copy most of the decl-specific fields of NEWDECL into OLDDECL.
      But preserve OLDDECL's DECL_UID and DECL_CONTEXT.  */
   {
     unsigned olddecl_uid = DECL_UID (olddecl);
     tree olddecl_context = DECL_CONTEXT (olddecl);
-
+    
     memcpy ((char *) olddecl + sizeof (struct tree_common),
 	    (char *) newdecl + sizeof (struct tree_common),
-	    sizeof (struct tree_decl) - sizeof (struct tree_common));
+	    sizeof (struct tree_decl_common) - sizeof (struct tree_common));
+    switch (TREE_CODE (olddecl))
+      {
+      case PARM_DECL:
+	memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+		(char *) newdecl + sizeof (struct tree_decl_common),
+		sizeof (struct tree_parm_decl) - sizeof (struct tree_decl_common));
+	break;
+      case VAR_DECL:
+	memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+		(char *) newdecl + sizeof (struct tree_decl_common),
+		sizeof (struct tree_var_decl) - sizeof (struct tree_decl_common));
+	break;
+      case FIELD_DECL:
+	memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+		(char *) newdecl + sizeof (struct tree_decl_common),
+		sizeof (struct tree_field_decl) - sizeof (struct tree_decl_common));
+	break;
+      default:
+	
+	memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+		(char *) newdecl + sizeof (struct tree_decl_common),
+		sizeof (struct tree_decl_non_common) - sizeof (struct tree_decl_common));
+      }
     DECL_UID (olddecl) = olddecl_uid;
     DECL_CONTEXT (olddecl) = olddecl_context;
   }
@@ -4493,7 +4520,6 @@ grokdeclarator (const struct c_declarato
 	  promoted_type = c_type_promotes_to (type);
 
 	DECL_ARG_TYPE (decl) = promoted_type;
-	DECL_ARG_TYPE_AS_WRITTEN (decl) = type_as_written;
 	if (declspecs->inline_p)
 	  pedwarn ("%Jparameter %qD declared %<inline%>", decl, decl);
       }
@@ -4698,8 +4724,11 @@ grokdeclarator (const struct c_declarato
 
     /* If a type has volatile components, it should be stored in memory.
        Otherwise, the fact that those components are volatile
-       will be ignored, and would even crash the compiler.  */
-    if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (decl)))
+       will be ignored, and would even crash the compiler.
+       Of course, this only makes sense on  VAR,PARM, and RESULT decl's.   */
+    if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (decl))
+	&& (TREE_CODE (decl) == VAR_DECL ||  TREE_CODE (decl) == PARM_DECL
+	  || TREE_CODE (decl) == RESULT_DECL))
       {
 	/* It is not an error for a structure with volatile fields to
 	   be declared register, but reset DECL_REGISTER since it
@@ -6102,13 +6131,7 @@ store_parm_decls_oldstyle (tree fndecl, 
   struct c_binding *b;
   tree parm, decl, last;
   tree parmids = arg_info->parms;
-
-  /* We use DECL_WEAK as a flag to show which parameters have been
-     seen already, since it is not used on PARM_DECL.  */
-#ifdef ENABLE_CHECKING
-  for (b = current_scope->bindings; b; b = b->prev)
-    gcc_assert (TREE_CODE (b->decl) != PARM_DECL || !DECL_WEAK (b->decl));
-#endif
+  struct pointer_set_t *seen_args = pointer_set_create ();
 
   if (!in_system_header)
     warning (OPT_Wold_style_definition, "%Jold-style function definition",
@@ -6134,7 +6157,7 @@ store_parm_decls_oldstyle (tree fndecl, 
 	    error ("%J%qD declared as a non-parameter", decl, decl);
 	  /* If the declaration is already marked, we have a duplicate
 	     name.  Complain and ignore the duplicate.  */
-	  else if (DECL_WEAK (decl))
+	  else if (pointer_set_contains (seen_args, decl))
 	    {
 	      error ("%Jmultiple parameters named %qD", decl, decl);
 	      TREE_PURPOSE (parm) = 0;
@@ -6165,7 +6188,7 @@ store_parm_decls_oldstyle (tree fndecl, 
 	}
 
       TREE_PURPOSE (parm) = decl;
-      DECL_WEAK (decl) = 1;
+      pointer_set_insert (seen_args, decl);
     }
 
   /* Now examine the parms chain for incomplete declarations
@@ -6184,7 +6207,7 @@ store_parm_decls_oldstyle (tree fndecl, 
 	  TREE_TYPE (parm) = error_mark_node;
 	}
 
-      if (!DECL_WEAK (parm))
+      if (!pointer_set_contains (seen_args, parm))
 	{
 	  error ("%Jdeclaration for parameter %qD but no such parameter",
 		 parm, parm);
@@ -6208,18 +6231,18 @@ store_parm_decls_oldstyle (tree fndecl, 
     {
       last = TREE_PURPOSE (parm);
       DECL_ARGUMENTS (fndecl) = last;
-      DECL_WEAK (last) = 0;
 
       for (parm = TREE_CHAIN (parm); parm; parm = TREE_CHAIN (parm))
 	if (TREE_PURPOSE (parm))
 	  {
 	    TREE_CHAIN (last) = TREE_PURPOSE (parm);
 	    last = TREE_PURPOSE (parm);
-	    DECL_WEAK (last) = 0;
 	  }
       TREE_CHAIN (last) = 0;
     }
 
+  pointer_set_destroy (seen_args);
+
   /* If there was a previous prototype,
      set the DECL_ARG_TYPE of each argument according to
      the type previously specified, and report any mismatches.  */
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.597
diff -u -p -r1.597 dwarf2out.c
--- dwarf2out.c	4 Jun 2005 17:22:16 -0000	1.597
+++ dwarf2out.c	6 Jun 2005 14:17:19 -0000
@@ -4628,6 +4628,10 @@ dwarf_form_name (unsigned int form)
 static tree
 decl_ultimate_origin (tree decl)
 {
+
+  if (!CODE_CONTAINS_STRUCT (TREE_CODE (decl), TS_DECL_COMMON))
+    return NULL_TREE;
+
   /* output_inline_function sets DECL_ABSTRACT_ORIGIN for all the
      nodes in the function to point to themselves; ignore that if
      we're trying to output the abstract instance of this function.  */
@@ -10128,7 +10132,8 @@ add_location_or_const_value_attribute (d
 	 XXX: If you split a variable across multiple sections, this
 	 won't notice.  */
 
-      if (DECL_SECTION_NAME (decl))
+      if ((TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL)
+	  && DECL_SECTION_NAME (decl))
 	{
 	  tree sectree = DECL_SECTION_NAME (decl);
 	  secname = TREE_STRING_POINTER (sectree);
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.440
diff -u -p -r1.440 emit-rtl.c
--- emit-rtl.c	28 Apr 2005 05:03:02 -0000	1.440
+++ emit-rtl.c	6 Jun 2005 14:17:19 -0000
@@ -953,7 +953,7 @@ set_reg_attrs_for_parm (rtx parm_rtx, rt
 void
 set_decl_rtl (tree t, rtx x)
 {
-  DECL_CHECK (t)->decl.rtl = x;
+  DECL_WRTL_CHECK (t)->decl_with_rtl.rtl = x;
 
   if (!x)
     return;
Index: expmed.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expmed.c,v
retrieving revision 1.229
diff -u -p -r1.229 expmed.c
--- expmed.c	1 Jun 2005 00:20:08 -0000	1.229
+++ expmed.c	6 Jun 2005 14:17:19 -0000
@@ -4951,7 +4951,7 @@ make_tree (tree type, rtx x)
 
       /* Note that we do *not* use SET_DECL_RTL here, because we do not
 	 want set_decl_rtl to go adjusting REG_ATTRS for this temporary.  */
-      t->decl.rtl = x;
+      t->decl_with_rtl.rtl = x;
 
       return t;
     }
Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.591
diff -u -p -r1.591 fold-const.c
--- fold-const.c	3 Jun 2005 15:15:34 -0000	1.591
+++ fold-const.c	6 Jun 2005 14:17:20 -0000
@@ -9000,7 +9000,8 @@ fold_binary (enum tree_code code, tree t
 	 object against zero, then we know the result.  */
       if ((code == EQ_EXPR || code == NE_EXPR)
 	  && TREE_CODE (arg0) == ADDR_EXPR
-	  && DECL_P (TREE_OPERAND (arg0, 0))
+	  && (TREE_CODE (TREE_OPERAND (arg0, 0)) == VAR_DECL
+	      || TREE_CODE (TREE_OPERAND (arg0, 0)) == FUNCTION_DECL)
 	  && ! DECL_WEAK (TREE_OPERAND (arg0, 0))
 	  && integer_zerop (arg1))
 	return constant_boolean_node (code != EQ_EXPR, type);
@@ -9010,13 +9011,15 @@ fold_binary (enum tree_code code, tree t
 	 have access to attributes for externs), then we know the result.  */
       if ((code == EQ_EXPR || code == NE_EXPR)
 	  && TREE_CODE (arg0) == ADDR_EXPR
-	  && DECL_P (TREE_OPERAND (arg0, 0))
+	  && (TREE_CODE (TREE_OPERAND (arg0, 0)) == VAR_DECL
+	      || TREE_CODE (TREE_OPERAND (arg0, 0)) == FUNCTION_DECL)
 	  && ! DECL_WEAK (TREE_OPERAND (arg0, 0))
 	  && ! lookup_attribute ("alias",
 				 DECL_ATTRIBUTES (TREE_OPERAND (arg0, 0)))
 	  && ! DECL_EXTERNAL (TREE_OPERAND (arg0, 0))
 	  && TREE_CODE (arg1) == ADDR_EXPR
-	  && DECL_P (TREE_OPERAND (arg1, 0))
+	  && (TREE_CODE (TREE_OPERAND (arg1, 0)) == VAR_DECL
+	      || TREE_CODE (TREE_OPERAND (arg1, 0)) == FUNCTION_DECL)
 	  && ! DECL_WEAK (TREE_OPERAND (arg1, 0))
 	  && ! lookup_attribute ("alias",
 				 DECL_ATTRIBUTES (TREE_OPERAND (arg1, 0)))
@@ -10446,14 +10449,14 @@ fold_checksum_tree (tree expr, struct md
 {
   void **slot;
   enum tree_code code;
-  char buf[sizeof (struct tree_decl)];
+  char buf[sizeof (struct tree_decl_non_common)];
   int i, len;
   
 recursive_label:
 
   gcc_assert ((sizeof (struct tree_exp) + 5 * sizeof (tree)
-	       <= sizeof (struct tree_decl))
-	      && sizeof (struct tree_type) <= sizeof (struct tree_decl));
+	       <= sizeof (struct tree_decl_non_common))
+	      && sizeof (struct tree_type) <= sizeof (struct tree_decl_non_common));
   if (expr == NULL)
     return;
   slot = htab_find_slot (ht, expr, INSERT);
@@ -11099,7 +11102,7 @@ tree_expr_nonzero_p (tree t)
 	  return false;
 
 	/* Weak declarations may link to NULL.  */
-	if (DECL_P (base))
+	if (TREE_CODE (base) == VAR_DECL || TREE_CODE (base) == FUNCTION_DECL)
 	  return !DECL_WEAK (base);
 
 	/* Constants are never weak.  */
Index: ggc-page.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ggc-page.c,v
retrieving revision 1.102
diff -u -p -r1.102 ggc-page.c
--- ggc-page.c	26 May 2005 18:14:43 -0000	1.102
+++ ggc-page.c	6 Jun 2005 14:17:20 -0000
@@ -186,7 +186,10 @@ Software Foundation, 59 Temple Place - S
 
 static const size_t extra_order_size_table[] = {
   sizeof (struct stmt_ann_d),
-  sizeof (struct tree_decl),
+  sizeof (struct tree_decl_non_common),
+  sizeof (struct tree_field_decl),
+  sizeof (struct tree_parm_decl),
+  sizeof (struct tree_var_decl),
   sizeof (struct tree_list),
   TREE_EXP_SIZE (2),
   RTL_SIZE (2),			/* MEM, PLUS, etc.  */
Index: gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gimplify.c,v
retrieving revision 2.134
diff -u -p -r2.134 gimplify.c
--- gimplify.c	4 Jun 2005 17:22:20 -0000	2.134
+++ gimplify.c	6 Jun 2005 14:17:20 -0000
@@ -856,7 +856,8 @@ gimplify_bind_expr (tree *expr_p, tree t
 
   /* Mark variables seen in this bind expr.  */
   for (t = BIND_EXPR_VARS (bind_expr); t ; t = TREE_CHAIN (t))
-    DECL_SEEN_IN_BIND_EXPR_P (t) = 1;
+    if (TREE_CODE (t) == VAR_DECL)
+      DECL_SEEN_IN_BIND_EXPR_P (t) = 1;
 
   gimple_push_bind_expr (bind_expr);
   gimplify_ctxp->save_stack = false;
Index: integrate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.279
diff -u -p -r1.279 integrate.c
--- integrate.c	17 May 2005 16:56:23 -0000	1.279
+++ integrate.c	6 Jun 2005 14:17:20 -0000
@@ -135,7 +135,8 @@ copy_decl_for_inlining (tree decl, tree 
   DECL_ABSTRACT_ORIGIN (copy) = DECL_ORIGIN (decl);
 
   /* The new variable/label has no RTL, yet.  */
-  if (!TREE_STATIC (copy) && !DECL_EXTERNAL (copy))
+  if (CODE_CONTAINS_STRUCT (TREE_CODE (copy), TS_DECL_WRTL) 
+      && !TREE_STATIC (copy) && !DECL_EXTERNAL (copy))
     SET_DECL_RTL (copy, NULL_RTX);
 
   /* These args would always appear unused, if not for this.  */
Index: langhooks-def.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/langhooks-def.h,v
retrieving revision 1.98
diff -u -p -r1.98 langhooks-def.h
--- langhooks-def.h	23 Mar 2005 19:46:43 -0000	1.98
+++ langhooks-def.h	6 Jun 2005 14:17:20 -0000
@@ -124,6 +124,7 @@ extern int lhd_gimplify_expr (tree *, tr
 #define LANG_HOOKS_TYPES_COMPATIBLE_P	lhd_types_compatible_p
 #define LANG_HOOKS_BUILTIN_FUNCTION	builtin_function
 #define LANG_HOOKS_TO_TARGET_CHARSET	lhd_to_target_charset
+#define LANG_HOOKS_INIT_TS		lhd_do_nothing
 
 #define LANG_HOOKS_FUNCTION_INIT	lhd_do_nothing_f
 #define LANG_HOOKS_FUNCTION_FINAL	lhd_do_nothing_f
@@ -299,6 +300,7 @@ extern tree lhd_make_node (enum tree_cod
   LANG_HOOKS_GIMPLIFY_EXPR, \
   LANG_HOOKS_FOLD_OBJ_TYPE_REF, \
   LANG_HOOKS_BUILTIN_FUNCTION, \
+  LANG_HOOKS_INIT_TS,          \
 }
 
 #endif /* GCC_LANG_HOOKS_DEF_H */
Index: langhooks.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/langhooks.h,v
retrieving revision 1.106
diff -u -p -r1.106 langhooks.h
--- langhooks.h	21 Apr 2005 18:05:12 -0000	1.106
+++ langhooks.h	6 Jun 2005 14:17:20 -0000
@@ -412,6 +412,8 @@ struct lang_hooks
 			    enum built_in_class bt_class,
 			    const char *library_name, tree attrs);
 
+  /* Used to set up the tree_contains_structure array for a frontend. */
+  void (*init_ts) (void);
   /* Whenever you add entries here, make sure you adjust langhooks-def.h
      and langhooks.c accordingly.  */
 };
Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.91
diff -u -p -r2.91 passes.c
--- passes.c	25 May 2005 12:33:32 -0000	2.91
+++ passes.c	6 Jun 2005 14:17:20 -0000
@@ -205,7 +205,7 @@ rest_of_decl_compilation (tree decl,
 
   /* Can't defer this, because it needs to happen before any
      later function definitions are processed.  */
-  if (DECL_REGISTER (decl) && DECL_ASSEMBLER_NAME_SET_P (decl))
+  if (DECL_ASSEMBLER_NAME_SET_P (decl) && DECL_REGISTER (decl))
     make_decl_rtl (decl);
 
   /* Forward declarations for nested functions are not "external",
Index: print-tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/print-tree.c,v
retrieving revision 1.100
diff -u -p -r1.100 print-tree.c
--- print-tree.c	31 Mar 2005 00:09:10 -0000	1.100
+++ print-tree.c	6 Jun 2005 14:17:20 -0000
@@ -167,11 +167,13 @@ print_node (FILE *file, const char *pref
   int len;
   int i;
   expanded_location xloc;
+  enum tree_code code;
 
   if (node == 0)
     return;
-
-  class = TREE_CODE_CLASS (TREE_CODE (node));
+  
+  code = TREE_CODE (node);
+  class = TREE_CODE_CLASS (code);
 
   /* Don't get too deep in nesting.  If the user wants to see deeper,
      it is easy to use the address of a lowest-level node
@@ -319,21 +321,23 @@ print_node (FILE *file, const char *pref
       if (DECL_IGNORED_P (node))
 	fputs (" ignored", file);
       if (DECL_ABSTRACT (node))
-	fputs (" abstract", file);
-      if (DECL_IN_SYSTEM_HEADER (node))
-	fputs (" in_system_header", file);
-      if (DECL_COMMON (node))
-	fputs (" common", file);
+	fputs (" abstract", file);      
       if (DECL_EXTERNAL (node))
 	fputs (" external", file);
-      if (DECL_WEAK (node))
-	fputs (" weak", file);
-      if (DECL_REGISTER (node) && TREE_CODE (node) != FIELD_DECL
-	  && TREE_CODE (node) != FUNCTION_DECL
-	  && TREE_CODE (node) != LABEL_DECL)
-	fputs (" regdecl", file);
       if (DECL_NONLOCAL (node))
 	fputs (" nonlocal", file);
+      if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS))
+	{
+	  if (DECL_WEAK (node))
+	    fputs (" weak", file);
+	  if (DECL_IN_SYSTEM_HEADER (node))
+	    fputs (" in_system_header", file);
+	}
+      if (CODE_CONTAINS_STRUCT (code, TS_DECL_WRTL)
+	  && TREE_CODE (node) != LABEL_DECL
+	  && TREE_CODE (node) != FUNCTION_DECL
+	  && DECL_REGISTER (node))
+	fputs (" regdecl", file);
 
       if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node))
 	fputs (" suppress-debug", file);
@@ -359,13 +363,15 @@ print_node (FILE *file, const char *pref
 	fputs (" in-text-section", file);
       if (TREE_CODE (node) == VAR_DECL && DECL_THREAD_LOCAL (node))
 	fputs (" thread-local", file);
+      if (TREE_CODE (node) == VAR_DECL && DECL_COMMON (node))
+	fputs (" common", file);
 
       if (TREE_CODE (node) == PARM_DECL && DECL_TRANSPARENT_UNION (node))
 	fputs (" transparent-union", file);
 
       if (DECL_VIRTUAL_P (node))
 	fputs (" virtual", file);
-      if (DECL_DEFER_OUTPUT (node))
+      if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS)  && DECL_DEFER_OUTPUT (node))
 	fputs (" defer-output", file);
 
       if (DECL_PRESERVE_P (node))
@@ -431,13 +437,20 @@ print_node (FILE *file, const char *pref
 	}
 
       print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4);
+
       print_node_brief (file, "attributes",
 			DECL_ATTRIBUTES (node), indent + 4);
-      print_node_brief (file, "abstract_origin",
-			DECL_ABSTRACT_ORIGIN (node), indent + 4);
-
-      print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4);
-      print_node (file, "result", DECL_RESULT_FLD (node), indent + 4);
+      
+      if (CODE_CONTAINS_STRUCT (code, TS_DECL_WRTL))
+	{
+	  print_node_brief (file, "abstract_origin",
+			    DECL_ABSTRACT_ORIGIN (node), indent + 4);
+	}
+      if (CODE_CONTAINS_STRUCT (code, TS_DECL_NON_COMMON))
+	{
+	  print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4);
+	  print_node (file, "result", DECL_RESULT_FLD (node), indent + 4);
+	}
       print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4);
 
       lang_hooks.print_decl (file, node, indent);
@@ -451,8 +464,6 @@ print_node (FILE *file, const char *pref
       if (TREE_CODE (node) == PARM_DECL)
 	{
 	  print_node (file, "arg-type", DECL_ARG_TYPE (node), indent + 4);
-	  print_node (file, "arg-type-as-written",
-		      DECL_ARG_TYPE_AS_WRITTEN (node), indent + 4);
 
 	  if (DECL_INCOMING_RTL (node) != 0)
 	    {
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.960
diff -u -p -r1.960 toplev.c
--- toplev.c	4 Jun 2005 14:02:35 -0000	1.960
+++ toplev.c	6 Jun 2005 14:17:21 -0000
@@ -696,7 +696,8 @@ wrapup_global_declarations (tree *vec, i
 
       /* We're not deferring this any longer.  Assignment is
 	 conditional to avoid needlessly dirtying PCH pages.  */
-      if (DECL_DEFER_OUTPUT (decl) != 0)
+      if (CODE_CONTAINS_STRUCT (TREE_CODE (decl), TS_DECL_WITH_VIS)
+	  && DECL_DEFER_OUTPUT (decl) != 0)
 	DECL_DEFER_OUTPUT (decl) = 0;
 
       if (TREE_CODE (decl) == VAR_DECL && DECL_SIZE (decl) == 0)
Index: tree-browser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-browser.c,v
retrieving revision 2.6
diff -u -p -r2.6 tree-browser.c
--- tree-browser.c	1 Jun 2005 02:50:54 -0000	2.6
+++ tree-browser.c	6 Jun 2005 14:17:21 -0000
@@ -313,13 +313,6 @@ browse_tree (tree begin)
 	    TB_WF;
 	  break;
 
-	case TB_ARG_TYPE_AS_WRITTEN:
-	  if (head && TREE_CODE (head) == PARM_DECL)
-	    TB_SET_HEAD (DECL_ARG_TYPE_AS_WRITTEN (head));
-	  else
-	    TB_WF;
-	  break;
-
 	case TB_ARG_TYPE:
 	  if (head && TREE_CODE (head) == PARM_DECL)
 	    TB_SET_HEAD (DECL_ARG_TYPE (head));
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.191
diff -u -p -r1.191 tree-inline.c
--- tree-inline.c	1 Jun 2005 18:43:00 -0000	1.191
+++ tree-inline.c	6 Jun 2005 14:17:21 -0000
@@ -208,9 +208,6 @@ remap_decl (tree decl, inline_data *id)
       TREE_TYPE (t) = remap_type (TREE_TYPE (t), id);
       if (TREE_CODE (t) == TYPE_DECL)
         DECL_ORIGINAL_TYPE (t) = remap_type (DECL_ORIGINAL_TYPE (t), id);
-      else if (TREE_CODE (t) == PARM_DECL)
-        DECL_ARG_TYPE_AS_WRITTEN (t)
-	  = remap_type (DECL_ARG_TYPE_AS_WRITTEN (t), id);
 
       /* Remap sizes as necessary.  */
       walk_tree (&DECL_SIZE (t), copy_body_r, id, NULL);
Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-pretty-print.c,v
retrieving revision 2.60
diff -u -p -r2.60 tree-pretty-print.c
--- tree-pretty-print.c	1 Jun 2005 02:50:57 -0000	2.60
+++ tree-pretty-print.c	6 Jun 2005 14:17:21 -0000
@@ -1498,7 +1498,7 @@ print_declaration (pretty_printer *buffe
   if (TREE_CODE (t) == TYPE_DECL)
     pp_string (buffer, "typedef ");
 
-  if (DECL_REGISTER (t))
+  if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_DECL_WRTL) && DECL_REGISTER (t))
     pp_string (buffer, "register ");
 
   if (TREE_PUBLIC (t) && DECL_EXTERNAL (t))
Index: tree-vrp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-vrp.c,v
retrieving revision 2.23
diff -u -p -r2.23 tree-vrp.c
--- tree-vrp.c	3 Jun 2005 21:07:08 -0000	2.23
+++ tree-vrp.c	6 Jun 2005 14:17:21 -0000
@@ -151,7 +151,8 @@ expr_computes_nonzero (tree expr)
      has requested not to remove NULL pointer checks.  */
   if (flag_delete_null_pointer_checks
       && TREE_CODE (expr) == ADDR_EXPR
-      && DECL_P (TREE_OPERAND (expr, 0))
+      && (TREE_CODE (TREE_OPERAND (expr, 0)) == VAR_DECL
+	  || TREE_CODE (TREE_OPERAND (expr, 0)) == FUNCTION_DECL)
       && !DECL_WEAK (TREE_OPERAND (expr, 0)))
     return true;
 
Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.485
diff -u -p -r1.485 tree.c
--- tree.c	4 Jun 2005 17:22:20 -0000	1.485
+++ tree.c	6 Jun 2005 14:17:21 -0000
@@ -133,12 +133,6 @@ static GTY ((if_marked ("ggc_marked_p"),
 
 /* General tree->tree mapping  structure for use in hash tables.  */
 
-struct tree_map GTY(())
-{
-  hashval_t hash;
-  tree from;
-  tree to;
-};
 
 static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map))) 
      htab_t debug_expr_for_decl;
@@ -149,8 +143,6 @@ static GTY ((if_marked ("tree_map_marked
 static void set_type_quals (tree, int);
 static int type_hash_eq (const void *, const void *);
 static hashval_t type_hash_hash (const void *);
-static int tree_map_eq (const void *, const void *);
-static hashval_t tree_map_hash (const void *);
 static hashval_t int_cst_hash_hash (const void *);
 static int int_cst_hash_eq (const void *, const void *);
 static void print_type_hash_statistics (void);
@@ -158,19 +150,22 @@ static void print_debug_expr_statistics 
 static void print_value_expr_statistics (void);
 static tree make_vector_type (tree, int, enum machine_mode);
 static int type_hash_marked_p (const void *);
-static int tree_map_marked_p (const void *);
 static unsigned int type_hash_list (tree, hashval_t);
 static unsigned int attribute_hash_list (tree, hashval_t);
 
 tree global_trees[TI_MAX];
 tree integer_types[itk_none];
 
+unsigned char **tree_contains_struct;
 
 /* Init tree.c.  */
 
 void
 init_ttree (void)
 {
+
+  int i;
+
   /* Initialize the hash table of types.  */
   type_hash_table = htab_create_ggc (TYPE_HASH_INITIAL_SIZE, type_hash_hash,
 				     type_hash_eq, 0);
@@ -186,6 +181,63 @@ init_ttree (void)
   
   int_cst_node = make_node (INTEGER_CST);
 
+  /* Keep these numbers in sync with the size of enum tree_code.
+     Unfortunately, LAST_TREE_CODE won't cut it here, it only gives
+     the number of *common* tree codes.  */
+  tree_contains_struct = xmalloc (sizeof (unsigned char *) * 256);
+  for (i = 0; i < 256; i++)
+    tree_contains_struct[i] = xcalloc (256, sizeof (unsigned char));
+
+  tree_contains_struct[CONST_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[RESULT_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[FUNCTION_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[TYPE_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[TRANSLATION_UNIT_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[LABEL_DECL][TS_DECL_NON_COMMON] = 1;
+  
+  tree_contains_struct[CONST_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[RESULT_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[FUNCTION_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[TYPE_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[TRANSLATION_UNIT_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[LABEL_DECL][TS_DECL_WITH_VIS] = 1;
+
+  tree_contains_struct[CONST_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[VAR_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[PARM_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[RESULT_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[FUNCTION_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[TYPE_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[TRANSLATION_UNIT_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[LABEL_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[FIELD_DECL][TS_DECL_COMMON] = 1;
+
+
+  tree_contains_struct[CONST_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[VAR_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[PARM_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[RESULT_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[FUNCTION_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[LABEL_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[TYPE_DECL][TS_DECL_WRTL] = 1;
+
+  tree_contains_struct[CONST_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[VAR_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[PARM_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[RESULT_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[FUNCTION_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[TYPE_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[TRANSLATION_UNIT_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[LABEL_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[FIELD_DECL][TS_DECL_MINIMAL] = 1;
+
+  tree_contains_struct[VAR_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[FUNCTION_DECL][TS_DECL_WITH_VIS] = 1;
+  
+  tree_contains_struct[VAR_DECL][TS_VAR_DECL] = 1;
+  tree_contains_struct[FIELD_DECL][TS_FIELD_DECL] = 1;
+  tree_contains_struct[PARM_DECL][TS_PARM_DECL] = 1;
+  lang_hooks.init_ts ();
 }
 
 
@@ -197,7 +249,7 @@ decl_assembler_name (tree decl)
 {
   if (!DECL_ASSEMBLER_NAME_SET_P (decl))
     lang_hooks.set_decl_assembler_name (decl);
-  return DECL_CHECK (decl)->decl.assembler_name;
+  return DECL_WITH_VIS_CHECK (decl)->decl_with_vis.assembler_name;
 }
 
 /* Compute the number of bytes occupied by a tree with code CODE.
@@ -209,7 +261,19 @@ tree_code_size (enum tree_code code)
   switch (TREE_CODE_CLASS (code))
     {
     case tcc_declaration:  /* A decl node */
-      return sizeof (struct tree_decl);
+      {
+	switch (code)
+	  {
+	  case FIELD_DECL:
+	    return sizeof (struct tree_field_decl);
+	  case PARM_DECL:
+	    return sizeof (struct tree_parm_decl);
+	  case VAR_DECL:
+	    return sizeof (struct tree_var_decl);
+	  default:
+	    return sizeof (struct tree_decl_non_common);
+	  }
+      }
 
     case tcc_type:  /* a type node */
       return sizeof (struct tree_type);
@@ -395,7 +459,8 @@ make_node_stat (enum tree_code code MEM_
       if (code != FUNCTION_DECL)
 	DECL_ALIGN (t) = 1;
       DECL_USER_ALIGN (t) = 0;
-      DECL_IN_SYSTEM_HEADER (t) = in_system_header;
+      if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS))
+        DECL_IN_SYSTEM_HEADER (t) = in_system_header;
       DECL_SOURCE_LOCATION (t) = input_location;
       DECL_UID (t) = next_decl_uid++;
 
@@ -1814,9 +1879,21 @@ tree_node_structure (tree t)
   enum tree_code code = TREE_CODE (t);
 
   switch (TREE_CODE_CLASS (code))
-    {
+    {      
     case tcc_declaration:
-      return TS_DECL;
+      {
+	switch (code)
+	  {
+	  case FIELD_DECL:
+	    return TS_FIELD_DECL;
+	  case PARM_DECL:
+	    return TS_PARM_DECL;
+	  case VAR_DECL:
+	    return TS_VAR_DECL;
+	  default:
+	    return TS_DECL_NON_COMMON;
+	  }
+      }
     case tcc_type:
       return TS_TYPE;
     case tcc_reference:
@@ -2835,10 +2912,13 @@ build_decl_stat (enum tree_code code, tr
   else if (code == FUNCTION_DECL)
     DECL_MODE (t) = FUNCTION_MODE;
 
-  /* Set default visibility to whatever the user supplied with
-     visibility_specified depending on #pragma GCC visibility.  */
-  DECL_VISIBILITY (t) = default_visibility;
-  DECL_VISIBILITY_SPECIFIED (t) = visibility_options.inpragma;
+  if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS))
+    {
+      /* Set default visibility to whatever the user supplied with
+	 visibility_specified depending on #pragma GCC visibility.  */
+      DECL_VISIBILITY (t) = default_visibility;
+      DECL_VISIBILITY_SPECIFIED (t) = visibility_options.inpragma;
+    }
 
   return t;
 }
@@ -3471,7 +3551,7 @@ build_variant_type_copy (tree type)
 
 /* Return true if the from tree in both tree maps are equal.  */
 
-static int
+int
 tree_map_eq (const void *va, const void *vb)
 {
   const struct tree_map  *a = va, *b = vb;
@@ -3480,7 +3560,7 @@ tree_map_eq (const void *va, const void 
 
 /* Hash a from tree in a tree_map.  */
 
-static hashval_t
+unsigned int
 tree_map_hash (const void *item)
 {
   return (((const struct tree_map *) item)->hash);
@@ -3490,7 +3570,7 @@ tree_map_hash (const void *item)
    purposes.  We simply return true if the from tree is marked, so that this
    structure goes away when the from tree goes away.  */
 
-static int
+int
 tree_map_marked_p (const void *p)
 {
   tree from = ((struct tree_map *) p)->from;
@@ -5615,6 +5695,31 @@ tree_class_check_failed (const tree node
      TREE_CODE_CLASS_STRING (TREE_CODE_CLASS (TREE_CODE (node))),
      tree_code_name[TREE_CODE (node)], function, trim_filename (file), line);
 }
+#undef DEFTREESTRUCT
+#define DEFTREESTRUCT(VAL, NAME) NAME,
+
+static const char *ts_enum_names[] = {
+#include "treestruct.def"
+};
+#undef DEFTREESTRUCT
+
+#define TS_ENUM_NAME(EN) (ts_enum_names[(EN)])
+
+/* Similar to tree_class_check_failed, except that we check for
+   whether CODE contains the tree structure identified by EN.  */
+
+void
+tree_contains_struct_check_failed (const tree node, 
+				   const enum tree_node_structure_enum en,
+				   const char *file, int line, 
+				   const char *function)
+{
+  internal_error
+    ("tree check: expected tree that contains %qs structure, have %qs  in %s, at %s:%d",
+     TS_ENUM_NAME(en),
+     tree_code_name[TREE_CODE (node)], function, trim_filename (file), line);
+}
+
 
 /* Similar to above, except that the check is for the bounds of a TREE_VEC's
    (dynamically sized) vector.  */
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.734
diff -u -p -r1.734 tree.h
--- tree.h	4 Jun 2005 17:22:21 -0000	1.734
+++ tree.h	6 Jun 2005 14:17:21 -0000
@@ -40,6 +40,9 @@ enum tree_code {
 
 #undef DEFTREECODE
 
+extern unsigned char **tree_contains_struct;
+#define CODE_CONTAINS_STRUCT(CODE, STRUCT) (tree_contains_struct[(CODE)][(STRUCT)])
+
 /* Number of language-independent tree codes.  */
 #define NUM_TREE_CODES ((int) LAST_AND_UNUSED_TREE_CODE)
 
@@ -433,6 +436,13 @@ struct tree_common GTY(())
        TREE_NO_WARNING in
            ... any expr or decl node
 */
+#undef DEFTREESTRUCT
+#define DEFTREESTRUCT(ENUM, NAME) ENUM,
+enum tree_node_structure_enum {
+#include "treestruct.def"
+  LAST_TS_ENUM
+};
+#undef DEFTREESTRUCT
 
 /* Define accessors for the fields that all tree nodes have
    (though some fields are not used for all kinds of nodes).  */
@@ -536,6 +546,13 @@ struct tree_common GTY(())
 			     (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), 0);\
     __t; })
 
+#define CONTAINS_STRUCT_CHECK(T, STRUCT) __extension__			\
+({  const tree __t = (T);						\
+  if (tree_contains_struct[TREE_CODE(__t)][(STRUCT)] != 1)		\
+      tree_contains_struct_check_failed (__t, (STRUCT), __FILE__, __LINE__,	\
+			       __FUNCTION__);				\
+    __t; })
+
 #define TREE_CLASS_CHECK(T, CLASS) __extension__			\
 ({  const tree __t = (T);						\
     if (TREE_CODE_CLASS (TREE_CODE(__t)) != (CLASS))			\
@@ -612,6 +629,11 @@ struct tree_common GTY(())
 				 __FILE__, __LINE__, __FUNCTION__);	\
     &__t->exp.operands[__i]; }))
 
+extern void tree_contains_struct_check_failed (const tree,
+					       const enum tree_node_structure_enum,				     
+					       const char *, int, const char *)
+  ATTRIBUTE_NORETURN;
+
 extern void tree_check_failed (const tree, const char *, int, const char *,
 			       ...) ATTRIBUTE_NORETURN;
 extern void tree_not_check_failed (const tree, const char *, int, const char *,
@@ -631,6 +653,7 @@ extern void tree_operand_check_failed (i
 
 #else /* not ENABLE_TREE_CHECKING, or not gcc */
 
+#define CONTAINS_STRUCT_CHECK(T, ENUM)          (T)
 #define TREE_CHECK(T, CODE)			(T)
 #define TREE_NOT_CHECK(T, CODE)			(T)
 #define TREE_CHECK2(T, CODE1, CODE2)		(T)
@@ -657,7 +680,11 @@ extern void tree_operand_check_failed (i
 #include "tree-check.h"
 
 #define TYPE_CHECK(T)		TREE_CLASS_CHECK (T, tcc_type)
-#define DECL_CHECK(T)		TREE_CLASS_CHECK (T, tcc_declaration)
+#define DECL_MINIMAL_CHECK(T)   CONTAINS_STRUCT_CHECK (T, TS_DECL_MINIMAL)
+#define DECL_COMMON_CHECK(T)    CONTAINS_STRUCT_CHECK (T, TS_DECL_COMMON)
+#define DECL_WRTL_CHECK(T)      CONTAINS_STRUCT_CHECK (T, TS_DECL_WRTL)
+#define DECL_WITH_VIS_CHECK(T)  CONTAINS_STRUCT_CHECK (T, TS_DECL_WITH_VIS)
+#define DECL_NON_COMMON_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_NON_COMMON)
 #define CST_CHECK(T)		TREE_CLASS_CHECK (T, tcc_constant)
 #define STMT_CHECK(T)		TREE_CLASS_CHECK (T, tcc_statement)
 #define FUNC_OR_METHOD_CHECK(T)	TREE_CHECK2 (T, FUNCTION_TYPE, METHOD_TYPE)
@@ -946,7 +973,7 @@ extern void tree_operand_check_failed (i
 #define TYPE_SIZES_GIMPLIFIED(NODE) (TYPE_CHECK (NODE)->common.constant_flag)
 
 /* In a decl (most significantly a FIELD_DECL), means an unsigned field.  */
-#define DECL_UNSIGNED(NODE) (DECL_CHECK (NODE)->common.unsigned_flag)
+#define DECL_UNSIGNED(NODE) (DECL_COMMON_CHECK (NODE)->common.unsigned_flag)
 
 /* In a BIT_FIELD_REF, means the bitfield is to be interpreted as unsigned.  */
 #define BIT_FIELD_REF_UNSIGNED(NODE) \
@@ -986,7 +1013,7 @@ extern void tree_operand_check_failed (i
 
 /* In a RESULT_DECL or PARM_DECL, means that it is passed by invisible
    reference (and the TREE_TYPE is a pointer to the true type).  */
-#define DECL_BY_REFERENCE(NODE) (DECL_CHECK (NODE)->common.private_flag)
+#define DECL_BY_REFERENCE(NODE) (DECL_COMMON_CHECK (NODE)->common.private_flag)
 
 /* In a CALL_EXPR, means that the call is the jump from a thunk to the
    thunked-to function.  */
@@ -1874,43 +1901,44 @@ struct tree_binfo GTY (())
 		 || TREE_CODE (SSA_NAME_VAR (DECL)) == PARM_DECL \
 		 || TREE_CODE (SSA_NAME_VAR (DECL)) == RESULT_DECL)))
 
-/* This is the name of the object as written by the user.
-   It is an IDENTIFIER_NODE.  */
-#define DECL_NAME(NODE) (DECL_CHECK (NODE)->decl.name)
 
-/* The name of the object as the assembler will see it (but before any
-   translations made by ASM_OUTPUT_LABELREF).  Often this is the same
-   as DECL_NAME.  It is an IDENTIFIER_NODE.  */
-#define DECL_ASSEMBLER_NAME(NODE) decl_assembler_name (NODE)
 
-/* Returns nonzero if the DECL_ASSEMBLER_NAME for NODE has been set.  If zero,
-   the NODE might still have a DECL_ASSEMBLER_NAME -- it just hasn't been set
-   yet.  */
-#define DECL_ASSEMBLER_NAME_SET_P(NODE) \
-  (DECL_CHECK (NODE)->decl.assembler_name != NULL_TREE)
 
-/* Set the DECL_ASSEMBLER_NAME for NODE to NAME.  */
-#define SET_DECL_ASSEMBLER_NAME(NODE, NAME) \
-  (DECL_CHECK (NODE)->decl.assembler_name = (NAME))
+/* Enumerate visibility settings.  */
+#ifndef SYMBOL_VISIBILITY_DEFINED
+#define SYMBOL_VISIBILITY_DEFINED
+enum symbol_visibility
+{
+  VISIBILITY_DEFAULT,
+  VISIBILITY_INTERNAL,
+  VISIBILITY_HIDDEN,
+  VISIBILITY_PROTECTED
+};
+#endif
 
-/* Copy the DECL_ASSEMBLER_NAME from DECL1 to DECL2.  Note that if DECL1's
-   DECL_ASSEMBLER_NAME has not yet been set, using this macro will not cause
-   the DECL_ASSEMBLER_NAME of either DECL to be set.  In other words, the
-   semantics of using this macro, are different than saying:
+struct function;
 
-     SET_DECL_ASSEMBLER_NAME(DECL2, DECL_ASSEMBLER_NAME (DECL1))
 
-   which will try to set the DECL_ASSEMBLER_NAME for DECL1.  */
+/* This is the name of the object as written by the user.
+   It is an IDENTIFIER_NODE.  */
+#define DECL_NAME(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.name)
 
-#define COPY_DECL_ASSEMBLER_NAME(DECL1, DECL2)				\
-  (DECL_ASSEMBLER_NAME_SET_P (DECL1)					\
-   ? (void) SET_DECL_ASSEMBLER_NAME (DECL2,				\
-				     DECL_ASSEMBLER_NAME (DECL1))	\
-   : (void) 0)
+/* Every ..._DECL node gets a unique number.  */
+#define DECL_UID(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.uid)
 
-/* Records the section name in a section attribute.  Used to pass
-   the name from decl_attributes to make_function_rtl and make_decl_rtl.  */
-#define DECL_SECTION_NAME(NODE) (DECL_CHECK (NODE)->decl.section_name)
+/* These two fields describe where in the source code the declaration
+   was.  If the declaration appears in several places (as for a C
+   function that is declared first and then defined later), this
+   information should refer to the definition.  */
+#define DECL_SOURCE_LOCATION(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.locus)
+#define DECL_SOURCE_FILE(NODE) LOCATION_FILE (DECL_SOURCE_LOCATION (NODE))
+#define DECL_SOURCE_LINE(NODE) LOCATION_LINE (DECL_SOURCE_LOCATION (NODE))
+#ifdef USE_MAPPED_LOCATION
+#define DECL_IS_BUILTIN(DECL) \
+  (DECL_SOURCE_LOCATION (DECL) <= BUILTINS_LOCATION)
+#else
+#define DECL_IS_BUILTIN(DECL) (DECL_SOURCE_LINE(DECL) == 0)
+#endif
 
 /*  For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
     QUAL_UNION_TYPE node that the field is a member of.  For VAR_DECL,
@@ -1919,172 +1947,81 @@ struct tree_binfo GTY (())
     the RECORD_TYPE or UNION_TYPE for the containing type, or
     NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file
     scope".  */
-#define DECL_CONTEXT(NODE) (DECL_CHECK (NODE)->decl.context)
-#define DECL_FIELD_CONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl.context)
+#define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context)
+#define DECL_FIELD_CONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl_minimal.context)
+struct tree_decl_minimal GTY(())
+{
+  struct tree_common common;
+  location_t locus;
+  unsigned int uid;
+  tree name;
+  tree context;
+};
+
+/* For any sort of a ..._DECL node, this points to the original (abstract)
+   decl node which this decl is an instance of, or else it is NULL indicating
+   that this decl is not an instance of some other decl.  For example,
+   in a nested declaration of an inline function, this points back to the
+   definition.  */
+#define DECL_ABSTRACT_ORIGIN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.abstract_origin)
+
+/* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract
+   origin.  This is useful when setting the DECL_ABSTRACT_ORIGIN.  */
+#define DECL_ORIGIN(NODE) \
+  (DECL_ABSTRACT_ORIGIN (NODE) ? DECL_ABSTRACT_ORIGIN (NODE) : (NODE))
+
+/* Nonzero for any sort of ..._DECL node means this decl node represents an
+   inline instance of some original (abstract) decl from an inline function;
+   suppress any warnings about shadowing some other variable.  FUNCTION_DECL
+   nodes can also have their abstract origin set to themselves.  */
+#define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != NULL_TREE \
+				&& DECL_ABSTRACT_ORIGIN (NODE) != (NODE))
+
 /* In a DECL this is the field where attributes are stored.  */
-#define DECL_ATTRIBUTES(NODE) (DECL_CHECK (NODE)->decl.attributes)
-/* In a FIELD_DECL, this is the field position, counting in bytes, of the
-   byte containing the bit closest to the beginning of the structure.  */
-#define DECL_FIELD_OFFSET(NODE) (FIELD_DECL_CHECK (NODE)->decl.arguments)
-/* In a FIELD_DECL, this is the offset, in bits, of the first bit of the
-   field from DECL_FIELD_OFFSET.  */
-#define DECL_FIELD_BIT_OFFSET(NODE) (FIELD_DECL_CHECK (NODE)->decl.u2.t)
-/* In a FIELD_DECL, this indicates whether the field was a bit-field and
-   if so, the type that was originally specified for it.
-   TREE_TYPE may have been modified (in finish_struct).  */
-#define DECL_BIT_FIELD_TYPE(NODE) (FIELD_DECL_CHECK (NODE)->decl.result)
-/* In FUNCTION_DECL, a chain of ..._DECL nodes.
-   VAR_DECL and PARM_DECL reserve the arguments slot for language-specific
-   uses.  */
-#define DECL_ARGUMENTS(NODE) (DECL_CHECK (NODE)->decl.arguments)
-/* This field is used to reference anything in decl.result and is meant only
-   for use by the garbage collector.  */
-#define DECL_RESULT_FLD(NODE) (DECL_CHECK (NODE)->decl.result)
-/* In FUNCTION_DECL, holds the decl for the return value.  */
-#define DECL_RESULT(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.result)
-/* For a TYPE_DECL, holds the "original" type.  (TREE_TYPE has the copy.) */
-#define DECL_ORIGINAL_TYPE(NODE) (TYPE_DECL_CHECK (NODE)->decl.result)
-/* In PARM_DECL, holds the type as written (perhaps a function or array).  */
-#define DECL_ARG_TYPE_AS_WRITTEN(NODE) (PARM_DECL_CHECK (NODE)->decl.result)
+#define DECL_ATTRIBUTES(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.attributes)
+
 /* For a FUNCTION_DECL, holds the tree of BINDINGs.
    For a TRANSLATION_UNIT_DECL, holds the namespace's BLOCK.
    For a VAR_DECL, holds the initial value.
    For a PARM_DECL, not used--default
    values for parameters are encoded in the type of the function,
    not in the PARM_DECL slot.
+   For a FIELD_DECL, this is used for enumeration values and the C
+   frontend uses it for temporarily storing bitwidth of bitfields. 
 
    ??? Need to figure out some way to check this isn't a PARM_DECL.  */
-#define DECL_INITIAL(NODE) (DECL_CHECK (NODE)->decl.initial)
-/* For a PARM_DECL, records the data type used to pass the argument,
-   which may be different from the type seen in the program.  */
-#define DECL_ARG_TYPE(NODE) (PARM_DECL_CHECK (NODE)->decl.initial)
-/* For a FIELD_DECL in a QUAL_UNION_TYPE, records the expression, which
-   if nonzero, indicates that the field occupies the type.  */
-#define DECL_QUALIFIER(NODE) (FIELD_DECL_CHECK (NODE)->decl.initial)
-/* These two fields describe where in the source code the declaration
-   was.  If the declaration appears in several places (as for a C
-   function that is declared first and then defined later), this
-   information should refer to the definition.  */
-#define DECL_SOURCE_LOCATION(NODE) (DECL_CHECK (NODE)->decl.locus)
-#define DECL_SOURCE_FILE(NODE) LOCATION_FILE (DECL_SOURCE_LOCATION (NODE))
-#define DECL_SOURCE_LINE(NODE) LOCATION_LINE (DECL_SOURCE_LOCATION (NODE))
-#ifdef USE_MAPPED_LOCATION
-#define DECL_IS_BUILTIN(DECL) \
-  (DECL_SOURCE_LOCATION (DECL) <= BUILTINS_LOCATION)
-#else
-#define DECL_IS_BUILTIN(DECL) (DECL_SOURCE_LINE(DECL) == 0)
-#endif
+#define DECL_INITIAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.initial)
+
 /* Holds the size of the datum, in bits, as a tree expression.
    Need not be constant.  */
-#define DECL_SIZE(NODE) (DECL_CHECK (NODE)->decl.size)
+#define DECL_SIZE(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size)
 /* Likewise for the size in bytes.  */
-#define DECL_SIZE_UNIT(NODE) (DECL_CHECK (NODE)->decl.size_unit)
+#define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit)
 /* Holds the alignment required for the datum, in bits.  */
-#define DECL_ALIGN(NODE) (DECL_CHECK (NODE)->decl.u1.a.align)
+#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.u1.a.align)
 /* The alignment of NODE, in bytes.  */
 #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT)
 /* For FIELD_DECLs, off_align holds the number of low-order bits of
    DECL_FIELD_OFFSET which are known to be always zero.
    DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET
    has.  */
-#define DECL_OFFSET_ALIGN(NODE) \
-  (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl.u1.a.off_align)
-/* Specify that DECL_ALIGN(NODE) is a multiple of X.  */
-#define SET_DECL_OFFSET_ALIGN(NODE, X) \
-  (FIELD_DECL_CHECK (NODE)->decl.u1.a.off_align	= exact_log2 ((X) & -(X)))
-/* 1 if the alignment for this type was requested by "aligned" attribute,
-   0 if it is the default for this type.  */
-#define DECL_USER_ALIGN(NODE) (DECL_CHECK (NODE)->decl.user_align)
+#define DECL_USER_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.user_align)
 /* Holds the machine mode corresponding to the declaration of a variable or
    field.  Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a
    FIELD_DECL.  */
-#define DECL_MODE(NODE) (DECL_CHECK (NODE)->decl.mode)
-/* Holds the RTL expression for the value of a variable or function.
-   This value can be evaluated lazily for functions, variables with
-   static storage duration, and labels.  */
-#define DECL_RTL(NODE)					\
-  (DECL_CHECK (NODE)->decl.rtl				\
-   ? (NODE)->decl.rtl					\
-   : (make_decl_rtl (NODE), (NODE)->decl.rtl))
-/* Set the DECL_RTL for NODE to RTL.  */
-#define SET_DECL_RTL(NODE, RTL) set_decl_rtl (NODE, RTL)
-/* Returns nonzero if the DECL_RTL for NODE has already been set.  */
-#define DECL_RTL_SET_P(NODE)  (DECL_CHECK (NODE)->decl.rtl != NULL)
-/* Copy the RTL from NODE1 to NODE2.  If the RTL was not set for
-   NODE1, it will not be set for NODE2; this is a lazy copy.  */
-#define COPY_DECL_RTL(NODE1, NODE2) \
-  (DECL_CHECK (NODE2)->decl.rtl = DECL_CHECK (NODE1)->decl.rtl)
-/* The DECL_RTL for NODE, if it is set, or NULL, if it is not set.  */
-#define DECL_RTL_IF_SET(NODE) (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL)
-
-/* For PARM_DECL, holds an RTL for the stack slot or register
-   where the data was actually passed.  */
-#define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->decl.u2.r)
-
-/* For FUNCTION_DECL, this holds a pointer to a structure ("struct function")
-   that describes the status of this function.  */
-#define DECL_STRUCT_FUNCTION(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u2.f)
+#define DECL_MODE(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.mode)
 
 /* For FUNCTION_DECL, if it is built-in, this identifies which built-in
    operation it is.  Note, however, that this field is overloaded, with
    DECL_BUILT_IN_CLASS as the discriminant, so the latter must always be
    checked before any access to the former.  */
-#define DECL_FUNCTION_CODE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u1.f)
-
-/* The DECL_VINDEX is used for FUNCTION_DECLS in two different ways.
-   Before the struct containing the FUNCTION_DECL is laid out,
-   DECL_VINDEX may point to a FUNCTION_DECL in a base class which
-   is the FUNCTION_DECL which this FUNCTION_DECL will replace as a virtual
-   function.  When the class is laid out, this pointer is changed
-   to an INTEGER_CST node which is suitable for use as an index
-   into the virtual function table.  */
-#define DECL_VINDEX(NODE) (DECL_CHECK (NODE)->decl.vindex)
-
-/* For FIELD_DECLS, DECL_FCONTEXT is the *first* baseclass in
-   which this FIELD_DECL is defined.  This information is needed when
-   writing debugging information about vfield and vbase decls for C++.  */
-#define DECL_FCONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl.vindex)
-
-extern tree decl_debug_expr_lookup (tree);
-extern void decl_debug_expr_insert (tree, tree);
-
-/* For VAR_DECL, this is set to either an expression that it was split
-   from (if DECL_DEBUG_EXPR_IS_FROM is true), otherwise a tree_list of
-   subexpressions that it was split into.  */
-#define DECL_DEBUG_EXPR(NODE) \
-  (decl_debug_expr_lookup (VAR_DECL_CHECK (NODE)))
-
-#define SET_DECL_DEBUG_EXPR(NODE, VAL) \
-  (decl_debug_expr_insert (VAR_DECL_CHECK (NODE), (VAL)))
-
+#define DECL_FUNCTION_CODE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_common.u1.f)
 #define DECL_DEBUG_EXPR_IS_FROM(NODE) \
-  (DECL_CHECK (NODE)->decl.debug_expr_is_from)
-
-/* Every ..._DECL node gets a unique number.  */
-#define DECL_UID(NODE) (DECL_CHECK (NODE)->decl.uid)
-
-/* For any sort of a ..._DECL node, this points to the original (abstract)
-   decl node which this decl is an instance of, or else it is NULL indicating
-   that this decl is not an instance of some other decl.  For example,
-   in a nested declaration of an inline function, this points back to the
-   definition.  */
-#define DECL_ABSTRACT_ORIGIN(NODE) (DECL_CHECK (NODE)->decl.abstract_origin)
-
-/* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract
-   origin.  This is useful when setting the DECL_ABSTRACT_ORIGIN.  */
-#define DECL_ORIGIN(NODE) \
-  (DECL_ABSTRACT_ORIGIN (NODE) ? DECL_ABSTRACT_ORIGIN (NODE) : (NODE))
-
-/* Nonzero for any sort of ..._DECL node means this decl node represents an
-   inline instance of some original (abstract) decl from an inline function;
-   suppress any warnings about shadowing some other variable.  FUNCTION_DECL
-   nodes can also have their abstract origin set to themselves.  */
-#define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != NULL_TREE \
-				&& DECL_ABSTRACT_ORIGIN (NODE) != (NODE))
+  (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from)
 
 /* Nonzero for a given ..._DECL node means that the name of this node should
    be ignored for symbolic debug purposes.  */ 
-#define DECL_IGNORED_P(NODE) (DECL_CHECK (NODE)->decl.ignored_flag)
+#define DECL_IGNORED_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.ignored_flag)
 
 /* Nonzero for a given ..._DECL node means that this node represents an
    "abstract instance" of the given declaration (e.g. in the original
@@ -2092,25 +2029,14 @@ extern void decl_debug_expr_insert (tree
    information, we mustn't try to generate any address information for nodes
    marked as "abstract instances" because we don't actually generate
    any code or allocate any data space for such instances.  */
-#define DECL_ABSTRACT(NODE) (DECL_CHECK (NODE)->decl.abstract_flag)
-
-/* Nonzero for a given ..._DECL node means that no warnings should be
-   generated just because this node is unused.  */
-#define DECL_IN_SYSTEM_HEADER(NODE) \
-  (DECL_CHECK (NODE)->decl.in_system_header_flag)
-
-/* Nonzero for a given ..._DECL node means that this node should be
-   put in .common, if possible.  If a DECL_INITIAL is given, and it
-   is not error_mark_node, then the decl cannot be put in .common.  */
-#define DECL_COMMON(NODE) (DECL_CHECK (NODE)->decl.common_flag)
+#define DECL_ABSTRACT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.abstract_flag)
 
 /* Language-specific decl information.  */
-#define DECL_LANG_SPECIFIC(NODE) (DECL_CHECK (NODE)->decl.lang_specific)
+#define DECL_LANG_SPECIFIC(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_specific)
 
-/* In a VAR_DECL or FUNCTION_DECL,
-   nonzero means external reference:
+/* In a VAR_DECL or FUNCTION_DECL, nonzero means external reference:
    do not allocate storage, and refer to a definition elsewhere.  */
-#define DECL_EXTERNAL(NODE) (DECL_CHECK (NODE)->decl.external_flag)
+#define DECL_EXTERNAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.external_flag)
 
 /* In a VAR_DECL for a RECORD_TYPE, sets number for non-init_priority
    initializations.  */
@@ -2123,22 +2049,7 @@ extern void decl_debug_expr_insert (tree
    Instead it will generate cross reference ('x') of names.
    This uses the same flag as DECL_EXTERNAL.  */
 #define TYPE_DECL_SUPPRESS_DEBUG(NODE) \
-  (TYPE_DECL_CHECK (NODE)->decl.external_flag)
-
-/* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'.  */
-#define DECL_REGISTER(NODE) (DECL_CHECK (NODE)->decl.regdecl_flag)
-
-/* In LABEL_DECL nodes, nonzero means that an error message about
-   jumping into such a binding contour has been printed for this label.  */
-#define DECL_ERROR_ISSUED(NODE) (LABEL_DECL_CHECK (NODE)->decl.regdecl_flag)
-
-/* In a FIELD_DECL, indicates this field should be bit-packed.  */
-#define DECL_PACKED(NODE) (FIELD_DECL_CHECK (NODE)->decl.regdecl_flag)
-
-/* In a FUNCTION_DECL with a nonzero DECL_CONTEXT, indicates that a
-   static chain is not needed.  */
-#define DECL_NO_STATIC_CHAIN(NODE) \
-  (FUNCTION_DECL_CHECK (NODE)->decl.regdecl_flag)
+  (TYPE_DECL_CHECK (NODE)->decl_common.external_flag)
 
 /* Nonzero in a ..._DECL means this variable is ref'd from a nested function.
    For VAR_DECL nodes, PARM_DECL nodes, and FUNCTION_DECL nodes.
@@ -2147,128 +2058,269 @@ extern void decl_debug_expr_insert (tree
 
    Also set in some languages for variables, etc., outside the normal
    lexical scope, such as class instance variables.  */
-#define DECL_NONLOCAL(NODE) (DECL_CHECK (NODE)->decl.nonlocal_flag)
+#define DECL_NONLOCAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.nonlocal_flag)
 
-/* Nonzero in a FUNCTION_DECL means this function can be substituted
-   where it is called.  */
-#define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inline_flag)
+/* Used in VAR_DECLs to indicate that the variable is a vtable.
+   Used in FIELD_DECLs for vtable pointers.
+   Used in FUNCTION_DECLs to indicate that the function is virtual.  */
+#define DECL_VIRTUAL_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.virtual_flag)
 
-/* Nonzero in a FUNCTION_DECL means that this function was declared inline,
-   such as via the `inline' keyword in C/C++.  This flag controls the linkage
-   semantics of 'inline'; whether or not the function is inlined is
-   controlled by DECL_INLINE.  */
-#define DECL_DECLARED_INLINE_P(NODE) \
-  (FUNCTION_DECL_CHECK (NODE)->decl.declared_inline_flag)
+/* Used to indicate that this DECL represents a compiler-generated entity.  */
+#define DECL_ARTIFICIAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.artificial_flag)
 
-/* Nonzero in a decl means that the gimplifier has seen (or placed)
-   this variable in a BIND_EXPR.  */
-#define DECL_SEEN_IN_BIND_EXPR_P(NODE) \
-  (DECL_CHECK (NODE)->decl.seen_in_bind_expr)
+/* Additional flags for language-specific uses.  */
+#define DECL_LANG_FLAG_0(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_0)
+#define DECL_LANG_FLAG_1(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_1)
+#define DECL_LANG_FLAG_2(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_2)
+#define DECL_LANG_FLAG_3(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_3)
+#define DECL_LANG_FLAG_4(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_4)
+#define DECL_LANG_FLAG_5(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_5)
+#define DECL_LANG_FLAG_6(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_6)
+#define DECL_LANG_FLAG_7(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_7)
 
-/* In a VAR_DECL, nonzero if the decl is a register variable with
-   an explicit asm specification.  */
-#define DECL_HARD_REGISTER(NODE)  (VAR_DECL_CHECK (NODE)->decl.inline_flag)
+/* Used to indicate an alias set for the memory pointed to by this
+   particular FIELD_DECL, PARM_DECL, or VAR_DECL, which must have
+   pointer (or reference) type.  */
+#define DECL_POINTER_ALIAS_SET(NODE) \
+  (DECL_COMMON_CHECK (NODE)->decl_common.pointer_alias_set)
 
-/* Value of the decls's visibility attribute */
-#define DECL_VISIBILITY(NODE) (DECL_CHECK (NODE)->decl.visibility)
+/* A numeric unique identifier for a LABEL_DECL.  The UID allocation is
+   dense, unique within any one function, and may be used to index arrays.
+   If the value is -1, then no UID has been assigned.  */
+#define LABEL_DECL_UID(NODE) \
+  (LABEL_DECL_CHECK (NODE)->decl_common.pointer_alias_set)
 
-/* Nonzero means that the decl had its visibility specified rather than
-   being inferred.  */
-#define DECL_VISIBILITY_SPECIFIED(NODE) (DECL_CHECK (NODE)->decl.visibility_specified)
+/* Nonzero if an alias set has been assigned to this declaration.  */
+#define DECL_POINTER_ALIAS_SET_KNOWN_P(NODE) \
+  (DECL_POINTER_ALIAS_SET (NODE) != - 1)
 
-/* In a FUNCTION_DECL, nonzero if the function cannot be inlined.  */
-#define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable)
+/* Nonzero for a decl which is at file scope.  */
+#define DECL_FILE_SCOPE_P(EXP) 					\
+  (! DECL_CONTEXT (EXP)						\
+   || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
 
-/* In a VAR_DECL, nonzero if the data should be allocated from
-   thread-local storage.  */
-#define DECL_THREAD_LOCAL(NODE) (VAR_DECL_CHECK (NODE)->decl.thread_local_flag)
+/* Nonzero for a decl that is decorated using attribute used.
+   This indicates compiler tools that this decl needs to be preserved.  */
+#define DECL_PRESERVE_P(DECL) \
+  DECL_COMMON_CHECK (DECL)->decl_common.preserve_flag
 
-/* In a FUNCTION_DECL, the saved representation of the body of the
-   entire function.  */
-#define DECL_SAVED_TREE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.saved_tree)
+struct tree_decl_common GTY(())
+{
+  struct tree_decl_minimal common;
+  tree size;
 
-extern tree decl_value_expr_lookup (tree);
-extern void decl_value_expr_insert (tree, tree);
+  ENUM_BITFIELD(machine_mode) mode : 8;
 
-/* In a VAR_DECL or PARM_DECL, the location at which the value may be found,
-   if transformations have made this more complicated than evaluating the
-   decl itself.  This should only be used for debugging; once this field has
+  unsigned nonlocal_flag : 1;
+  unsigned virtual_flag : 1;
+  unsigned ignored_flag : 1;
+  unsigned abstract_flag : 1;
+  unsigned artificial_flag : 1;
+  unsigned user_align : 1;
+  unsigned preserve_flag: 1;
+  unsigned debug_expr_is_from : 1;
+
+  unsigned lang_flag_0 : 1;
+  unsigned lang_flag_1 : 1;
+  unsigned lang_flag_2 : 1;
+  unsigned lang_flag_3 : 1;
+  unsigned lang_flag_4 : 1;
+  unsigned lang_flag_5 : 1;
+  unsigned lang_flag_6 : 1;
+  unsigned lang_flag_7 : 1;
+ 
+  /* Logically, this should go in struct tree_decl_with_rtl, but doing
+     so would require wasting 4+ bytes.  */
+  unsigned regdecl_flag : 1;
+  /* Logically, these go to struct tree_field_decl.  */    
+  unsigned packed_flag : 1;
+  unsigned bit_field_flag : 1;
+  unsigned non_addressable : 1;
+  /* Logically, this goes with struct tree_parm_decl.  */
+  unsigned transparent_union : 1;
+  unsigned external_flag : 1;
+  /* Logically, this would go in a theoretical base shared by var and parm 
+     decl. */
+  unsigned has_value_expr: 1;
+  
+  union tree_decl_u1 {
+    /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
+       DECL_FUNCTION_CODE.  */
+    enum built_in_function f;
+    /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this
+       is used by language-dependent code.  */
+    HOST_WIDE_INT i;
+    /* DECL_ALIGN and DECL_OFFSET_ALIGN.  (These are not used for
+       FUNCTION_DECLs).  */
+    struct tree_decl_u1_a {
+      unsigned int align : 24;
+      unsigned int off_align : 8;
+    } a;
+  } GTY ((skip)) u1;
+
+  tree size_unit;
+  tree initial;
+  tree attributes;
+  tree abstract_origin;
+  
+  HOST_WIDE_INT pointer_alias_set; 
+  /* Points to a structure whose details depend on the language in use.  */
+  struct lang_decl *lang_specific;
+};
+
+extern tree decl_value_expr_lookup (tree);
+extern void decl_value_expr_insert (tree, tree);
+
+/* In a VAR_DECL or PARM_DECL, the location at which the value may be found,
+   if transformations have made this more complicated than evaluating the
+   decl itself.  This should only be used for debugging; once this field has
    been set, the decl itself may not legitimately appear in the function.  */
 #define DECL_HAS_VALUE_EXPR_P(NODE) \
-  (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl.has_value_expr)
+  (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.has_value_expr)
 #define DECL_VALUE_EXPR(NODE) \
-  (decl_value_expr_lookup (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)))
+  (decl_value_expr_lookup (DECL_WRTL_CHECK (NODE))) 
 #define SET_DECL_VALUE_EXPR(NODE, VAL)			\
-  (decl_value_expr_insert (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL), VAL))
+  (decl_value_expr_insert (DECL_WRTL_CHECK (NODE), VAL))
 
-/* Nonzero in a FUNCTION_DECL means this function should be treated
-   as if it were a malloc, meaning it returns a pointer that is
-   not an alias.  */
-#define DECL_IS_MALLOC(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.malloc_flag)
+/* Holds the RTL expression for the value of a variable or function.
+   This value can be evaluated lazily for functions, variables with
+   static storage duration, and labels.  */
+#define DECL_RTL(NODE)					\
+  (DECL_WRTL_CHECK (NODE)->decl_with_rtl.rtl		\
+   ? (NODE)->decl_with_rtl.rtl					\
+   : (make_decl_rtl (NODE), (NODE)->decl_with_rtl.rtl))
 
-/* Nonzero in a FUNCTION_DECL means this function may return more
-   than once.  */
-#define DECL_IS_RETURNS_TWICE(NODE) \
-  (FUNCTION_DECL_CHECK (NODE)->decl.returns_twice_flag)
+/* Set the DECL_RTL for NODE to RTL.  */
+#define SET_DECL_RTL(NODE, RTL) set_decl_rtl (NODE, RTL)
 
-/* Nonzero in a FUNCTION_DECL means this function should be treated
-   as "pure" function (like const function, but may read global memory).  */
-#define DECL_IS_PURE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.pure_flag)
+/* Returns nonzero if NODE is a tree node that can contain RTL.  */
+#define HAS_RTL_P(NODE) (CODE_CONTAINS_STRUCT (TREE_CODE (NODE), TS_DECL_WRTL))
+
+/* Returns nonzero if the DECL_RTL for NODE has already been set.  */
+#define DECL_RTL_SET_P(NODE)  (HAS_RTL_P (NODE) && DECL_WRTL_CHECK (NODE)->decl_with_rtl.rtl != NULL)
+
+/* Copy the RTL from NODE1 to NODE2.  If the RTL was not set for
+   NODE1, it will not be set for NODE2; this is a lazy copy.  */
+#define COPY_DECL_RTL(NODE1, NODE2) \
+  (DECL_WRTL_CHECK (NODE2)->decl_with_rtl.rtl = DECL_WRTL_CHECK (NODE1)->decl_with_rtl.rtl)
+
+/* The DECL_RTL for NODE, if it is set, or NULL, if it is not set.  */
+#define DECL_RTL_IF_SET(NODE) (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL)
+
+/* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'.  */
+#define DECL_REGISTER(NODE) (DECL_WRTL_CHECK (NODE)->decl_common.regdecl_flag)
+
+struct tree_decl_with_rtl GTY(())
+{
+  struct tree_decl_common common;
+  rtx rtl;
+};
+
+/* In a FIELD_DECL, this is the field position, counting in bytes, of the
+   byte containing the bit closest to the beginning of the structure.  */
+#define DECL_FIELD_OFFSET(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.offset)
+
+/* In a FIELD_DECL, this is the offset, in bits, of the first bit of the
+   field from DECL_FIELD_OFFSET.  */
+#define DECL_FIELD_BIT_OFFSET(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.bit_offset)
+
+/* In a FIELD_DECL, this indicates whether the field was a bit-field and
+   if so, the type that was originally specified for it.
+   TREE_TYPE may have been modified (in finish_struct).  */
+#define DECL_BIT_FIELD_TYPE(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.bit_field_type)
+
+/* For a FIELD_DECL in a QUAL_UNION_TYPE, records the expression, which
+   if nonzero, indicates that the field occupies the type.  */
+#define DECL_QUALIFIER(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.qualifier)
+
+/* For FIELD_DECLs, off_align holds the number of low-order bits of
+   DECL_FIELD_OFFSET which are known to be always zero.
+   DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET
+   has.  */
+#define DECL_OFFSET_ALIGN(NODE) \
+  (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align)
+
+/* Specify that DECL_ALIGN(NODE) is a multiple of X.  */
+#define SET_DECL_OFFSET_ALIGN(NODE, X) \
+  (FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align = exact_log2 ((X) & -(X)))
+/* 1 if the alignment for this type was requested by "aligned" attribute,
+   0 if it is the default for this type.  */
+
+/* For FIELD_DECLS, DECL_FCONTEXT is the *first* baseclass in
+   which this FIELD_DECL is defined.  This information is needed when
+   writing debugging information about vfield and vbase decls for C++.  */
+#define DECL_FCONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.fcontext)
+
+/* In a FIELD_DECL, indicates this field should be bit-packed.  */
+#define DECL_PACKED(NODE) (FIELD_DECL_CHECK (NODE)->decl_common.packed_flag)
 
-/* Nonzero in a FUNCTION_DECL means this function should be treated
-   as "novops" function (function that does not read global memory,
-   but may have arbitrary side effects).  */
-#define DECL_IS_NOVOPS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.novops_flag)
-     
 /* Nonzero in a FIELD_DECL means it is a bit field, and must be accessed
    specially.  */
-#define DECL_BIT_FIELD(NODE) (FIELD_DECL_CHECK (NODE)->decl.bit_field_flag)
-
-/* Unused in FUNCTION_DECL.  */
+#define DECL_BIT_FIELD(NODE) (FIELD_DECL_CHECK (NODE)->decl_common.bit_field_flag)
 
-/* In a VAR_DECL that's static,
-   nonzero if the space is in the text section.  */
-#define DECL_IN_TEXT_SECTION(NODE) (VAR_DECL_CHECK (NODE)->decl.bit_field_flag)
+/* Used in a FIELD_DECL to indicate that we cannot form the address of
+   this component.  */
+#define DECL_NONADDRESSABLE_P(NODE) \
+  (FIELD_DECL_CHECK (NODE)->decl_common.non_addressable)
 
-/* In a FUNCTION_DECL, nonzero means a built in function.  */
-#define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN)
+struct tree_field_decl GTY(())
+{
+  struct tree_decl_common common;
 
-/* For a builtin function, identify which part of the compiler defined it.  */
-#define DECL_BUILT_IN_CLASS(NODE) \
-   (FUNCTION_DECL_CHECK (NODE)->decl.built_in_class)
+  tree offset;	
+  tree bit_field_type;	
+  tree qualifier;
+  tree bit_offset;
+  tree fcontext;
+ 
+};
 
-/* Used in VAR_DECLs to indicate that the variable is a vtable.
-   Used in FIELD_DECLs for vtable pointers.
-   Used in FUNCTION_DECLs to indicate that the function is virtual.  */
-#define DECL_VIRTUAL_P(NODE) (DECL_CHECK (NODE)->decl.virtual_flag)
+/* For a PARM_DECL, records the data type used to pass the argument,
+   which may be different from the type seen in the program.  */
+#define DECL_ARG_TYPE(NODE) (PARM_DECL_CHECK (NODE)->decl_common.initial)
 
-/* Used to indicate that the linkage status of this DECL is not yet known,
-   so it should not be output now.  */
-#define DECL_DEFER_OUTPUT(NODE) (DECL_CHECK (NODE)->decl.defer_output)
+/* For PARM_DECL, holds an RTL for the stack slot or register
+   where the data was actually passed.  */
+#define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->parm_decl.incoming_rtl)
 
 /* Used in PARM_DECLs whose type are unions to indicate that the
    argument should be passed in the same way that the first union
    alternative would be passed.  */
 #define DECL_TRANSPARENT_UNION(NODE) \
-  (PARM_DECL_CHECK (NODE)->decl.transparent_union)
+  (PARM_DECL_CHECK (NODE)->decl_common.transparent_union)
 
-/* Used in FUNCTION_DECLs to indicate that they should be run automatically
-   at the beginning or end of execution.  */
-#define DECL_STATIC_CONSTRUCTOR(NODE) \
-  (FUNCTION_DECL_CHECK (NODE)->decl.static_ctor_flag)
+struct tree_parm_decl GTY(())
+{
+  struct tree_decl_with_rtl common;
+  rtx incoming_rtl;  
+};
 
-#define DECL_STATIC_DESTRUCTOR(NODE) \
-(FUNCTION_DECL_CHECK (NODE)->decl.static_dtor_flag)
+/* Nonzero in a decl means that the gimplifier has seen (or placed)
+   this variable in a BIND_EXPR.  */
+#define DECL_SEEN_IN_BIND_EXPR_P(NODE) \
+  (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.seen_in_bind_expr)
 
-/* Used to indicate that this DECL represents a compiler-generated entity.  */
-#define DECL_ARTIFICIAL(NODE) (DECL_CHECK (NODE)->decl.artificial_flag)
+/* Used to indicate that the linkage status of this DECL is not yet known,
+   so it should not be output now.  */
+#define DECL_DEFER_OUTPUT(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.defer_output)
+
+/* Nonzero for a given ..._DECL node means that no warnings should be
+   generated just because this node is unused.  */
+#define DECL_IN_SYSTEM_HEADER(NODE) \
+  (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.in_system_header_flag)
 
-/* Used to indicate that this DECL has weak linkage.  */
-#define DECL_WEAK(NODE) (DECL_CHECK (NODE)->decl.weak_flag)
+  /* Used to indicate that this DECL has weak linkage.  */
+#define DECL_WEAK(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.weak_flag)
+
+/* Internal to the gimplifier.  Indicates that the value is a formal
+   temporary controlled by the gimplifier.  */
+#define DECL_GIMPLE_FORMAL_TEMP_P(DECL) \
+  DECL_WITH_VIS_CHECK (DECL)->decl_with_vis.gimple_formal_temp
+
+/* Used to indicate that the pointer to this DECL cannot be treated as
+   an address constant.  */
+#define DECL_NON_ADDR_CONST_P(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.non_addr_const_p)
 
-/* Used in TREE_PUBLIC decls to indicate that copies of this DECL in
-   multiple translation units should be merged.  */
-#define DECL_ONE_ONLY(NODE) (DECL_CHECK (NODE)->decl.transparent_union)
 
 /* Used in a DECL to indicate that, even if it TREE_PUBLIC, it need
    not be put out unless it is needed in this translation unit.
@@ -2279,195 +2331,283 @@ extern void decl_value_expr_insert (tree
    back-end; it is up to front-ends which set this flag to ensure
    that there will never be any harm, other than bloat, in putting out
    something which is DECL_COMDAT.  */
-#define DECL_COMDAT(NODE) (DECL_CHECK (NODE)->decl.comdat_flag)
+#define DECL_COMDAT(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_flag)
+
+/* The name of the object as the assembler will see it (but before any
+   translations made by ASM_OUTPUT_LABELREF).  Often this is the same
+   as DECL_NAME.  It is an IDENTIFIER_NODE.  */
+#define DECL_ASSEMBLER_NAME(NODE) decl_assembler_name (NODE)
+
+/* Return true if NODE is a NODE that can contain a DECL_ASSEMBLER_NAME. 
+   This is true of all DECL nodes except FIELD_DECL.  */
+#define HAS_DECL_ASSEMBLER_NAME_P(NODE) \
+  (CODE_CONTAINS_STRUCT (TREE_CODE (NODE), TS_DECL_WITH_VIS))
+
+/* Returns nonzero if the DECL_ASSEMBLER_NAME for NODE has been set.  If zero,
+   the NODE might still have a DECL_ASSEMBLER_NAME -- it just hasn't been set
+   yet.  */
+#define DECL_ASSEMBLER_NAME_SET_P(NODE) \
+  (HAS_DECL_ASSEMBLER_NAME_P (NODE) &&  DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.assembler_name != NULL_TREE)
+
+/* Set the DECL_ASSEMBLER_NAME for NODE to NAME.  */
+#define SET_DECL_ASSEMBLER_NAME(NODE, NAME) \
+  (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.assembler_name = (NAME))
+
+/* Copy the DECL_ASSEMBLER_NAME from DECL1 to DECL2.  Note that if DECL1's
+   DECL_ASSEMBLER_NAME has not yet been set, using this macro will not cause
+   the DECL_ASSEMBLER_NAME of either DECL to be set.  In other words, the
+   semantics of using this macro, are different than saying:
+
+     SET_DECL_ASSEMBLER_NAME(DECL2, DECL_ASSEMBLER_NAME (DECL1))
+
+   which will try to set the DECL_ASSEMBLER_NAME for DECL1.  */
+
+#define COPY_DECL_ASSEMBLER_NAME(DECL1, DECL2)				\
+  (DECL_ASSEMBLER_NAME_SET_P (DECL1)					\
+   ? (void) SET_DECL_ASSEMBLER_NAME (DECL2,				\
+				     DECL_ASSEMBLER_NAME (DECL1))	\
+   : (void) 0)
+
+/* Records the section name in a section attribute.  Used to pass
+   the name from decl_attributes to make_function_rtl and make_decl_rtl.  */
+#define DECL_SECTION_NAME(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.section_name)
+
+/* Value of the decls's visibility attribute */
+#define DECL_VISIBILITY(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility)
+
+/* Nonzero means that the decl had its visibility specified rather than
+   being inferred.  */
+#define DECL_VISIBILITY_SPECIFIED(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility_specified)
+
+/* Used in TREE_PUBLIC decls to indicate that copies of this DECL in
+   multiple translation units should be merged.  */
+#define DECL_ONE_ONLY(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.one_only)
+
+struct tree_decl_with_vis GTY(())
+{
+ struct tree_decl_with_rtl common;
+ tree assembler_name;
+ tree section_name;
+  
+ /* Belong to VAR_DECL */
+ unsigned defer_output:1;
+ unsigned hard_register:1;
+ unsigned thread_local:1;
+ unsigned common_flag:1; 
+ unsigned in_text_section : 1;
+ /* Don't */
+ unsigned in_system_header_flag : 1;
+ unsigned weak_flag:1;
+ unsigned seen_in_bind_expr : 1;
+
+ /* Belong to VAR_DECL */
+ unsigned gimple_formal_temp : 1;
+ unsigned non_addr_const_p : 1; 
+ /* Don't */
+ unsigned comdat_flag : 1;
+ ENUM_BITFIELD(symbol_visibility) visibility : 2;
+ unsigned visibility_specified : 1;
+ unsigned one_only : 1;
+ 
+ /* Don't */
+ unsigned short init_priority; 
+
+
+
+};
+
+/* In a VAR_DECL that's static,
+   nonzero if the space is in the text section.  */
+#define DECL_IN_TEXT_SECTION(NODE) (VAR_DECL_CHECK (NODE)->decl_with_vis.in_text_section)
+
+/* Nonzero for a given ..._DECL node means that this node should be
+   put in .common, if possible.  If a DECL_INITIAL is given, and it
+   is not error_mark_node, then the decl cannot be put in .common.  */
+#define DECL_COMMON(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.common_flag)
+
+/* In a VAR_DECL, nonzero if the decl is a register variable with
+   an explicit asm specification.  */
+#define DECL_HARD_REGISTER(NODE)  (VAR_DECL_CHECK (NODE)->decl_with_vis.hard_register)
+
+/* In a VAR_DECL, nonzero if the data should be allocated from
+   thread-local storage.  */
+#define DECL_THREAD_LOCAL(NODE) (VAR_DECL_CHECK (NODE)->decl_with_vis.thread_local)
+
+extern tree decl_debug_expr_lookup (tree);
+extern void decl_debug_expr_insert (tree, tree);
+/* For VAR_DECL, this is set to either an expression that it was split
+   from (if DECL_DEBUG_EXPR_IS_FROM is true), otherwise a tree_list of
+   subexpressions that it was split into.  */
+#define DECL_DEBUG_EXPR(NODE) \
+  (decl_debug_expr_lookup (VAR_DECL_CHECK (NODE)))
+
+#define SET_DECL_DEBUG_EXPR(NODE, VAL) \
+  (decl_debug_expr_insert (VAR_DECL_CHECK (NODE), VAL))
+
+struct tree_var_decl GTY(())
+{
+  struct tree_decl_with_vis common;
+};
+
+
+/* In FUNCTION_DECL, a chain of ..._DECL nodes.
+   VAR_DECL and PARM_DECL reserve the arguments slot for language-specific
+   uses.  */
+#define DECL_ARGUMENTS(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.arguments)
+
+/* This field is used to reference anything in decl.result and is meant only
+   for use by the garbage collector.  */
+#define DECL_RESULT_FLD(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.result)
+
+/* In FUNCTION_DECL, holds the decl for the return value.  */
+#define DECL_RESULT(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.result)
+
+/* For a TYPE_DECL, holds the "original" type.  (TREE_TYPE has the copy.) */
+#define DECL_ORIGINAL_TYPE(NODE) (TYPE_DECL_CHECK (NODE)->decl_non_common.result)
+
+
+
+
+/* In a FUNCTION_DECL, nonzero if the function cannot be inlined.  */
+#define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.uninlinable)
+
+
+/* In a FUNCTION_DECL, the saved representation of the body of the
+   entire function.  */
+#define DECL_SAVED_TREE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.saved_tree)
+
+/* Nonzero in a FUNCTION_DECL means this function should be treated
+   as if it were a malloc, meaning it returns a pointer that is
+   not an alias.  */
+#define DECL_IS_MALLOC(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.malloc_flag)
+
+/* Nonzero in a FUNCTION_DECL means this function may return more
+   than once.  */
+#define DECL_IS_RETURNS_TWICE(NODE) \
+  (FUNCTION_DECL_CHECK (NODE)->decl_non_common.returns_twice_flag)
+
+/* Nonzero in a FUNCTION_DECL means this function should be treated
+   as "pure" function (like const function, but may read global memory).  */
+#define DECL_IS_PURE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.pure_flag)
+
+/* Nonzero in a FUNCTION_DECL means this function should be treated
+   as "novops" function (function that does not read global memory,
+   but may have arbitrary side effects).  */
+#define DECL_IS_NOVOPS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.novops_flag)
+     
+
+/* Used in FUNCTION_DECLs to indicate that they should be run automatically
+   at the beginning or end of execution.  */
+#define DECL_STATIC_CONSTRUCTOR(NODE) \
+  (FUNCTION_DECL_CHECK (NODE)->decl_non_common.static_ctor_flag)
+
+#define DECL_STATIC_DESTRUCTOR(NODE) \
+(FUNCTION_DECL_CHECK (NODE)->decl_non_common.static_dtor_flag)
+
 
 /* Used in FUNCTION_DECLs to indicate that function entry and exit should
    be instrumented with calls to support routines.  */
 #define DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT(NODE) \
-  (FUNCTION_DECL_CHECK (NODE)->decl.no_instrument_function_entry_exit)
+  (FUNCTION_DECL_CHECK (NODE)->decl_non_common.no_instrument_function_entry_exit)
 
 /* Used in FUNCTION_DECLs to indicate that limit-stack-* should be
    disabled in this function.  */
 #define DECL_NO_LIMIT_STACK(NODE) \
-  (FUNCTION_DECL_CHECK (NODE)->decl.no_limit_stack)
+  (FUNCTION_DECL_CHECK (NODE)->decl_non_common.no_limit_stack)
 
-/* Additional flags for language-specific uses.  */
-#define DECL_LANG_FLAG_0(NODE) (DECL_CHECK (NODE)->decl.lang_flag_0)
-#define DECL_LANG_FLAG_1(NODE) (DECL_CHECK (NODE)->decl.lang_flag_1)
-#define DECL_LANG_FLAG_2(NODE) (DECL_CHECK (NODE)->decl.lang_flag_2)
-#define DECL_LANG_FLAG_3(NODE) (DECL_CHECK (NODE)->decl.lang_flag_3)
-#define DECL_LANG_FLAG_4(NODE) (DECL_CHECK (NODE)->decl.lang_flag_4)
-#define DECL_LANG_FLAG_5(NODE) (DECL_CHECK (NODE)->decl.lang_flag_5)
-#define DECL_LANG_FLAG_6(NODE) (DECL_CHECK (NODE)->decl.lang_flag_6)
-#define DECL_LANG_FLAG_7(NODE) (DECL_CHECK (NODE)->decl.lang_flag_7)
 
-/* Used to indicate that the pointer to this DECL cannot be treated as
-   an address constant.  */
-#define DECL_NON_ADDR_CONST_P(NODE) (DECL_CHECK (NODE)->decl.non_addr_const_p)
+/* In LABEL_DECL nodes, nonzero means that an error message about
+   jumping into such a binding contour has been printed for this label.  */
+#define DECL_ERROR_ISSUED(NODE) (LABEL_DECL_CHECK (NODE)->decl_non_common.regdecl_flag)
 
-/* Used in a FIELD_DECL to indicate that we cannot form the address of
-   this component.  */
-#define DECL_NONADDRESSABLE_P(NODE) \
-  (FIELD_DECL_CHECK (NODE)->decl.non_addressable)
+/* In a FUNCTION_DECL with a nonzero DECL_CONTEXT, indicates that a
+   static chain is not needed.  */
+#define DECL_NO_STATIC_CHAIN(NODE) \
+  (FUNCTION_DECL_CHECK (NODE)->decl_non_common.regdecl_flag)
 
-/* Used to indicate an alias set for the memory pointed to by this
-   particular FIELD_DECL, PARM_DECL, or VAR_DECL, which must have
-   pointer (or reference) type.  */
-#define DECL_POINTER_ALIAS_SET(NODE) \
-  (DECL_CHECK (NODE)->decl.pointer_alias_set)
+/* Nonzero for a decl that cgraph has decided should be inlined into
+   at least one call site.  It is not meaningful to look at this
+   directly; always use cgraph_function_possibly_inlined_p.  */
+#define DECL_POSSIBLY_INLINED(DECL) \
+  FUNCTION_DECL_CHECK (DECL)->decl_non_common.possibly_inlined
 
+/* Nonzero in a FUNCTION_DECL means this function can be substituted
+   where it is called.  */
+#define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.inline_flag)
 
-/* A numeric unique identifier for a LABEL_DECL.  The UID allocation is
-   dense, unique within any one function, and may be used to index arrays.
-   If the value is -1, then no UID has been assigned.  */
-#define LABEL_DECL_UID(NODE) \
-  (LABEL_DECL_CHECK (NODE)->decl.pointer_alias_set)
+/* Nonzero in a FUNCTION_DECL means that this function was declared inline,
+   such as via the `inline' keyword in C/C++.  This flag controls the linkage
+   semantics of 'inline'; whether or not the function is inlined is
+   controlled by DECL_INLINE.  */
+#define DECL_DECLARED_INLINE_P(NODE) \
+  (FUNCTION_DECL_CHECK (NODE)->decl_non_common.declared_inline_flag)
 
-/* Nonzero if an alias set has been assigned to this declaration.  */
-#define DECL_POINTER_ALIAS_SET_KNOWN_P(NODE) \
-  (DECL_POINTER_ALIAS_SET (NODE) != - 1)
+/* For FUNCTION_DECL, this holds a pointer to a structure ("struct function")
+   that describes the status of this function.  */
+#define DECL_STRUCT_FUNCTION(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.u2.f)
 
-/* Nonzero for a decl which is at file scope.  */
-#define DECL_FILE_SCOPE_P(EXP) 					\
-  (! DECL_CONTEXT (EXP)						\
-   || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
+/* In a FUNCTION_DECL, nonzero means a built in function.  */
+#define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN)
 
-/* Nonzero for a decl that cgraph has decided should be inlined into
-   at least one call site.  It is not meaningful to look at this
-   directly; always use cgraph_function_possibly_inlined_p.  */
-#define DECL_POSSIBLY_INLINED(DECL) \
-  FUNCTION_DECL_CHECK (DECL)->decl.possibly_inlined
+/* For a builtin function, identify which part of the compiler defined it.  */
+#define DECL_BUILT_IN_CLASS(NODE) \
+   (FUNCTION_DECL_CHECK (NODE)->decl_non_common.built_in_class)
 
-/* Nonzero for a decl that is decorated using attribute used.
-   This indicates compiler tools that this decl needs to be preserved.  */
-#define DECL_PRESERVE_P(DECL) \
-  DECL_CHECK (DECL)->decl.preserve_flag
+/* The DECL_VINDEX is used for FUNCTION_DECLS in two different ways.
+   Before the struct containing the FUNCTION_DECL is laid out,
+   DECL_VINDEX may point to a FUNCTION_DECL in a base class which
+   is the FUNCTION_DECL which this FUNCTION_DECL will replace as a virtual
+   function.  When the class is laid out, this pointer is changed
+   to an INTEGER_CST node which is suitable for use as an index
+   into the virtual function table.  
+   C++ also uses this field in namespaces, hence the DECL_NON_COMMON_CHECK.  */
+#define DECL_VINDEX(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.vindex)
 
-/* Internal to the gimplifier.  Indicates that the value is a formal
-   temporary controlled by the gimplifier.  */
-#define DECL_GIMPLE_FORMAL_TEMP_P(DECL) \
-  DECL_CHECK (DECL)->decl.gimple_formal_temp
 
-/* Enumerate visibility settings.  */
-#ifndef SYMBOL_VISIBILITY_DEFINED
-#define SYMBOL_VISIBILITY_DEFINED
-enum symbol_visibility
-{
-  VISIBILITY_DEFAULT,
-  VISIBILITY_INTERNAL,
-  VISIBILITY_HIDDEN,
-  VISIBILITY_PROTECTED
-};
-#endif
 
-struct function;
-struct tree_decl GTY(())
+
+struct tree_decl_non_common GTY(())
 {
-  struct tree_common common;
-  location_t locus;
-  unsigned int uid;
-  tree size;
-  ENUM_BITFIELD(machine_mode) mode : 8;
+  struct tree_decl_with_vis common;
+
+
+
 
-  unsigned external_flag : 1;
-  unsigned nonlocal_flag : 1;
-  unsigned regdecl_flag : 1;
-  unsigned inline_flag : 1;
-  unsigned bit_field_flag : 1;
-  unsigned virtual_flag : 1;
-  unsigned ignored_flag : 1;
-  unsigned abstract_flag : 1;
 
-  unsigned in_system_header_flag : 1;
-  unsigned common_flag : 1;
-  unsigned defer_output : 1;
-  unsigned transparent_union : 1;
   unsigned static_ctor_flag : 1;
   unsigned static_dtor_flag : 1;
-  unsigned artificial_flag : 1;
-  unsigned weak_flag : 1;
-
-  unsigned non_addr_const_p : 1;
-  unsigned no_instrument_function_entry_exit : 1;
-  unsigned comdat_flag : 1;
+  unsigned uninlinable : 1;
+  unsigned possibly_inlined : 1;
+  unsigned novops_flag : 1;
+  unsigned returns_twice_flag : 1;
   unsigned malloc_flag : 1;
-  unsigned no_limit_stack : 1;
-  ENUM_BITFIELD(built_in_class) built_in_class : 2;
   unsigned pure_flag : 1;
-
-  unsigned non_addressable : 1;
-  unsigned user_align : 1;
-  unsigned uninlinable : 1;
-  unsigned thread_local_flag : 1;
+  
   unsigned declared_inline_flag : 1;
-  ENUM_BITFIELD(symbol_visibility) visibility : 2;
-  unsigned visibility_specified : 1;
+  unsigned regdecl_flag : 1;
+  unsigned inline_flag : 1;
+  unsigned no_instrument_function_entry_exit : 1;
+  
 
-  unsigned lang_flag_0 : 1;
-  unsigned lang_flag_1 : 1;
-  unsigned lang_flag_2 : 1;
-  unsigned lang_flag_3 : 1;
-  unsigned lang_flag_4 : 1;
-  unsigned lang_flag_5 : 1;
-  unsigned lang_flag_6 : 1;
-  unsigned lang_flag_7 : 1;
+  unsigned no_limit_stack : 1;
 
-  unsigned possibly_inlined : 1;
-  unsigned preserve_flag: 1;
-  unsigned gimple_formal_temp : 1;
-  unsigned debug_expr_is_from : 1;
-  unsigned returns_twice_flag : 1;
-  unsigned seen_in_bind_expr : 1;
-  unsigned novops_flag : 1;
-  unsigned has_value_expr:1;
-  /* 8 unused bits.  */
 
-  union tree_decl_u1 {
-    /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
-       DECL_FUNCTION_CODE.  */
-    enum built_in_function f;
-    /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this
-       is used by language-dependent code.  */
-    HOST_WIDE_INT i;
-    /* DECL_ALIGN and DECL_OFFSET_ALIGN.  (These are not used for
-       FUNCTION_DECLs).  */
-    struct tree_decl_u1_a {
-      unsigned int align : 24;
-      unsigned int off_align : 8;
-    } a;
-  } GTY ((skip)) u1;
+  ENUM_BITFIELD(built_in_class) built_in_class : 2;
 
-  tree size_unit;
-  tree name;
-  tree context;
-  tree arguments;	/* Also used for DECL_FIELD_OFFSET */
-  tree result;	/* Also used for DECL_BIT_FIELD_TYPE */
-  tree initial;	/* Also used for DECL_QUALIFIER */
-  tree abstract_origin;
-  tree assembler_name;
-  tree section_name;
-  tree attributes;
-  rtx rtl;	/* RTL representation for object.  */
 
   /* In FUNCTION_DECL, if it is inline, holds the saved insn chain.
-     In FIELD_DECL, is DECL_FIELD_BIT_OFFSET.
-     In PARM_DECL, holds an RTL for the stack slot
-     of register where the data was actually passed.
      Used by Chill and Java in LABEL_DECL and by C++ and Java in VAR_DECL.  */
   union tree_decl_u2 {
     struct function * GTY ((tag ("FUNCTION_DECL"))) f;
-    rtx GTY ((tag ("PARM_DECL"))) r;
-    tree GTY ((tag ("FIELD_DECL"))) t;
     int GTY ((tag ("VAR_DECL"))) i;
   } GTY ((desc ("TREE_CODE((tree) &(%0))"))) u2;
 
-  /* In a FUNCTION_DECL, this is DECL_SAVED_TREE.
-     In a VAR_DECL or PARM_DECL, this is DECL_VALUE_EXPR.  */
+  tree arguments;	
+  tree result; 
   tree saved_tree;
   tree vindex;
-  HOST_WIDE_INT pointer_alias_set;
-  /* Points to a structure whose details depend on the language in use.  */
-  struct lang_decl *lang_specific;
+
+
 };
 
 
@@ -2520,27 +2660,7 @@ struct tree_value_handle GTY(())
   unsigned int id;
 };
 
-enum tree_node_structure_enum {
-  TS_COMMON,
-  TS_INT_CST,
-  TS_REAL_CST,
-  TS_VECTOR,
-  TS_STRING,
-  TS_COMPLEX,
-  TS_IDENTIFIER,
-  TS_DECL,
-  TS_TYPE,
-  TS_LIST,
-  TS_VEC,
-  TS_EXP,
-  TS_SSA_NAME,
-  TS_PHI_NODE,
-  TS_BLOCK,
-  TS_BINFO,
-  TS_STATEMENT_LIST,
-  TS_VALUE_HANDLE,
-  LAST_TS_ENUM
-};
+
 
 /* Define the overall contents of a tree node.
    It may be any of the structures declared above
@@ -2556,7 +2676,14 @@ union tree_node GTY ((ptr_alias (union l
   struct tree_string GTY ((tag ("TS_STRING"))) string;
   struct tree_complex GTY ((tag ("TS_COMPLEX"))) complex;
   struct tree_identifier GTY ((tag ("TS_IDENTIFIER"))) identifier;
-  struct tree_decl GTY ((tag ("TS_DECL"))) decl;
+  struct tree_decl_minimal GTY((tag ("TS_DECL_MINIMAL"))) decl_minimal;
+  struct tree_decl_common GTY ((tag ("TS_DECL_COMMON"))) decl_common;
+  struct tree_decl_with_rtl GTY ((tag ("TS_DECL_WRTL"))) decl_with_rtl;
+  struct tree_decl_non_common  GTY ((tag ("TS_DECL_NON_COMMON"))) decl_non_common;
+  struct tree_parm_decl  GTY  ((tag ("TS_PARM_DECL"))) parm_decl;
+  struct tree_decl_with_vis GTY ((tag ("TS_DECL_WITH_VIS"))) decl_with_vis;
+  struct tree_var_decl GTY ((tag ("TS_VAR_DECL"))) var_decl;
+  struct tree_field_decl GTY ((tag ("TS_FIELD_DECL"))) field_decl;
   struct tree_type GTY ((tag ("TS_TYPE"))) type;
   struct tree_list GTY ((tag ("TS_LIST"))) list;
   struct tree_vec GTY ((tag ("TS_VEC"))) vec;
@@ -3990,4 +4117,14 @@ extern tree get_base_address (tree t);
 /* In tree-vectorizer.c.  */
 extern void vect_set_verbosity_level (const char *);
 
+struct tree_map GTY(())
+{
+  unsigned int hash;
+  tree from;
+  tree to;
+};
+
+extern unsigned int tree_map_hash (const void *);
+extern int tree_map_marked_p (const void *);
+extern int tree_map_eq (const void *, const void *);
 #endif  /* GCC_TREE_H  */
Index: treestruct.def
===================================================================
RCS file: treestruct.def
diff -N treestruct.def
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ treestruct.def	6 Jun 2005 14:17:21 -0000
@@ -0,0 +1,55 @@
+/* This file contains the definitions for the tree structure
+   enumeration used in GCC.  
+
+Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.  */
+
+/* The format of this file is 
+   DEFTREESTRUCT(enumeration value, printable name).
+   Each enumeration value should correspond with a single member of union 
+   tree_node.  
+   These enumerator values are used in order to distinguish members of union
+   tree_node for garbage collection purposes, as well as specifying what structures
+   contain what other structures in the tree_contains_struct array.  */
+	
+DEFTREESTRUCT(TS_COMMON, "common")
+DEFTREESTRUCT(TS_INT_CST, "integer cst")
+DEFTREESTRUCT(TS_REAL_CST, "real cst")
+DEFTREESTRUCT(TS_VECTOR, "vector")
+DEFTREESTRUCT(TS_STRING, "string")
+DEFTREESTRUCT(TS_COMPLEX, "complex")
+DEFTREESTRUCT(TS_IDENTIFIER, "indentifier")
+DEFTREESTRUCT(TS_DECL_MINIMAL, "decl minimal")
+DEFTREESTRUCT(TS_DECL_COMMON, "decl common")
+DEFTREESTRUCT(TS_DECL_WRTL, "decl with RTL")
+DEFTREESTRUCT(TS_DECL_NON_COMMON, "decl non-common")
+DEFTREESTRUCT(TS_DECL_WITH_VIS, "decl with visibility")
+DEFTREESTRUCT(TS_FIELD_DECL, "field decl")
+DEFTREESTRUCT(TS_VAR_DECL, "var decl")
+DEFTREESTRUCT(TS_PARM_DECL, "parm decl")
+DEFTREESTRUCT(TS_TYPE, "type")
+DEFTREESTRUCT(TS_LIST, "list")
+DEFTREESTRUCT(TS_VEC, "vec")
+DEFTREESTRUCT(TS_EXP, "exp")
+DEFTREESTRUCT(TS_SSA_NAME, "ssa name")
+DEFTREESTRUCT(TS_PHI_NODE, "phi node")
+DEFTREESTRUCT(TS_BLOCK, "block")
+DEFTREESTRUCT(TS_BINFO, "binfo")
+DEFTREESTRUCT(TS_STATEMENT_LIST, "statement list")
+DEFTREESTRUCT(TS_VALUE_HANDLE, "value handle")
Index: ada/utils.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/utils.c,v
retrieving revision 1.95
diff -u -p -r1.95 utils.c
--- ada/utils.c	1 Apr 2005 05:28:01 -0000	1.95
+++ ada/utils.c	6 Jun 2005 14:17:21 -0000
@@ -1489,7 +1489,6 @@ create_param_decl (tree param_name, tree
     }
 
   DECL_ARG_TYPE (param_decl) = param_type;
-  DECL_ARG_TYPE_AS_WRITTEN (param_decl) = param_type;
   TREE_READONLY (param_decl) = readonly;
   return param_decl;
 }
Index: cp/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/Make-lang.in,v
retrieving revision 1.204
diff -u -p -r1.204 Make-lang.in
--- cp/Make-lang.in	2 Jun 2005 17:52:07 -0000	1.204
+++ cp/Make-lang.in	6 Jun 2005 14:17:21 -0000
@@ -110,7 +110,7 @@ $(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.g
 		$(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h
 
 gtype-cp.h gt-cp-call.h gt-cp-decl.h gt-cp-decl2.h : s-gtype; @true
-gt-cp-pt.h gt-cp-repo.h gt-cp-parser.h gt-cp-method.h : s-gtype; @true
+gt-cp-pt.h gt-cp-repo.h gt-cp-parser.h gt-cp-method.h gt-cp-lang.h : s-gtype; @true
 gt-cp-tree.h gt-cp-mangle.h gt-cp-name-lookup.h gt-cp-typeck2.h: s-gtype; @true
 
 #
@@ -236,7 +236,7 @@ cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H)
   c-pragma.h toplev.h output.h input.h cp/operators.def $(TM_P_H)
 cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) toplev.h debug.h langhooks.h \
   $(LANGHOOKS_DEF_H) c-common.h gtype-cp.h $(CXX_PRETTY_PRINT_H) $(DIAGNOSTIC_H) \
-  cp/cp-objcp-common.h
+  cp/cp-objcp-common.h gt-cp-lang.h
 cp/decl.o: cp/decl.c $(CXX_TREE_H) $(TM_H) flags.h cp/decl.h \
   output.h $(EXPR_H) except.h toplev.h $(HASHTAB_H) $(RTL_H) \
   cp/operators.def $(TM_P_H) tree-inline.h diagnostic.h c-pragma.h \
Index: cp/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.718
diff -u -p -r1.718 class.c
--- cp/class.c	24 May 2005 22:22:14 -0000	1.718
+++ cp/class.c	6 Jun 2005 14:17:21 -0000
@@ -4162,7 +4162,6 @@ create_vtable_ptr (tree t, tree* virtual
       tree field;
 
       field = build_decl (FIELD_DECL, get_vfield_name (t), vtbl_ptr_type_node);
-      SET_DECL_ASSEMBLER_NAME (field, get_identifier (VFIELD_BASE));
       DECL_VIRTUAL_P (field) = 1;
       DECL_ARTIFICIAL (field) = 1;
       DECL_FIELD_CONTEXT (field) = t;
Index: cp/config-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/config-lang.in,v
retrieving revision 1.26
diff -u -p -r1.26 config-lang.in
--- cp/config-lang.in	25 Jan 2005 19:21:30 -0000	1.26
+++ cp/config-lang.in	6 Jun 2005 14:17:21 -0000
@@ -34,4 +34,4 @@ stagestuff="g++\$(exeext) g++-cross\$(ex
 
 target_libs="target-libstdc++-v3 target-gperf"
 
-gtfiles="\$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-lex.c \$(srcdir)/c-pragma.c \$(srcdir)/cp/class.c"
+gtfiles="\$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-lex.c \$(srcdir)/c-pragma.c \$(srcdir)/cp/class.c \$(srcdir)/cp/cp-lang.c"
Index: cp/cp-lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-lang.c,v
retrieving revision 1.96
diff -u -p -r1.96 cp-lang.c
--- cp/cp-lang.c	2 Nov 2004 20:29:21 -0000	1.96
+++ cp/cp-lang.c	6 Jun 2005 14:17:21 -0000
@@ -33,8 +33,10 @@ Boston, MA 02111-1307, USA.  */
 #include "cxx-pretty-print.h"
 #include "debug.h"
 #include "cp-objcp-common.h"
+#include "hashtab.h"
 
 enum c_language_kind c_language = clk_cxx;
+static void cp_init_ts (void);
 
 /* Lang hooks common to C++ and ObjC++ are declared in cp/cp-objcp-common.h;
    consequently, there should be very few hooks below.  */
@@ -48,6 +50,9 @@ enum c_language_kind c_language = clk_cx
 #undef LANG_HOOKS_FOLD_OBJ_TYPE_REF
 #define LANG_HOOKS_FOLD_OBJ_TYPE_REF cp_fold_obj_type_ref
 
+#undef LANG_HOOKS_INIT_TS
+#define LANG_HOOKS_INIT_TS cp_init_ts
+
 /* Each front end provides its own lang hook initializer.  */
 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
 
@@ -107,10 +112,79 @@ objcp_tsubst_copy_and_build (tree t ATTR
   return NULL_TREE;
 }
 
+static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map))) 
+     htab_t shadowed_var_for_decl;
+
+
+static void
+cp_init_ts (void)
+{
+  tree_contains_struct[NAMESPACE_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[USING_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[TEMPLATE_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[ALIAS_DECL][TS_DECL_NON_COMMON] = 1;
+
+  tree_contains_struct[NAMESPACE_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[USING_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[TEMPLATE_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[ALIAS_DECL][TS_DECL_WITH_VIS] = 1;
+
+  tree_contains_struct[NAMESPACE_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[USING_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[TEMPLATE_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[ALIAS_DECL][TS_DECL_WRTL] = 1;
+  
+  tree_contains_struct[NAMESPACE_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[USING_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[TEMPLATE_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[ALIAS_DECL][TS_DECL_COMMON] = 1;
+ 
+  tree_contains_struct[NAMESPACE_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[USING_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[TEMPLATE_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[ALIAS_DECL][TS_DECL_MINIMAL] = 1;
+
+  shadowed_var_for_decl = htab_create_ggc (512, tree_map_hash,
+					   tree_map_eq, 0);
+
+}
+
+/* Lookup a shadowed var for FROM, and return it if we find one.  */
+
+tree 
+decl_shadowed_for_var_lookup (tree from)
+{
+  struct tree_map *h, in;
+  in.from = from;
+
+  h = htab_find_with_hash (shadowed_var_for_decl, &in, 
+			   htab_hash_pointer (from));
+  if (h)
+    return h->to;
+  return NULL_TREE;
+}
+
+/* Insert a mapping FROM->TO in the shadowed var hashtable.  */
+
+void
+decl_shadowed_for_var_insert (tree from, tree to)
+{
+  struct tree_map *h;
+  void **loc;
+
+  h = ggc_alloc (sizeof (struct tree_map));
+  h->hash = htab_hash_pointer (from);
+  h->from = from;
+  h->to = to;
+  loc = htab_find_slot_with_hash (shadowed_var_for_decl, h, h->hash, INSERT);
+  *(struct tree_map **) loc = h;
+}
+
 void
 finish_file (void)
 {
   cp_finish_file ();
 }
 
+#include "gt-cp-cp-lang.h"
 #include "gtype-cp.h"
Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1140
diff -u -p -r1.1140 cp-tree.h
--- cp/cp-tree.h	3 Jun 2005 16:16:10 -0000	1.1140
+++ cp/cp-tree.h	6 Jun 2005 14:17:21 -0000
@@ -173,14 +173,14 @@ struct diagnostic_context;
 #define NON_THUNK_FUNCTION_CHECK(NODE) __extension__			\
 ({  const tree __t = (NODE);						\
     if (TREE_CODE (__t) != FUNCTION_DECL &&				\
- 	TREE_CODE (__t) != TEMPLATE_DECL && __t->decl.lang_specific	\
-	&& __t->decl.lang_specific->decl_flags.thunk_p)			\
+ 	TREE_CODE (__t) != TEMPLATE_DECL && __t->decl_common.lang_specific	\
+	&& __t->decl_common.lang_specific->decl_flags.thunk_p)			\
       tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0);	\
     __t; })
 #define THUNK_FUNCTION_CHECK(NODE) __extension__			\
 ({  const tree __t = (NODE);						\
-    if (TREE_CODE (__t) != FUNCTION_DECL || !__t->decl.lang_specific	\
-	|| !__t->decl.lang_specific->decl_flags.thunk_p)		\
+    if (TREE_CODE (__t) != FUNCTION_DECL || !__t->decl_common.lang_specific	\
+	|| !__t->decl_common.lang_specific->decl_flags.thunk_p)		\
       tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0); 	\
      __t; })
 #else
@@ -2006,7 +2006,7 @@ struct lang_decl GTY(())
 /* In a NAMESPACE_DECL, the list of namespaces which have associated
    themselves with this one.  */
 #define DECL_NAMESPACE_ASSOCIATIONS(NODE) \
-  (NAMESPACE_DECL_CHECK (NODE)->decl.saved_tree)
+  (NAMESPACE_DECL_CHECK (NODE)->decl_non_common.saved_tree)
 
 /* In a NAMESPACE_DECL, points to the original namespace if this is
    a namespace alias.  */
@@ -2024,15 +2024,22 @@ struct lang_decl GTY(())
 /* In a non-local VAR_DECL with static storage duration, this is the
    initialization priority.  If this value is zero, the NODE will be
    initialized at the DEFAULT_INIT_PRIORITY.  */
-#define DECL_INIT_PRIORITY(NODE) (VAR_DECL_CHECK (NODE)->decl.u2.i)
+#define DECL_INIT_PRIORITY(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.init_priority)
 
 /* In a TREE_LIST concatenating using directives, indicate indirect
    directives  */
 #define TREE_INDIRECT_USING(NODE) (TREE_LIST_CHECK (NODE)->common.lang_flag_0)
 
+extern tree decl_shadowed_for_var_lookup (tree);
+extern void decl_shadowed_for_var_insert (tree, tree);
+
 /* In a VAR_DECL for a variable declared in a for statement,
    this is the shadowed (local) variable.  */
-#define DECL_SHADOWED_FOR_VAR(NODE) DECL_RESULT_FLD(VAR_DECL_CHECK (NODE))
+#define DECL_SHADOWED_FOR_VAR(NODE) \
+  (decl_shadowed_for_var_lookup (NODE))
+
+#define SET_DECL_SHADOWED_FOR_VAR(NODE, VAL) \
+  (decl_shadowed_for_var_insert (NODE, VAL))
 
 /* In a FUNCTION_DECL, this is nonzero if this function was defined in
    the class definition.  We have saved away the text of the function,
@@ -2305,7 +2312,7 @@ struct lang_decl GTY(())
 /* Nonzero if NODE is a FUNCTION_DECL for a built-in function, and we have
    not yet seen a prototype for that function.  */
 #define DECL_ANTICIPATED(NODE) \
-  (DECL_LANG_SPECIFIC (DECL_CHECK (NODE))->decl_flags.anticipated_p)
+  (DECL_LANG_SPECIFIC (DECL_COMMON_CHECK (NODE))->decl_flags.anticipated_p)
 
 /* Record whether a typedef for type `int' was actually `signed int'.  */
 #define C_TYPEDEF_EXPLICITLY_SIGNED(EXP) DECL_LANG_FLAG_1 (EXP)
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1403
diff -u -p -r1.1403 decl.c
--- cp/decl.c	3 Jun 2005 16:16:12 -0000	1.1403
+++ cp/decl.c	6 Jun 2005 14:17:21 -0000
@@ -614,7 +614,7 @@ poplevel (int keep, int reverse, int fun
 	      /* Keep track of what should have happened when we
 		 popped the binding.  */
 	      if (ob && ob->value)
-		DECL_SHADOWED_FOR_VAR (link) = ob->value;
+		SET_DECL_SHADOWED_FOR_VAR (link, ob->value);
 
 	      /* Add it to the list of dead variables in the next
 		 outermost binding to that we can remove these when we
@@ -1829,12 +1829,15 @@ duplicate_decls (tree newdecl, tree oldd
     {
       int function_size;
 
-      function_size = sizeof (struct tree_decl);
+      function_size = sizeof (struct tree_decl_common);
 
       memcpy ((char *) olddecl + sizeof (struct tree_common),
 	      (char *) newdecl + sizeof (struct tree_common),
 	      function_size - sizeof (struct tree_common));
 
+      memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+	      (char *) newdecl + sizeof (struct tree_decl_common),
+	      sizeof (struct tree_decl_non_common) - sizeof (struct tree_decl_common));
       if (DECL_TEMPLATE_INSTANTIATION (newdecl))
 	/* If newdecl is a template instantiation, it is possible that
 	   the following sequence of events has occurred:
@@ -1865,10 +1868,42 @@ duplicate_decls (tree newdecl, tree oldd
     {
       memcpy ((char *) olddecl + sizeof (struct tree_common),
 	      (char *) newdecl + sizeof (struct tree_common),
-	      sizeof (struct tree_decl) - sizeof (struct tree_common)
-	      + TREE_CODE_LENGTH (TREE_CODE (newdecl)) * sizeof (char *));
-    }
+	      sizeof (struct tree_decl_common) - sizeof (struct tree_common));
+      switch (TREE_CODE (olddecl))       
+	{
+	case VAR_DECL:
+	  {
+	    memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+		    (char *) newdecl + sizeof (struct tree_decl_common),
+		    sizeof (struct tree_var_decl) - sizeof (struct tree_decl_common)
+		    + TREE_CODE_LENGTH (TREE_CODE (newdecl)) * sizeof (char *));
+	  }
+	  break;
 
+	case PARM_DECL:
+	  {
+	    memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+		    (char *) newdecl + sizeof (struct tree_decl_common),
+		    sizeof (struct tree_parm_decl) - sizeof (struct tree_decl_common)
+		    + TREE_CODE_LENGTH (TREE_CODE (newdecl)) * sizeof (char *));
+	  }
+	  break;
+	case FIELD_DECL:
+	  {
+	    memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+		    (char *) newdecl + sizeof (struct tree_decl_common),
+		    sizeof (struct tree_field_decl) - sizeof (struct tree_decl_common)
+		    + TREE_CODE_LENGTH (TREE_CODE (newdecl)) * sizeof (char *));
+	  }
+	  break;
+	default:
+	  memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
+		  (char *) newdecl + sizeof (struct tree_decl_common),
+		  sizeof (struct tree_decl_non_common) - sizeof (struct tree_decl_common)
+		  + TREE_CODE_LENGTH (TREE_CODE (newdecl)) * sizeof (char *));
+	  break;
+	}
+    }
   DECL_UID (olddecl) = olddecl_uid;
   if (olddecl_friend)
     DECL_FRIEND_P (olddecl) = 1;
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.1001
diff -u -p -r1.1001 pt.c
--- cp/pt.c	3 Jun 2005 16:16:15 -0000	1.1001
+++ cp/pt.c	6 Jun 2005 14:17:22 -0000
@@ -6648,12 +6648,14 @@ tsubst_decl (tree t, tree args, tsubst_f
 	DECL_CONTEXT (r) = ctx;
 	/* Clear out the mangled name and RTL for the instantiation.  */
 	SET_DECL_ASSEMBLER_NAME (r, NULL_TREE);
-	SET_DECL_RTL (r, NULL_RTX);
+	if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_DECL_WRTL))
+	  SET_DECL_RTL (r, NULL_RTX);
 
 	/* Don't try to expand the initializer until someone tries to use
 	   this variable; otherwise we run into circular dependencies.  */
 	DECL_INITIAL (r) = NULL_TREE;
-	SET_DECL_RTL (r, NULL_RTX);
+	if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_DECL_WRTL))
+	  SET_DECL_RTL (r, NULL_RTX);
 	DECL_SIZE (r) = DECL_SIZE_UNIT (r) = 0;
 
 	/* Even if the original location is out of scope, the newly
Index: fortran/trans-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-decl.c,v
retrieving revision 1.60
diff -u -p -r1.60 trans-decl.c
--- fortran/trans-decl.c	1 Jun 2005 02:51:12 -0000	1.60
+++ fortran/trans-decl.c	6 Jun 2005 14:17:22 -0000
@@ -1217,7 +1217,6 @@ create_function_arglist (gfc_symbol * sy
 	  /* Fill in arg stuff.  */
 	  DECL_CONTEXT (parm) = fndecl;
 	  DECL_ARG_TYPE (parm) = type;
-	  DECL_ARG_TYPE_AS_WRITTEN (parm) = type;
 	  /* All implementation args are read-only.  */
 	  TREE_READONLY (parm) = 1;
 
Index: java/java-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/java-tree.h,v
retrieving revision 1.233
diff -u -p -r1.233 java-tree.h
--- java/java-tree.h	27 May 2005 05:15:25 -0000	1.233
+++ java/java-tree.h	6 Jun 2005 14:17:22 -0000
@@ -860,14 +860,14 @@ union lang_tree_node 
 
 /* In the label of a sub-routine, a chain of the return location labels. */
 #define LABEL_RETURN_LABELS(node) \
-  (LABEL_DECL_CHECK (LABEL_RETURN_LABEL (node))->decl.result)
+  (LABEL_DECL_CHECK (LABEL_RETURN_LABEL (node))->decl_non_common.result)
 
 /* In a LABEL_DECL, the next pending label.
    See pending_blocks in expr.c. */
-#define LABEL_PENDING_CHAIN(NODE) (LABEL_DECL_CHECK (NODE)->decl.result)
+#define LABEL_PENDING_CHAIN(NODE) (LABEL_DECL_CHECK (NODE)->decl_non_common.result)
 
 /* In a LABEL_DECL, the corresponding bytecode program counter. */
-#define LABEL_PC(NODE) (LABEL_DECL_CHECK (NODE)->decl.u2.i)
+#define LABEL_PC(NODE) (LABEL_DECL_CHECK (NODE)->decl_non_common.u2.i)
 
 /* Used during verification to mark the label has "changed". (See JVM Spec). */
 #define LABEL_CHANGED(NODE) DECL_LANG_FLAG_6 (LABEL_DECL_CHECK (NODE))
@@ -960,7 +960,7 @@ union lang_tree_node 
    that specifies if this decl is definitively assigned.
    The value -1 means the variable has been definitely assigned (and not
    definitely unassigned).  The value -2 means we already reported an error. */
-#define DECL_BIT_INDEX(DECL) VAR_OR_FIELD_CHECK (DECL)->decl.pointer_alias_set
+#define DECL_BIT_INDEX(DECL) VAR_OR_FIELD_CHECK (DECL)->decl_common.pointer_alias_set
 
 /* DECL_LANG_SPECIFIC for FUNCTION_DECLs. */
 struct lang_decl_func GTY(())
Index: objc/objc-act.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.c,v
retrieving revision 1.276
diff -u -p -r1.276 objc-act.c
--- objc/objc-act.c	25 May 2005 15:48:44 -0000	1.276
+++ objc/objc-act.c	6 Jun 2005 14:17:22 -0000
@@ -8141,7 +8141,6 @@ objc_push_parm (tree parm)
   else if (TREE_CODE (TREE_TYPE (parm)) == FUNCTION_TYPE)
     TREE_TYPE (parm) = build_pointer_type (TREE_TYPE (parm));
 
-  DECL_ARG_TYPE_AS_WRITTEN (parm) = TREE_TYPE (parm);
   DECL_ARG_TYPE (parm)
     = lang_hooks.types.type_promotes_to (TREE_TYPE (parm));
 
Index: objc/objc-act.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.h,v
retrieving revision 1.39
diff -u -p -r1.39 objc-act.h
--- objc/objc-act.h	24 May 2005 22:21:00 -0000	1.39
+++ objc/objc-act.h	6 Jun 2005 14:17:22 -0000
@@ -44,16 +44,16 @@ enum gimplify_status objc_gimplify_expr 
 #define OBJC_INFO_SLOT_ELTS		2
 
 /* KEYWORD_DECL */
-#define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name)
-#define KEYWORD_ARG_NAME(DECL) ((DECL)->decl.arguments)
+#define KEYWORD_KEY_NAME(DECL) ((DECL)->decl_minimal.name)
+#define KEYWORD_ARG_NAME(DECL) ((DECL)->decl_non_common.arguments)
 
 /* INSTANCE_METHOD_DECL, CLASS_METHOD_DECL */
-#define METHOD_SEL_NAME(DECL) ((DECL)->decl.name)
-#define METHOD_SEL_ARGS(DECL) ((DECL)->decl.arguments)
-#define METHOD_ADD_ARGS(DECL) ((DECL)->decl.result)
-#define METHOD_ADD_ARGS_ELLIPSIS_P(DECL) ((DECL)->decl.lang_flag_0)
-#define METHOD_DEFINITION(DECL) ((DECL)->decl.initial)
-#define METHOD_ENCODING(DECL) ((DECL)->decl.context)
+#define METHOD_SEL_NAME(DECL) ((DECL)->decl_minimal.name)
+#define METHOD_SEL_ARGS(DECL) ((DECL)->decl_non_common.arguments)
+#define METHOD_ADD_ARGS(DECL) ((DECL)->decl_non_common.result)
+#define METHOD_ADD_ARGS_ELLIPSIS_P(DECL) ((DECL)->decl_common.lang_flag_0)
+#define METHOD_DEFINITION(DECL) ((DECL)->decl_common.initial)
+#define METHOD_ENCODING(DECL) ((DECL)->decl_minimal.context)
 
 /* CLASS_INTERFACE_TYPE, CLASS_IMPLEMENTATION_TYPE,
    CATEGORY_INTERFACE_TYPE, CATEGORY_IMPLEMENTATION_TYPE,
Index: objc/objc-lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/objc-lang.c,v
retrieving revision 1.56
diff -u -p -r1.56 objc-lang.c
--- objc/objc-lang.c	24 May 2005 22:21:01 -0000	1.56
+++ objc/objc-lang.c	6 Jun 2005 14:17:22 -0000
@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA.  */
 #include "c-objc-common.h"
 
 enum c_language_kind c_language = clk_objc;
+static void objc_init_ts (void);
 
 /* Lang hooks common to C and ObjC are declared in c-objc-common.h;
    consequently, there should be very few hooks below.  */
@@ -49,6 +50,8 @@ enum c_language_kind c_language = clk_ob
 #define LANG_HOOKS_GIMPLIFY_EXPR objc_gimplify_expr
 #undef LANG_HOOKS_GET_CALLEE_FNDECL
 #define LANG_HOOKS_GET_CALLEE_FNDECL	objc_get_callee_fndecl
+#undef LANG_HOOKS_INIT_TS
+#define LANG_HOOKS_INIT_TS objc_init_ts
 
 /* Each front end provides its own lang hook initializer.  */
 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
@@ -98,6 +101,30 @@ const char * const tree_code_name[] = {
 /* Lang hook routines common to C and ObjC appear in c-objc-common.c;
    there should be very few (if any) routines below.  */
 
+static void
+objc_init_ts (void)
+{
+  tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_NON_COMMON] = 1;
+  tree_contains_struct[KEYWORD_DECL][TS_DECL_NON_COMMON] = 1;
+  
+  tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WITH_VIS] = 1;
+  tree_contains_struct[KEYWORD_DECL][TS_DECL_WITH_VIS] = 1;
+
+  tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WRTL] = 1;
+  tree_contains_struct[KEYWORD_DECL][TS_DECL_WRTL] = 1;
+  
+  tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_MINIMAL] = 1;
+  tree_contains_struct[KEYWORD_DECL][TS_DECL_MINIMAL] = 1;
+  
+  tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_COMMON] = 1;
+  tree_contains_struct[KEYWORD_DECL][TS_DECL_COMMON] = 1;
+}
+
 void
 finish_file (void)
 {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]