]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree.h
tree-ssa.h: New.
[thirdparty/gcc.git] / gcc / tree.h
index fef9e0d068e60280cad50320471bdc402d45fc41..a263a2cf46ae0ec9a4de38fd2512d07d9a18b61e 100644 (file)
@@ -1,7 +1,5 @@
 /* Definitions for the ubiquitous 'tree' type for GNU compilers.
-   Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-   Free Software Foundation, Inc.
+   Copyright (C) 1989-2013 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -22,33 +20,7 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_TREE_H
 #define GCC_TREE_H
 
-#include "hashtab.h"
-#include "machmode.h"
-#include "input.h"
-#include "statistics.h"
-#include "vec.h"
-#include "vecir.h"
-#include "double-int.h"
-#include "real.h"
-#include "fixed-value.h"
-#include "alias.h"
-#include "flags.h"
-
-/* Codes of tree nodes */
-
-#define DEFTREECODE(SYM, STRING, TYPE, NARGS)   SYM,
-#define END_OF_BASE_TREE_CODES LAST_AND_UNUSED_TREE_CODE,
-
-enum tree_code {
-#include "all-tree.def"
-MAX_TREE_CODES
-};
-
-#undef DEFTREECODE
-#undef END_OF_BASE_TREE_CODES
-
-extern unsigned char tree_contains_struct[MAX_TREE_CODES][64];
-#define CODE_CONTAINS_STRUCT(CODE, STRUCT) (tree_contains_struct[(CODE)][(STRUCT)])
+#include "tree-core.h"
 
 /* Macros for initializing `tree_contains_struct'.  */
 #define MARK_TS_BASE(C)                                        \
@@ -110,42 +82,12 @@ extern unsigned char tree_contains_struct[MAX_TREE_CODES][64];
     tree_contains_struct[C][TS_DECL_NON_COMMON] = 1;   \
   } while (0)
 
-/* Number of language-independent tree codes.  */
-#define NUM_TREE_CODES ((int) LAST_AND_UNUSED_TREE_CODE)
-
-/* Tree code classes.  */
-
-/* Each tree_code has an associated code class represented by a
-   TREE_CODE_CLASS.  */
-
-enum tree_code_class {
-  tcc_exceptional, /* An exceptional code (fits no category).  */
-  tcc_constant,    /* A constant.  */
-  /* Order of tcc_type and tcc_declaration is important.  */
-  tcc_type,        /* A type object code.  */
-  tcc_declaration, /* A declaration (also serving as variable refs).  */
-  tcc_reference,   /* A reference to storage.  */
-  tcc_comparison,  /* A comparison expression.  */
-  tcc_unary,       /* A unary arithmetic expression.  */
-  tcc_binary,      /* A binary arithmetic expression.  */
-  tcc_statement,   /* A statement expression, which have side effects
-                     but usually no interesting value.  */
-  tcc_vl_exp,      /* A function call or other expression with a
-                     variable-length operand vector.  */
-  tcc_expression   /* Any other expression.  */
-};
-
-/* Each tree code class has an associated string representation.
-   These must correspond to the tree_code_class entries.  */
-
-extern const char *const tree_code_class_strings[];
 
 /* Returns the string representing CLASS.  */
 
 #define TREE_CODE_CLASS_STRING(CLASS)\
         tree_code_class_strings[(int) (CLASS)]
 
-extern const enum tree_code_class tree_code_type[];
 #define TREE_CODE_CLASS(CODE)  tree_code_type[(int) (CODE)]
 
 /* Nonzero if CODE represents an exceptional code.  */
@@ -168,6 +110,10 @@ extern const enum tree_code_class tree_code_type[];
 #define DECL_P(CODE)\
         (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_declaration)
 
+/* True if NODE designates a variable declaration.  */
+#define VAR_P(NODE) \
+  (TREE_CODE (NODE) == VAR_DECL)
+
 /* Nonzero if DECL represents a VAR_DECL or FUNCTION_DECL.  */
 
 #define VAR_OR_FUNCTION_DECL_P(DECL)\
@@ -230,78 +176,8 @@ extern const enum tree_code_class tree_code_type[];
 
 #define EXPR_P(NODE) IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (NODE)))
 
-/* Number of argument-words in each kind of tree-node.  */
-
-extern const unsigned char tree_code_length[];
 #define TREE_CODE_LENGTH(CODE) tree_code_length[(int) (CODE)]
 
-/* Names of tree components.  */
-
-extern const char *const tree_code_name[];
-
-/* When procesing aliases on symtab level, we need the declaration of target.
-   For this reason we need to queue aliases and process them after all declarations
-   has been produced.  */
-
-typedef struct GTY(()) alias_pair
-{
-  tree decl;
-  tree target;  
-} alias_pair;
-
-/* Define gc'd vector type.  */
-DEF_VEC_O(alias_pair);
-DEF_VEC_ALLOC_O(alias_pair,gc);
-
-extern GTY(()) VEC(alias_pair,gc) * alias_pairs;
-
-\f
-/* Classify which part of the compiler has defined a given builtin function.
-   Note that we assume below that this is no more than two bits.  */
-enum built_in_class
-{
-  NOT_BUILT_IN = 0,
-  BUILT_IN_FRONTEND,
-  BUILT_IN_MD,
-  BUILT_IN_NORMAL
-};
-
-/* Last marker used for LTO stremaing of built_in_class.  We can not add it
-   to the enum since we need the enumb to fit in 2 bits.  */
-#define BUILT_IN_LAST (BUILT_IN_NORMAL + 1)
-
-/* Names for the above.  */
-extern const char *const built_in_class_names[4];
-
-/* Codes that identify the various built in functions
-   so that expand_call can identify them quickly.  */
-
-#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) ENUM,
-enum built_in_function
-{
-#include "builtins.def"
-
-  /* Complex division routines in libgcc.  These are done via builtins
-     because emit_library_call_value can't handle complex values.  */
-  BUILT_IN_COMPLEX_MUL_MIN,
-  BUILT_IN_COMPLEX_MUL_MAX
-    = BUILT_IN_COMPLEX_MUL_MIN
-      + MAX_MODE_COMPLEX_FLOAT
-      - MIN_MODE_COMPLEX_FLOAT,
-
-  BUILT_IN_COMPLEX_DIV_MIN,
-  BUILT_IN_COMPLEX_DIV_MAX
-    = BUILT_IN_COMPLEX_DIV_MIN
-      + MAX_MODE_COMPLEX_FLOAT
-      - MIN_MODE_COMPLEX_FLOAT,
-
-  /* Upper bound on non-language-specific builtins.  */
-  END_BUILTINS
-};
-#undef DEF_BUILTIN
-
-/* Names for the above.  */
-extern const char * built_in_names[(int) END_BUILTINS];
 
 /* Helper macros for math builtins.  */
 
@@ -323,410 +199,7 @@ extern const char * built_in_names[(int) END_BUILTINS];
 
 #define CASE_FLT_FN(FN) case FN: case FN##F: case FN##L
 #define CASE_FLT_FN_REENT(FN) case FN##_R: case FN##F_R: case FN##L_R
-#define CASE_INT_FN(FN) case FN: case FN##L: case FN##LL
-\f
-/* In an OMP_CLAUSE node.  */
-
-/* Number of operands and names for each clause.  */
-extern unsigned const char omp_clause_num_ops[];
-extern const char * const omp_clause_code_name[];
-
-/* Clause codes.  Do not reorder, as this is used to index into the tables
-   omp_clause_num_ops and omp_clause_code_name.  */
-enum omp_clause_code
-{
-  /* Clause zero is special-cased inside the parser
-     (c_parser_omp_variable_list).  */
-  OMP_CLAUSE_ERROR = 0,
-
-  /* OpenMP clause: private (variable_list).  */
-  OMP_CLAUSE_PRIVATE,
-
-  /* OpenMP clause: shared (variable_list).  */
-  OMP_CLAUSE_SHARED,
-
-  /* OpenMP clause: firstprivate (variable_list).  */
-  OMP_CLAUSE_FIRSTPRIVATE,
-
-  /* OpenMP clause: lastprivate (variable_list).  */
-  OMP_CLAUSE_LASTPRIVATE,
-
-  /* OpenMP clause: reduction (operator:variable_list).
-     OMP_CLAUSE_REDUCTION_CODE: The tree_code of the operator.
-     Operand 1: OMP_CLAUSE_REDUCTION_INIT: Stmt-list to initialize the var.
-     Operand 2: OMP_CLAUSE_REDUCTION_MERGE: Stmt-list to merge private var
-                into the shared one.
-     Operand 3: OMP_CLAUSE_REDUCTION_PLACEHOLDER: A dummy VAR_DECL
-                placeholder used in OMP_CLAUSE_REDUCTION_{INIT,MERGE}.  */
-  OMP_CLAUSE_REDUCTION,
-
-  /* OpenMP clause: copyin (variable_list).  */
-  OMP_CLAUSE_COPYIN,
-
-  /* OpenMP clause: copyprivate (variable_list).  */
-  OMP_CLAUSE_COPYPRIVATE,
-
-  /* OpenMP clause: if (scalar-expression).  */
-  OMP_CLAUSE_IF,
-
-  /* OpenMP clause: num_threads (integer-expression).  */
-  OMP_CLAUSE_NUM_THREADS,
-
-  /* OpenMP clause: schedule.  */
-  OMP_CLAUSE_SCHEDULE,
-
-  /* OpenMP clause: nowait.  */
-  OMP_CLAUSE_NOWAIT,
-
-  /* OpenMP clause: ordered.  */
-  OMP_CLAUSE_ORDERED,
-
-  /* OpenMP clause: default.  */
-  OMP_CLAUSE_DEFAULT,
-
-  /* OpenMP clause: collapse (constant-integer-expression).  */
-  OMP_CLAUSE_COLLAPSE,
-
-  /* OpenMP clause: untied.  */
-  OMP_CLAUSE_UNTIED,
-
-  /* OpenMP clause: final (scalar-expression).  */
-  OMP_CLAUSE_FINAL,
-
-  /* OpenMP clause: mergeable.  */
-  OMP_CLAUSE_MERGEABLE
-};
-\f
-/* The definition of tree nodes fills the next several pages.  */
-
-/* A tree node can represent a data type, a variable, an expression
-   or a statement.  Each node has a TREE_CODE which says what kind of
-   thing it represents.  Some common codes are:
-   INTEGER_TYPE -- represents a type of integers.
-   ARRAY_TYPE -- represents a type of pointer.
-   VAR_DECL -- represents a declared variable.
-   INTEGER_CST -- represents a constant integer value.
-   PLUS_EXPR -- represents a sum (an expression).
-
-   As for the contents of a tree node: there are some fields
-   that all nodes share.  Each TREE_CODE has various special-purpose
-   fields as well.  The fields of a node are never accessed directly,
-   always through accessor macros.  */
-
-/* Every kind of tree node starts with this structure,
-   so all nodes have these fields.
-
-   See the accessor macros, defined below, for documentation of the
-   fields, and the table below which connects the fileds and the
-   accessor macros.  */
-
-struct GTY(()) tree_base {
-  ENUM_BITFIELD(tree_code) code : 16;
-
-  unsigned side_effects_flag : 1;
-  unsigned constant_flag : 1;
-  unsigned addressable_flag : 1;
-  unsigned volatile_flag : 1;
-  unsigned readonly_flag : 1;
-  unsigned asm_written_flag: 1;
-  unsigned nowarning_flag : 1;
-  unsigned visited : 1;
-
-  unsigned used_flag : 1;
-  unsigned nothrow_flag : 1;
-  unsigned static_flag : 1;
-  unsigned public_flag : 1;
-  unsigned private_flag : 1;
-  unsigned protected_flag : 1;
-  unsigned deprecated_flag : 1;
-  unsigned default_def_flag : 1;
-
-  union {
-    /* The bits in the following structure should only be used with
-       accessor macros that constrain inputs with tree checking.  */
-    struct {
-      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 saturating_flag : 1;
-
-      unsigned unsigned_flag : 1;
-      unsigned packed_flag : 1;
-      unsigned user_align : 1;
-      unsigned nameless_flag : 1;
-      unsigned spare0 : 4;
-
-      unsigned spare1 : 8;
-
-      /* This field is only used with TREE_TYPE nodes; the only reason it is
-        present in tree_base instead of tree_type is to save space.  The size
-        of the field must be large enough to hold addr_space_t values.  */
-      unsigned address_space : 8;
-    } bits;
-    /* The following fields are present in tree_base to save space.  The
-       nodes using them do not require any of the flags above and so can
-       make better use of the 4-byte sized word.  */
-    /* VEC length.  This field is only used with TREE_VEC.  */
-    int length;
-    /* SSA version number.  This field is only used with SSA_NAME.  */
-    unsigned int version;
-  } GTY((skip(""))) u;
-};
-
-/* The following table lists the uses of each of the above flags and
-   for which types of nodes they are defined.
-
-   addressable_flag:
-
-       TREE_ADDRESSABLE in
-           VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, LABEL_DECL
-           all types
-           CONSTRUCTOR, IDENTIFIER_NODE
-           STMT_EXPR, it means we want the result of the enclosed expression
-
-       CALL_EXPR_TAILCALL in
-           CALL_EXPR
-
-       CASE_LOW_SEEN in
-           CASE_LABEL_EXPR
-
-   static_flag:
-
-       TREE_STATIC in
-           VAR_DECL, FUNCTION_DECL
-           CONSTRUCTOR
-
-       TREE_NO_TRAMPOLINE in
-           ADDR_EXPR
-
-       BINFO_VIRTUAL_P in
-           TREE_BINFO
-
-       TREE_SYMBOL_REFERENCED in
-           IDENTIFIER_NODE
-
-       CLEANUP_EH_ONLY in
-           TARGET_EXPR, WITH_CLEANUP_EXPR
-
-       TRY_CATCH_IS_CLEANUP in
-           TRY_CATCH_EXPR
-
-       ASM_INPUT_P in
-           ASM_EXPR
-
-       TYPE_REF_CAN_ALIAS_ALL in
-           POINTER_TYPE, REFERENCE_TYPE
-
-       MOVE_NONTEMPORAL in
-           MODIFY_EXPR
-
-       CASE_HIGH_SEEN in
-           CASE_LABEL_EXPR
-
-       ENUM_IS_SCOPED in
-          ENUMERAL_TYPE
-
-       TRANSACTION_EXPR_OUTER in
-          TRANSACTION_EXPR
-
-   public_flag:
-
-       TREE_OVERFLOW in
-           INTEGER_CST, REAL_CST, COMPLEX_CST, VECTOR_CST
-
-       TREE_PUBLIC in
-           VAR_DECL, FUNCTION_DECL
-           IDENTIFIER_NODE
-
-       ASM_VOLATILE_P in
-           ASM_EXPR
-
-       CALL_EXPR_VA_ARG_PACK in
-           CALL_EXPR
-
-       TYPE_CACHED_VALUES_P in
-           all types
-
-       SAVE_EXPR_RESOLVED_P in
-           SAVE_EXPR
-
-       OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE in
-           OMP_CLAUSE_LASTPRIVATE
-
-       OMP_CLAUSE_PRIVATE_DEBUG in
-           OMP_CLAUSE_PRIVATE
-
-       TRANSACTION_EXPR_RELAXED in
-          TRANSACTION_EXPR
-
-   private_flag:
-
-       TREE_PRIVATE in
-           all decls
-
-       CALL_EXPR_RETURN_SLOT_OPT in
-           CALL_EXPR
-
-       OMP_SECTION_LAST in
-           OMP_SECTION
-
-       OMP_PARALLEL_COMBINED in
-           OMP_PARALLEL
-       OMP_CLAUSE_PRIVATE_OUTER_REF in
-          OMP_CLAUSE_PRIVATE
-
-       TYPE_REF_IS_RVALUE in
-          REFERENCE_TYPE
-
-   protected_flag:
-
-       TREE_PROTECTED in
-           BLOCK
-           all decls
-
-       CALL_FROM_THUNK_P and
-       CALL_ALLOCA_FOR_VAR_P in
-           CALL_EXPR
-
-   side_effects_flag:
-
-       TREE_SIDE_EFFECTS in
-           all expressions
-           all decls
-           all constants
-
-       FORCED_LABEL in
-           LABEL_DECL
-
-   volatile_flag:
-
-       TREE_THIS_VOLATILE in
-           all expressions
-           all decls
-
-       TYPE_VOLATILE in
-           all types
-
-   readonly_flag:
-
-       TREE_READONLY in
-           all expressions
-           all decls
-
-       TYPE_READONLY in
-           all types
-
-   constant_flag:
-
-       TREE_CONSTANT in
-           all expressions
-           all decls
-           all constants
-
-       TYPE_SIZES_GIMPLIFIED in
-           all types
-
-   unsigned_flag:
-
-       TYPE_UNSIGNED in
-           all types
-
-       DECL_UNSIGNED in
-           all decls
-
-   asm_written_flag:
-
-       TREE_ASM_WRITTEN in
-           VAR_DECL, FUNCTION_DECL, TYPE_DECL
-           RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
-           BLOCK, STRING_CST
-
-       SSA_NAME_OCCURS_IN_ABNORMAL_PHI in
-           SSA_NAME
-
-   used_flag:
-
-       TREE_USED in
-           all expressions
-           all decls
-           IDENTIFIER_NODE
-
-   nothrow_flag:
-
-       TREE_NOTHROW in
-           CALL_EXPR
-           FUNCTION_DECL
-
-       TYPE_ALIGN_OK in
-           all types
-
-       TREE_THIS_NOTRAP in
-          INDIRECT_REF, MEM_REF, TARGET_MEM_REF, ARRAY_REF, ARRAY_RANGE_REF
-
-       SSA_NAME_IN_FREELIST in
-          SSA_NAME
-
-   deprecated_flag:
-
-       TREE_DEPRECATED in
-           all decls
-          all types
-
-       IDENTIFIER_TRANSPARENT_ALIAS in
-           IDENTIFIER_NODE
-
-   visited:
-
-       TREE_VISITED in
-           all trees (used liberally by many passes)
-
-   saturating_flag:
-
-       TYPE_SATURATING in
-           all types
-
-       VAR_DECL_IS_VIRTUAL_OPERAND in
-          VAR_DECL
-
-   nowarning_flag:
-
-       TREE_NO_WARNING in
-           all expressions
-           all decls
-
-       TYPE_ARTIFICIAL in
-           all types
-
-   default_def_flag:
-
-       TYPE_VECTOR_OPAQUE in
-          VECTOR_TYPE
-
-       SSA_NAME_IS_DEFAULT_DEF in
-           SSA_NAME
-*/
-
-struct GTY(()) tree_typed {
-  struct tree_base base;
-  tree type;
-};
-
-struct GTY(()) tree_common {
-  struct tree_typed typed;
-  tree chain;
-};
-
-#undef DEFTREESTRUCT
-#define DEFTREESTRUCT(ENUM, NAME) ENUM,
-enum tree_node_structure_enum {
-#include "treestruct.def"
-  LAST_TS_ENUM
-};
-#undef DEFTREESTRUCT
+#define CASE_INT_FN(FN) case FN: case FN##L: case FN##LL: case FN##IMAX
 
 /* Define accessors for the fields that all tree nodes have
    (though some fields are not used for all kinds of nodes).  */
@@ -903,7 +376,8 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 
 #endif
 
-#define TREE_BLOCK(NODE)               *(tree_block (NODE))
+#define TREE_BLOCK(NODE)               (tree_block (NODE))
+#define TREE_SET_BLOCK(T, B)           (tree_set_block ((T), (B)))
 
 #include "tree-check.h"
 
@@ -977,6 +451,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 #define STRIP_USELESS_TYPE_CONVERSION(EXP) \
   (EXP) = tree_ssa_strip_useless_type_conversions (EXP)
 
+/* Nonzero if TYPE represents a vector type.  */
+
+#define VECTOR_TYPE_P(TYPE) (TREE_CODE (TYPE) == VECTOR_TYPE)
+
 /* Nonzero if TYPE represents an integral type.  Note that we do not
    include COMPLEX types here.  Keep these checks in ascending code
    order.  */
@@ -1012,15 +490,15 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 
 /* Nonzero if TYPE represents a vector integer type.  */
                 
-#define VECTOR_INTEGER_TYPE_P(TYPE)                   \
-             (TREE_CODE (TYPE) == VECTOR_TYPE      \
-                 && TREE_CODE (TREE_TYPE (TYPE)) == INTEGER_TYPE)
+#define VECTOR_INTEGER_TYPE_P(TYPE)                    \
+  (VECTOR_TYPE_P (TYPE)                                        \
+   && TREE_CODE (TREE_TYPE (TYPE)) == INTEGER_TYPE)
 
 
 /* Nonzero if TYPE represents a vector floating-point type.  */
 
 #define VECTOR_FLOAT_TYPE_P(TYPE)      \
-  (TREE_CODE (TYPE) == VECTOR_TYPE     \
+  (VECTOR_TYPE_P (TYPE)                        \
    && TREE_CODE (TREE_TYPE (TYPE)) == REAL_TYPE)
 
 /* Nonzero if TYPE represents a floating-point type, including complex
@@ -1030,7 +508,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 #define FLOAT_TYPE_P(TYPE)                     \
   (SCALAR_FLOAT_TYPE_P (TYPE)                  \
    || ((TREE_CODE (TYPE) == COMPLEX_TYPE       \
-        || TREE_CODE (TYPE) == VECTOR_TYPE)    \
+        || VECTOR_TYPE_P (TYPE))               \
        && SCALAR_FLOAT_TYPE_P (TREE_TYPE (TYPE))))
 
 /* Nonzero if TYPE represents a decimal floating-point type.  */
@@ -1057,6 +535,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 #define POINTER_TYPE_P(TYPE) \
   (TREE_CODE (TYPE) == POINTER_TYPE || TREE_CODE (TYPE) == REFERENCE_TYPE)
 
+/* Nonzero if TYPE represents a pointer to function.  */
+#define FUNCTION_POINTER_TYPE_P(TYPE) \
+  (POINTER_TYPE_P (TYPE) && TREE_CODE (TREE_TYPE (TYPE)) == FUNCTION_TYPE)
+
 /* Nonzero if this type is a complete type.  */
 #define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE)
 
@@ -1077,15 +559,18 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 /* In VAR_DECL, PARM_DECL and RESULT_DECL nodes, nonzero means address
    of this is needed.  So it cannot be in a register.
    In a FUNCTION_DECL it has no meaning.
-   In CONSTRUCTOR nodes, it means object constructed must be in memory.
    In LABEL_DECL nodes, it means a goto for this label has been seen
    from a place outside all binding contours that restore stack levels.
+   In an artificial SSA_NAME that points to a stack partition with at least
+   two variables, it means that at least one variable has TREE_ADDRESSABLE.
    In ..._TYPE nodes, it means that objects of this type must be fully
    addressable.  This means that pieces of this object cannot go into
    register parameters, for example.  If this a function type, this
    means that the value must be returned in memory.
+   In CONSTRUCTOR nodes, it means object constructed must be in memory.
    In IDENTIFIER_NODEs, this means that some extern decl for this name
-   had its address taken.  That matters for inline functions.  */
+   had its address taken.  That matters for inline functions.
+   In a STMT_EXPR, it means we want the result of the enclosed expression.  */
 #define TREE_ADDRESSABLE(NODE) ((NODE)->base.addressable_flag)
 
 /* Set on a CALL_EXPR if the call is in a tail position, ie. just before the
@@ -1155,10 +640,6 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 #define TYPE_REF_CAN_ALIAS_ALL(NODE) \
   (PTR_OR_REF_CHECK (NODE)->base.static_flag)
 
-/* In a MODIFY_EXPR, means that the store in the expression is nontemporal.  */
-#define MOVE_NONTEMPORAL(NODE) \
-  (EXPR_CHECK (NODE)->base.static_flag)
-
 /* In an INTEGER_CST, REAL_CST, COMPLEX_CST, or VECTOR_CST, this means
    there was an overflow in folding.  */
 
@@ -1298,7 +779,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
    throw an exception.  In a CALL_EXPR, nonzero means the call cannot
    throw.  We can't easily check the node type here as the C++
    frontend also uses this flag (for AGGR_INIT_EXPR).  */
-#define TREE_NOTHROW(NODE) (TREE_NOT_CHECK (NODE, TREE_VEC)->base.nothrow_flag)
+#define TREE_NOTHROW(NODE) ((NODE)->base.nothrow_flag)
 
 /* In a CALL_EXPR, means that it's safe to use the target of the call
    expansion as the return slot for a call that returns in memory.  */
@@ -1312,18 +793,13 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
   (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \
                RESULT_DECL)->decl_common.decl_by_reference_flag)
 
-/* In a RESULT_DECL, PARM_DECL and VAR_DECL, means that this decl
-   can be used as restricted tag to disambiguate against other restrict
-   pointers.  Used by fortran to capture something like non-addressability
-   (which it isn't really because the middle-end does take addresses of
-   such variables).  */
-#define DECL_RESTRICTED_P(NODE) \
-  (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \
-               RESULT_DECL)->decl_common.decl_restricted_flag)
-
+/* In VAR_DECL and PARM_DECL, set when the decl has been used except for
+   being set.  */
 #define DECL_READ_P(NODE) \
   (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_read_flag)
 
+/* In VAR_DECL or RESULT_DECL, set when significant code movement precludes
+   attempting to share the stack slot with some other variable.  */
 #define DECL_NONSHAREABLE(NODE) \
   (TREE_CHECK2 (NODE, VAR_DECL, \
                RESULT_DECL)->decl_common.decl_nonshareable_flag)
@@ -1408,70 +884,28 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
        == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B))      \
        && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B)))
 
-struct GTY(()) tree_int_cst {
-  struct tree_typed typed;
-  double_int int_cst;
-};
-
-/* In a REAL_CST node.  struct real_value is an opaque entity, with
-   manipulators defined in real.h.  We don't want tree.h depending on
-   real.h and transitively on tm.h.  */
-struct real_value;
-
 #define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr)
 #define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE))
 
-struct GTY(()) tree_real_cst {
-  struct tree_typed typed;
-  struct real_value * real_cst_ptr;
-};
-
-/* In a FIXED_CST node.  */
-struct fixed_value;
-
 #define TREE_FIXED_CST_PTR(NODE) \
   (FIXED_CST_CHECK (NODE)->fixed_cst.fixed_cst_ptr)
 #define TREE_FIXED_CST(NODE) (*TREE_FIXED_CST_PTR (NODE))
 
-struct GTY(()) tree_fixed_cst {
-  struct tree_typed typed;
-  struct fixed_value * fixed_cst_ptr;
-};
-
 /* In a STRING_CST */
 /* In C terms, this is sizeof, not strlen.  */
 #define TREE_STRING_LENGTH(NODE) (STRING_CST_CHECK (NODE)->string.length)
 #define TREE_STRING_POINTER(NODE) \
   ((const char *)(STRING_CST_CHECK (NODE)->string.str))
 
-struct GTY(()) tree_string {
-  struct tree_typed typed;
-  int length;
-  char str[1];
-};
-
 /* In a COMPLEX_CST node.  */
 #define TREE_REALPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.real)
 #define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag)
 
-struct GTY(()) tree_complex {
-  struct tree_typed typed;
-  tree real;
-  tree imag;
-};
-
 /* In a VECTOR_CST node.  */
 #define VECTOR_CST_NELTS(NODE) (TYPE_VECTOR_SUBPARTS (TREE_TYPE (NODE)))
 #define VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elts)
 #define VECTOR_CST_ELT(NODE,IDX) (VECTOR_CST_CHECK (NODE)->vector.elts[IDX])
 
-struct GTY(()) tree_vector {
-  struct tree_typed typed;
-  tree GTY ((length ("TYPE_VECTOR_SUBPARTS (TREE_TYPE ((tree)&%h))"))) elts[1];
-};
-\f
-#include "symtab.h"
-
 /* Define fields and accessors for some special-purpose tree nodes.  */
 
 #define IDENTIFIER_LENGTH(NODE) \
@@ -1488,21 +922,10 @@ struct GTY(()) tree_vector {
   ((tree) ((char *) (NODE) - sizeof (struct tree_common)))
 #define GCC_IDENT_TO_HT_IDENT(NODE) (&((struct tree_identifier *) (NODE))->id)
 
-struct GTY(()) tree_identifier {
-  struct tree_common common;
-  struct ht_identifier id;
-};
-
 /* In a TREE_LIST node.  */
 #define TREE_PURPOSE(NODE) (TREE_LIST_CHECK (NODE)->list.purpose)
 #define TREE_VALUE(NODE) (TREE_LIST_CHECK (NODE)->list.value)
 
-struct GTY(()) tree_list {
-  struct tree_common common;
-  tree purpose;
-  tree value;
-};
-
 /* In a TREE_VEC node.  */
 #define TREE_VEC_LENGTH(NODE) (TREE_VEC_CHECK (NODE)->base.u.length)
 #define TREE_VEC_END(NODE) \
@@ -1510,25 +933,20 @@ struct GTY(()) tree_list {
 
 #define TREE_VEC_ELT(NODE,I) TREE_VEC_ELT_CHECK (NODE, I)
 
-struct GTY(()) tree_vec {
-  struct tree_common common;
-  tree GTY ((length ("TREE_VEC_LENGTH ((tree)&%h)"))) a[1];
-};
-
 /* In a CONSTRUCTOR node.  */
 #define CONSTRUCTOR_ELTS(NODE) (CONSTRUCTOR_CHECK (NODE)->constructor.elts)
 #define CONSTRUCTOR_ELT(NODE,IDX) \
-  (&VEC_index (constructor_elt, CONSTRUCTOR_ELTS (NODE), IDX))
+  (&(*CONSTRUCTOR_ELTS (NODE))[IDX])
 #define CONSTRUCTOR_NELTS(NODE) \
-  (VEC_length (constructor_elt, CONSTRUCTOR_ELTS (NODE)))
+  (vec_safe_length (CONSTRUCTOR_ELTS (NODE)))
 
 /* Iterate through the vector V of CONSTRUCTOR_ELT elements, yielding the
    value of each element (stored within VAL). IX must be a scratch variable
    of unsigned integer type.  */
 #define FOR_EACH_CONSTRUCTOR_VALUE(V, IX, VAL) \
-  for (IX = 0; (IX >= VEC_length (constructor_elt, V)) \
+  for (IX = 0; (IX >= vec_safe_length (V)) \
               ? false \
-              : ((VAL = VEC_index (constructor_elt, V, IX).value), \
+              : ((VAL = (*(V))[IX].value), \
               true); \
        (IX)++)
 
@@ -1536,19 +954,18 @@ struct GTY(()) tree_vec {
    the value of each element (stored within VAL) and its index (stored
    within INDEX). IX must be a scratch variable of unsigned integer type.  */
 #define FOR_EACH_CONSTRUCTOR_ELT(V, IX, INDEX, VAL) \
-  for (IX = 0; (IX >= VEC_length (constructor_elt, V)) \
+  for (IX = 0; (IX >= vec_safe_length (V)) \
               ? false \
-              : (((void) (VAL = VEC_index (constructor_elt, V, IX).value)), \
-                 (INDEX = VEC_index (constructor_elt, V, IX).index), \
+              : (((void) (VAL = (*V)[IX].value)), \
+                 (INDEX = (*V)[IX].index), \
                  true); \
        (IX)++)
 
 /* Append a new constructor element to V, with the specified INDEX and VAL.  */
 #define CONSTRUCTOR_APPEND_ELT(V, INDEX, VALUE) \
   do { \
-    constructor_elt *_ce___ = VEC_safe_push (constructor_elt, gc, V, NULL); \
-    _ce___->index = INDEX; \
-    _ce___->value = VALUE; \
+    constructor_elt _ce___ = {INDEX, VALUE}; \
+    vec_safe_push ((V), _ce___); \
   } while (0)
 
 /* True if NODE, a FIELD_DECL, is to be processed as a bitfield for
@@ -1564,23 +981,6 @@ struct GTY(()) tree_vec {
 #define TREE_CLOBBER_P(NODE) \
   (TREE_CODE (NODE) == CONSTRUCTOR && TREE_THIS_VOLATILE (NODE))
 
-/* A single element of a CONSTRUCTOR. VALUE holds the actual value of the
-   element. INDEX can optionally design the position of VALUE: in arrays,
-   it is the index where VALUE has to be placed; in structures, it is the
-   FIELD_DECL of the member.  */
-typedef struct GTY(()) constructor_elt_d {
-  tree index;
-  tree value;
-} constructor_elt;
-
-DEF_VEC_O(constructor_elt);
-DEF_VEC_ALLOC_O(constructor_elt,gc);
-
-struct GTY(()) tree_constructor {
-  struct tree_typed typed;
-  VEC(constructor_elt,gc) *elts;
-};
-
 /* Define fields and accessors for some nodes that represent expressions.  */
 
 /* Nonzero if NODE is an empty statement (NOP_EXPR <0>).  */
@@ -1612,10 +1012,14 @@ struct GTY(()) tree_constructor {
 #define EXPR_LOCATION(NODE) \
   (CAN_HAVE_LOCATION_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION)
 #define SET_EXPR_LOCATION(NODE, LOCUS) EXPR_CHECK ((NODE))->exp.locus = (LOCUS)
-#define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION)
+#define EXPR_HAS_LOCATION(NODE) (LOCATION_LOCUS (EXPR_LOCATION (NODE)) \
+  != UNKNOWN_LOCATION)
 /* The location to be used in a diagnostic about this expression.  Do not
    use this macro if the location will be assigned to other expressions.  */
-#define EXPR_LOC_OR_HERE(NODE) (EXPR_HAS_LOCATION (NODE) ? (NODE)->exp.locus : input_location)
+#define EXPR_LOC_OR_HERE(NODE) (EXPR_HAS_LOCATION (NODE) \
+                               ? (NODE)->exp.locus : input_location)
+#define EXPR_LOC_OR_LOC(NODE, LOCUS) (EXPR_HAS_LOCATION (NODE) \
+                                     ? (NODE)->exp.locus : (LOCUS))
 #define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus)
 #define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus)
 
@@ -1789,9 +1193,10 @@ extern void protected_set_expr_location (tree, location_t);
 #define OMP_CLAUSE_DECL(NODE)                                          \
   OMP_CLAUSE_OPERAND (OMP_CLAUSE_RANGE_CHECK (OMP_CLAUSE_CHECK (NODE), \
                                              OMP_CLAUSE_PRIVATE,       \
-                                             OMP_CLAUSE_COPYPRIVATE), 0)
+                                             OMP_CLAUSE_UNIFORM), 0)
 #define OMP_CLAUSE_HAS_LOCATION(NODE) \
-  ((OMP_CLAUSE_CHECK (NODE))->omp_clause.locus != UNKNOWN_LOCATION)
+  (LOCATION_LOCUS ((OMP_CLAUSE_CHECK (NODE))->omp_clause.locus)                \
+  != UNKNOWN_LOCATION)
 #define OMP_CLAUSE_LOCATION(NODE)  (OMP_CLAUSE_CHECK (NODE))->omp_clause.locus
 
 /* True on an OMP_SECTION statement that was the last lexical member.
@@ -1855,39 +1260,31 @@ extern void protected_set_expr_location (tree, location_t);
 #define OMP_CLAUSE_REDUCTION_PLACEHOLDER(NODE) \
   OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_REDUCTION), 3)
 
-enum omp_clause_schedule_kind
-{
-  OMP_CLAUSE_SCHEDULE_STATIC,
-  OMP_CLAUSE_SCHEDULE_DYNAMIC,
-  OMP_CLAUSE_SCHEDULE_GUIDED,
-  OMP_CLAUSE_SCHEDULE_AUTO,
-  OMP_CLAUSE_SCHEDULE_RUNTIME
-};
+/* True if a LINEAR clause doesn't need copy in.  True for iterator vars which
+   are always initialized inside of the loop construct, false otherwise.  */
+#define OMP_CLAUSE_LINEAR_NO_COPYIN(NODE) \
+  (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_LINEAR)->base.public_flag)
+
+/* True if a LINEAR clause doesn't need copy out.  True for iterator vars which
+   are declared inside of the simd construct.  */
+#define OMP_CLAUSE_LINEAR_NO_COPYOUT(NODE) \
+  TREE_PRIVATE (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_LINEAR))
+
+#define OMP_CLAUSE_LINEAR_STEP(NODE) \
+  OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_LINEAR), 1)
+
+#define OMP_CLAUSE_SAFELEN_EXPR(NODE) \
+  OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_SAFELEN), 0)
+
+#define OMP_CLAUSE__SIMDUID__DECL(NODE) \
+  OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE__SIMDUID_), 0)
 
 #define OMP_CLAUSE_SCHEDULE_KIND(NODE) \
   (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_SCHEDULE)->omp_clause.subcode.schedule_kind)
 
-enum omp_clause_default_kind
-{
-  OMP_CLAUSE_DEFAULT_UNSPECIFIED,
-  OMP_CLAUSE_DEFAULT_SHARED,
-  OMP_CLAUSE_DEFAULT_NONE,
-  OMP_CLAUSE_DEFAULT_PRIVATE,
-  OMP_CLAUSE_DEFAULT_FIRSTPRIVATE
-};
-
 #define OMP_CLAUSE_DEFAULT_KIND(NODE) \
   (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_DEFAULT)->omp_clause.subcode.default_kind)
 
-struct GTY(()) tree_exp {
-  struct tree_typed typed;
-  location_t locus;
-  tree block;
-  tree GTY ((special ("tree_exp"),
-            desc ("TREE_CODE ((tree) &%0)")))
-    operands[1];
-};
-\f
 /* SSA_NAME accessors.  */
 
 /* Returns the IDENTIFIER_NODE giving the SSA name a name or NULL_TREE
@@ -1941,51 +1338,9 @@ struct GTY(()) tree_exp {
 #define SSA_NAME_PTR_INFO(N) \
     SSA_NAME_CHECK (N)->ssa_name.ptr_info
 
-/* Defined in tree-flow.h.  */
-struct ptr_info_def;
-
-/* Immediate use linking structure.  This structure is used for maintaining
-   a doubly linked list of uses of an SSA_NAME.  */
-typedef struct GTY(()) ssa_use_operand_d {
-  struct ssa_use_operand_d* GTY((skip(""))) prev;
-  struct ssa_use_operand_d* GTY((skip(""))) next;
-  /* Immediate uses for a given SSA name are maintained as a cyclic
-     list.  To recognize the root of this list, the location field
-     needs to point to the original SSA name.  Since statements and
-     SSA names are of different data types, we need this union.  See
-     the explanation in struct immediate_use_iterator_d.  */
-  union { gimple stmt; tree ssa_name; } GTY((skip(""))) loc;
-  tree *GTY((skip(""))) use;
-} ssa_use_operand_t;
-
 /* Return the immediate_use information for an SSA_NAME. */
 #define SSA_NAME_IMM_USE_NODE(NODE) SSA_NAME_CHECK (NODE)->ssa_name.imm_uses
 
-struct GTY(()) tree_ssa_name {
-  struct tree_typed typed;
-
-  /* _DECL wrapped by this SSA name.  */
-  tree var;
-
-  /* Statement that defines this SSA name.  */
-  gimple def_stmt;
-
-  /* Pointer attributes used for alias analysis.  */
-  struct ptr_info_def *ptr_info;
-
-  /* Immediate uses list for this SSA_NAME.  */
-  struct ssa_use_operand_d imm_uses;
-};
-\f
-struct GTY(()) phi_arg_d {
-  /* imm_use MUST be the first element in struct because we do some
-     pointer arithmetic with it.  See phi_arg_index_from_use.  */
-  struct ssa_use_operand_d imm_use;
-  tree def;
-  location_t locus;
-};
-
-\f
 #define OMP_CLAUSE_CODE(NODE)                                  \
        (OMP_CLAUSE_CHECK (NODE))->omp_clause.code
 
@@ -1998,33 +1353,13 @@ struct GTY(()) phi_arg_d {
 #define OMP_CLAUSE_OPERAND(NODE, I)                            \
        OMP_CLAUSE_ELT_CHECK (NODE, I)
 
-struct GTY(()) tree_omp_clause {
-  struct tree_common common;
-  location_t locus;
-  enum omp_clause_code code;
-  union omp_clause_subcode {
-    enum omp_clause_default_kind  default_kind;
-    enum omp_clause_schedule_kind schedule_kind;
-    enum tree_code                reduction_code;
-  } GTY ((skip)) subcode;
-
-  /* The gimplification of OMP_CLAUSE_REDUCTION_{INIT,MERGE} for omp-low's
-     usage.  */
-  gimple_seq gimple_reduction_init;
-  gimple_seq gimple_reduction_merge;
-
-  tree GTY ((length ("omp_clause_num_ops[OMP_CLAUSE_CODE ((tree)&%h)]"))) ops[1];
-};
-\f
-
 /* In a BLOCK node.  */
 #define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars)
 #define BLOCK_NONLOCALIZED_VARS(NODE) \
   (BLOCK_CHECK (NODE)->block.nonlocalized_vars)
 #define BLOCK_NUM_NONLOCALIZED_VARS(NODE) \
-  VEC_length (tree, BLOCK_NONLOCALIZED_VARS (NODE))
-#define BLOCK_NONLOCALIZED_VAR(NODE,N) \
-  VEC_index (tree, BLOCK_NONLOCALIZED_VARS (NODE), N)
+  vec_safe_length (BLOCK_NONLOCALIZED_VARS (NODE))
+#define BLOCK_NONLOCALIZED_VAR(NODE,N) (*BLOCK_NONLOCALIZED_VARS (NODE))[N]
 #define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks)
 #define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext)
 #define BLOCK_CHAIN(NODE) (BLOCK_CHECK (NODE)->block.chain)
@@ -2070,25 +1405,6 @@ struct GTY(()) tree_omp_clause {
 
 #define BLOCK_SOURCE_LOCATION(NODE) (BLOCK_CHECK (NODE)->block.locus)
 
-struct GTY(()) tree_block {
-  struct tree_base base;
-  tree chain;
-
-  unsigned abstract_flag : 1;
-  unsigned block_num : 31;
-
-  location_t locus;
-
-  tree vars;
-  VEC(tree,gc) *nonlocalized_vars;
-
-  tree subblocks;
-  tree supercontext;
-  tree abstract_origin;
-  tree fragment_origin;
-  tree fragment_chain;
-};
-\f
 /* Define fields and accessors for nodes representing data types.  */
 
 /* See tree.def for documentation of the use of these fields.
@@ -2114,7 +1430,7 @@ struct GTY(()) tree_block {
 /* Vector types need to check target flags to determine type.  */
 extern enum machine_mode vector_type_mode (const_tree);
 #define TYPE_MODE(NODE) \
-  (TREE_CODE (TYPE_CHECK (NODE)) == VECTOR_TYPE \
+  (VECTOR_TYPE_P (TYPE_CHECK (NODE)) \
    ? vector_type_mode (NODE) : (NODE)->type_common.mode)
 #define SET_TYPE_MODE(NODE, MODE) \
   (TYPE_CHECK (NODE)->type_common.mode = (MODE))
@@ -2186,8 +1502,8 @@ extern enum machine_mode vector_type_mode (const_tree);
    get one debug info record for them.  */
 #define TYPE_STUB_DECL(NODE) (TREE_CHAIN (TYPE_CHECK (NODE)))
 
-/* In a RECORD_TYPE, UNION_TYPE or QUAL_UNION_TYPE, it means the type
-   has BLKmode only because it lacks the alignment requirement for
+/* In a RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE or ARRAY_TYPE, it means
+   the type has BLKmode only because it lacks the alignment required for
    its size.  */
 #define TYPE_NO_FORCE_BLK(NODE) \
   (TYPE_CHECK (NODE)->type_common.no_force_blk_flag)
@@ -2208,17 +1524,6 @@ extern enum machine_mode vector_type_mode (const_tree);
 /* The address space the type is in.  */
 #define TYPE_ADDR_SPACE(NODE) (TYPE_CHECK (NODE)->base.u.bits.address_space)
 
-/* There is a TYPE_QUAL value for each type qualifier.  They can be
-   combined by bitwise-or to form the complete set of qualifiers for a
-   type.  */
-enum cv_qualifier
-  {
-    TYPE_UNQUALIFIED   = 0x0,
-    TYPE_QUAL_CONST    = 0x1,
-    TYPE_QUAL_VOLATILE = 0x2,
-    TYPE_QUAL_RESTRICT = 0x4
-  };
-
 /* Encode/decode the named memory support as part of the qualifier.  If more
    than 8 qualifiers are added, these macros need to be adjusted.  */
 #define ENCODE_QUAL_ADDR_SPACE(NUM) ((NUM & 0xFF) << 8)
@@ -2304,6 +1609,10 @@ enum cv_qualifier
 #define TYPE_CONTAINS_PLACEHOLDER_INTERNAL(NODE) \
   (TYPE_CHECK (NODE)->type_common.contains_placeholder_bits)
 
+/* Nonzero if RECORD_TYPE represents a final derivation of class.  */
+#define TYPE_FINAL_P(NODE) \
+  (RECORD_OR_UNION_CHECK (NODE)->base.default_def_flag)
+
 /* The debug output functions use the symtab union field to store
    information specific to the debugging format.  The different debug
    output hooks store different types in the union field.  These three
@@ -2334,58 +1643,9 @@ enum cv_qualifier
 #define TYPE_SYMTAB_IS_POINTER (1)
 #define TYPE_SYMTAB_IS_DIE (2)
 
-struct die_struct;
-
-struct GTY(()) tree_type_common {
-  struct tree_common common;
-  tree size;
-  tree size_unit;
-  tree attributes;
-  unsigned int uid;
-
-  unsigned int precision : 10;
-  unsigned no_force_blk_flag : 1;
-  unsigned needs_constructing_flag : 1;
-  unsigned transparent_aggr_flag : 1;
-  unsigned restrict_flag : 1;
-  unsigned contains_placeholder_bits : 2;
-
-  ENUM_BITFIELD(machine_mode) mode : 8;
-
-  unsigned string_flag : 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 int align;
-  alias_set_type alias_set;
-  tree pointer_to;
-  tree reference_to;
-  union tree_type_symtab {
-    int GTY ((tag ("TYPE_SYMTAB_IS_ADDRESS"))) address;
-    const char * GTY ((tag ("TYPE_SYMTAB_IS_POINTER"))) pointer;
-    struct die_struct * GTY ((tag ("TYPE_SYMTAB_IS_DIE"))) die;
-  } GTY ((desc ("debug_hooks->tree_type_symtab_field"))) symtab;
-  tree name;
-  tree next_variant;
-  tree main_variant;
-  tree context;
-  tree canonical;
-};
-
 #define TYPE_LANG_SPECIFIC(NODE) \
   (TYPE_CHECK (NODE)->type_with_lang_specific.lang_specific)
 
-struct GTY(()) tree_type_with_lang_specific {
-  struct tree_type_common common;
-  /* Points to a structure whose details depend on the language in use.  */
-  struct lang_type *lang_specific;
-};
-
 #define TYPE_VALUES(NODE) (ENUMERAL_TYPE_CHECK (NODE)->type_non_common.values)
 #define TYPE_DOMAIN(NODE) (ARRAY_TYPE_CHECK (NODE)->type_non_common.values)
 #define TYPE_FIELDS(NODE) \
@@ -2428,14 +1688,6 @@ struct GTY(()) tree_type_with_lang_specific {
 #define TYPE_LANG_SLOT_1(NODE) \
   (NOT_RECORD_OR_UNION_CHECK(NODE)->type_non_common.binfo)
 
-struct GTY(()) tree_type_non_common {
-  struct tree_type_with_lang_specific with_lang_specific;
-  tree values;
-  tree minval;
-  tree maxval;
-  tree binfo;
-};
-\f
 /* Define accessor macros for information about type inheritance
    and basetypes.
 
@@ -2497,15 +1749,15 @@ struct GTY(()) tree_type_non_common {
 #define BINFO_BASE_BINFOS(NODE) (&TREE_BINFO_CHECK(NODE)->binfo.base_binfos)
 
 /* The number of basetypes for NODE.  */
-#define BINFO_N_BASE_BINFOS(NODE) (VEC_length (tree, BINFO_BASE_BINFOS (NODE)))
+#define BINFO_N_BASE_BINFOS(NODE) (BINFO_BASE_BINFOS (NODE)->length ())
 
 /* Accessor macro to get to the Nth base binfo of this binfo.  */
 #define BINFO_BASE_BINFO(NODE,N) \
- (VEC_index (tree, BINFO_BASE_BINFOS (NODE), (N)))
+ ((*BINFO_BASE_BINFOS (NODE))[(N)])
 #define BINFO_BASE_ITERATE(NODE,N,B) \
- (VEC_iterate (tree, BINFO_BASE_BINFOS (NODE), (N), (B)))
+ (BINFO_BASE_BINFOS (NODE)->iterate ((N), &(B)))
 #define BINFO_BASE_APPEND(NODE,T) \
- (VEC_quick_push (tree, BINFO_BASE_BINFOS (NODE), (T)))
+ (BINFO_BASE_BINFOS (NODE)->quick_push ((T)))
 
 /* For a BINFO record describing a virtual base class, i.e., one where
    TREE_VIA_VIRTUAL is set, this field assists in locating the virtual
@@ -2520,9 +1772,9 @@ struct GTY(()) tree_type_non_common {
 #define BINFO_BASE_ACCESSES(NODE) (TREE_BINFO_CHECK(NODE)->binfo.base_accesses)
 
 #define BINFO_BASE_ACCESS(NODE,N) \
-  VEC_index (tree, BINFO_BASE_ACCESSES (NODE), (N))
+  (*BINFO_BASE_ACCESSES (NODE))[(N)]
 #define BINFO_BASE_ACCESS_APPEND(NODE,T) \
-  VEC_quick_push (tree, BINFO_BASE_ACCESSES (NODE), (T))
+  BINFO_BASE_ACCESSES (NODE)->quick_push ((T))
 
 /* The index in the VTT where this subobject's sub-VTT can be found.
    NULL_TREE if there is no sub-VTT.  */
@@ -2539,23 +1791,7 @@ struct GTY(()) tree_type_non_common {
 #define BINFO_INHERITANCE_CHAIN(NODE) \
        (TREE_BINFO_CHECK(NODE)->binfo.inheritance)
 
-struct GTY (()) tree_binfo {
-  struct tree_common common;
-
-  tree offset;
-  tree vtable;
-  tree virtuals;
-  tree vptr_field;
-  VEC(tree,gc) *base_accesses;
-  tree inheritance;
-
-  tree vtt_subvtt;
-  tree vtt_vptr;
-
-  VEC(tree,none) base_binfos;
-};
 
-\f
 /* Define fields and accessors for nodes representing declared names.  */
 
 /* Nonzero if DECL represents an SSA name or a variable that can possibly
@@ -2567,21 +1803,6 @@ struct GTY (()) tree_binfo {
         || TREE_CODE (DECL) == SSA_NAME)
 
 
-
-/* Enumerate visibility settings.  */
-#ifndef SYMBOL_VISIBILITY_DEFINED
-#define SYMBOL_VISIBILITY_DEFINED
-enum symbol_visibility
-{
-  VISIBILITY_DEFAULT,
-  VISIBILITY_PROTECTED,
-  VISIBILITY_HIDDEN,
-  VISIBILITY_INTERNAL
-};
-#endif
-
-struct function;
-
 #define DECL_CHAIN(NODE) (TREE_CHAIN (DECL_MINIMAL_CHECK (NODE)))
 
 /* This is the name of the object as written by the user.
@@ -2617,8 +1838,11 @@ struct function;
 #define DECL_SOURCE_FILE(NODE) LOCATION_FILE (DECL_SOURCE_LOCATION (NODE))
 #define DECL_SOURCE_LINE(NODE) LOCATION_LINE (DECL_SOURCE_LOCATION (NODE))
 #define DECL_SOURCE_COLUMN(NODE) LOCATION_COLUMN (DECL_SOURCE_LOCATION (NODE))
+/* This accessor returns TRUE if the decl it operates on was created
+   by a front-end or back-end rather than by user code.  In this case
+   builtin-ness is indicated by source location.  */
 #define DECL_IS_BUILTIN(DECL) \
-  (DECL_SOURCE_LOCATION (DECL) <= BUILTINS_LOCATION)
+  (LOCATION_LOCUS (DECL_SOURCE_LOCATION (DECL)) <= BUILTINS_LOCATION)
 
 /*  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,
@@ -2636,15 +1860,6 @@ struct function;
 /* If nonzero, decl's name shouldn't be emitted into debug info.  */
 #define DECL_NAMELESS(NODE) (DECL_MINIMAL_CHECK (NODE)->base.u.bits.nameless_flag)
 
-struct GTY(()) tree_decl_minimal {
-  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 inlined/cloned instance of, or else it
    is NULL indicating that this decl is not an instance of some other decl.
@@ -2707,8 +1922,6 @@ struct GTY(()) tree_decl_minimal {
    checked before any access to the former.  */
 #define DECL_FUNCTION_CODE(NODE) \
   (FUNCTION_DECL_CHECK (NODE)->function_decl.function_code)
-#define DECL_DEBUG_EXPR_IS_FROM(NODE) \
-  (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from)
 
 #define DECL_FUNCTION_PERSONALITY(NODE) \
   (FUNCTION_DECL_CHECK (NODE)->function_decl.personality)
@@ -2804,77 +2017,6 @@ struct GTY(()) tree_decl_minimal {
 #define DECL_GIMPLE_REG_P(DECL) \
   DECL_COMMON_CHECK (DECL)->decl_common.gimple_reg_flag
 
-struct GTY(()) tree_decl_common {
-  struct tree_decl_minimal common;
-  tree size;
-
-  ENUM_BITFIELD(machine_mode) mode : 8;
-
-  unsigned nonlocal_flag : 1;
-  unsigned virtual_flag : 1;
-  unsigned ignored_flag : 1;
-  unsigned abstract_flag : 1;
-  unsigned artificial_flag : 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;
-  unsigned lang_flag_8 : 1;
-
-  /* In LABEL_DECL, this is DECL_ERROR_ISSUED.
-     In VAR_DECL and PARM_DECL, this is DECL_REGISTER.  */
-  unsigned decl_flag_0 : 1;
-  /* In FIELD_DECL, this is DECL_BIT_FIELD
-     In VAR_DECL and FUNCTION_DECL, this is DECL_EXTERNAL.
-     In TYPE_DECL, this is TYPE_DECL_SUPPRESS_DEBUG.  */
-  unsigned decl_flag_1 : 1;
-  /* In FIELD_DECL, this is DECL_NONADDRESSABLE_P
-     In VAR_DECL, PARM_DECL and RESULT_DECL, this is
-     DECL_HAS_VALUE_EXPR_P.  */
-  unsigned decl_flag_2 : 1;
-  /* Logically, these two would go in a theoretical base shared by var and
-     parm decl. */
-  unsigned gimple_reg_flag : 1;
-  /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_BY_REFERENCE.  */
-  unsigned decl_by_reference_flag : 1;
-  /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_RESTRICTED_P.  */
-  unsigned decl_restricted_flag : 1;
-
-  /* In VAR_DECL and PARM_DECL set when the decl has been used except for
-     being set.  */
-  unsigned decl_read_flag : 1;
-
-  /* In VAR_DECL or RESULT_DECL set when significant code movement precludes
-     attempting to share the stack slot with some other variable.  */
-  unsigned decl_nonshareable_flag : 1;
-
-  /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs.  */
-  unsigned int off_align : 8;
-
-  /* 24-bits unused.  */
-
-  /* DECL_ALIGN.  It should have the same size as TYPE_ALIGN.  */
-  unsigned int align;
-
-  /* UID for points-to sets, stable over copying from inlining.  */
-  unsigned int pt_uid;
-
-  tree size_unit;
-  tree initial;
-  tree attributes;
-  tree abstract_origin;
-
-  /* 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);
 
@@ -2931,11 +2073,6 @@ extern void decl_value_expr_insert (tree, tree);
 /* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'.  */
 #define DECL_REGISTER(NODE) (DECL_WRTL_CHECK (NODE)->decl_common.decl_flag_0)
 
-struct GTY(()) tree_decl_with_rtl {
-  struct tree_decl_common common;
-  rtx rtl;
-};
-
 /* In a FIELD_DECL, this is the field position, counting in bytes, of the
    DECL_OFFSET_ALIGN-bit-sized word containing the bit closest to the beginning
    of the structure.  */
@@ -3004,16 +2141,6 @@ struct GTY(()) tree_decl_with_rtl {
 #define DECL_NONADDRESSABLE_P(NODE) \
   (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_2)
 
-struct GTY(()) tree_field_decl {
-  struct tree_decl_common common;
-
-  tree offset;
-  tree bit_field_type;
-  tree qualifier;
-  tree bit_offset;
-  tree fcontext;
-};
-
 /* 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.  */
@@ -3025,25 +2152,6 @@ struct GTY(()) tree_field_decl {
 #define EH_LANDING_PAD_NR(NODE) \
   (LABEL_DECL_CHECK (NODE)->label_decl.eh_landing_pad_nr)
 
-/* 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_common.decl_flag_0)
-
-struct GTY(()) tree_label_decl {
-  struct tree_decl_with_rtl common;
-  int label_decl_uid;
-  int eh_landing_pad_nr;
-};
-
-struct GTY(()) tree_result_decl {
-  struct tree_decl_with_rtl common;
-};
-
-struct GTY(()) tree_const_decl {
-  struct tree_decl_common common;
-};
-
 /* 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)
@@ -3053,12 +2161,6 @@ struct GTY(()) tree_const_decl {
 #define DECL_INCOMING_RTL(NODE) \
   (PARM_DECL_CHECK (NODE)->parm_decl.incoming_rtl)
 
-struct GTY(()) tree_parm_decl {
-  struct tree_decl_with_rtl common;
-  rtx incoming_rtl;
-};
-
-
 /* 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) \
@@ -3191,53 +2293,18 @@ struct GTY(()) tree_parm_decl {
 #define DECL_HAS_IMPLICIT_SECTION_NAME_P(NODE) \
   (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.implicit_section_name_p)
 
-struct GTY(()) tree_decl_with_vis {
- struct tree_decl_with_rtl common;
- tree assembler_name;
- tree section_name;
- tree comdat_group;
-
- /* Belong to VAR_DECL exclusively.  */
- unsigned defer_output : 1;
- unsigned hard_register : 1;
- unsigned thread_local : 1;
- unsigned common_flag : 1;
- unsigned in_text_section : 1;
- unsigned in_constant_pool : 1;
- unsigned dllimport_flag : 1;
- /* Don't belong to VAR_DECL exclusively.  */
- unsigned weak_flag : 1;
-
- unsigned seen_in_bind_expr : 1;
- unsigned comdat_flag : 1;
- ENUM_BITFIELD(symbol_visibility) visibility : 2;
- unsigned visibility_specified : 1;
- /* Belongs to VAR_DECL exclusively.  */
- ENUM_BITFIELD(tls_model) tls_model : 3;
-
- /* Belong to FUNCTION_DECL exclusively.  */
- unsigned init_priority_p : 1;
- /* Used by C++ only.  Might become a generic decl flag.  */
- unsigned shadowed_for_var_p : 1;
- /* When SECTION_NAME is implied by -ffunsection-section.  */
- unsigned implicit_section_name_p : 1;
- /* 13 unused bits. */
-};
-
 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.  */
+
+/* For VAR_DECL, this is set to an expression that it was split from.  */
+#define DECL_HAS_DEBUG_EXPR_P(NODE) \
+  (VAR_DECL_CHECK (NODE)->decl_common.debug_expr_is_from)
 #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))
 
-/* An initialization priority.  */
-typedef unsigned short priority_type;
-
 extern priority_type decl_init_priority_lookup (tree);
 extern priority_type decl_fini_priority_lookup (tree);
 extern void decl_init_priority_insert (tree, priority_type);
@@ -3269,13 +2336,13 @@ extern void decl_fini_priority_insert (tree, priority_type);
    libraries.  */
 #define MAX_RESERVED_INIT_PRIORITY 100
 
+/* In a VAR_DECL, nonzero if this is a global variable for VOPs.  */
 #define VAR_DECL_IS_VIRTUAL_OPERAND(NODE) \
   (VAR_DECL_CHECK (NODE)->base.u.bits.saturating_flag)
 
-struct GTY(()) tree_var_decl {
-  struct tree_decl_with_vis common;
-};
-
+/* In a VAR_DECL, nonzero if this is a non-local frame structure.  */
+#define DECL_NONLOCAL_FRAME(NODE)  \
+  (VAR_DECL_CHECK (NODE)->base.default_def_flag)
 
 /* This field is used to reference anything in decl.result and is meant only
    for use by the garbage collector.  */
@@ -3293,19 +2360,6 @@ struct GTY(()) tree_var_decl {
 #define DECL_VINDEX(NODE) \
   (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.vindex)
 
-struct GTY(())
- tree_decl_non_common {
-  struct tree_decl_with_vis common;
-  /* C++ uses this in namespaces.  */
-  tree saved_tree;
-  /* C++ uses this in templates.  */
-  tree arguments;
-  /* Almost all FE's use this.  */
-  tree result;
-  /* C++ uses this in namespaces and function_decls.  */
-  tree vindex;
-};
-
 /* In FUNCTION_DECL, holds the decl for the return value.  */
 #define DECL_RESULT(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.result)
 
@@ -3423,8 +2477,8 @@ struct GTY(())
 #define DECL_DISREGARD_INLINE_LIMITS(NODE) \
   (FUNCTION_DECL_CHECK (NODE)->function_decl.disregard_inline_limits)
 
-extern VEC(tree, gc) **decl_debug_args_lookup (tree);
-extern VEC(tree, gc) **decl_debug_args_insert (tree);
+extern vec<tree, va_gc> **decl_debug_args_lookup (tree);
+extern vec<tree, va_gc> **decl_debug_args_insert (tree);
 
 /* Nonzero if a FUNCTION_DECL has DEBUG arguments attached to it.  */
 #define DECL_HAS_DEBUG_ARGS_P(NODE) \
@@ -3435,7 +2489,13 @@ extern VEC(tree, gc) **decl_debug_args_insert (tree);
 #define DECL_STRUCT_FUNCTION(NODE) \
   (FUNCTION_DECL_CHECK (NODE)->function_decl.f)
 
-/* In a FUNCTION_DECL, nonzero means a built in function.  */
+/* In a FUNCTION_DECL, nonzero means a built in function of a
+   standard library or more generally a built in function that is
+   recognized by optimizers and expanders.
+
+   Note that it is different from the DECL_IS_BUILTIN accessor.  For
+   instance, user declared prototypes of C library functions are not
+   DECL_IS_BUILTIN but may be DECL_BUILT_IN.  */
 #define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN)
 
 /* For a builtin function, identify which part of the compiler defined it.  */
@@ -3460,53 +2520,28 @@ extern VEC(tree, gc) **decl_debug_args_insert (tree);
 #define DECL_FUNCTION_SPECIFIC_OPTIMIZATION(NODE) \
    (FUNCTION_DECL_CHECK (NODE)->function_decl.function_specific_optimization)
 
-/* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
-   arguments/result/saved_tree fields by front ends.   It was either inherit
-   FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
-   which seemed a bit strange.  */
-
-struct GTY(()) tree_function_decl {
-  struct tree_decl_non_common common;
-
-  struct function *f;
-
-  /* The personality function. Used for stack unwinding. */
-  tree personality;
-
-  /* Function specific options that are used by this function.  */
-  tree function_specific_target;       /* target options */
-  tree function_specific_optimization; /* optimization options */
-
-  /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
-     DECL_FUNCTION_CODE.  Otherwise unused.
-     ???  The bitfield needs to be able to hold all target function
-         codes as well.  */
-  ENUM_BITFIELD(built_in_function) function_code : 11;
-  ENUM_BITFIELD(built_in_class) built_in_class : 2;
-
-  unsigned static_ctor_flag : 1;
-  unsigned static_dtor_flag : 1;
-  unsigned uninlinable : 1;
-
-  unsigned possibly_inlined : 1;
-  unsigned novops_flag : 1;
-  unsigned returns_twice_flag : 1;
-  unsigned malloc_flag : 1;
-  unsigned operator_new_flag : 1;
-  unsigned declared_inline_flag : 1;
-  unsigned regdecl_flag : 1;
-  unsigned no_inline_warning_flag : 1;
-
-  unsigned no_instrument_function_entry_exit : 1;
-  unsigned no_limit_stack : 1;
-  unsigned disregard_inline_limits : 1;
-  unsigned pure_flag : 1;
-  unsigned looping_const_or_pure_flag : 1;
-  unsigned has_debug_args_flag : 1;
-  unsigned tm_clone_flag : 1;
-
-  /* 1 bit left */
-};
+/* In FUNCTION_DECL, this is set if this function has other versions generated
+   using "target" attributes.  The default version is the one which does not
+   have any "target" attribute set. */
+#define DECL_FUNCTION_VERSIONED(NODE)\
+   (FUNCTION_DECL_CHECK (NODE)->function_decl.versioned_function)
+
+/* In FUNCTION_DECL, this is set if this function is a C++ constructor.
+   Devirtualization machinery uses this knowledge for determing type of the
+   object constructed.  Also we assume that constructor address is not
+   important.  */
+#define DECL_CXX_CONSTRUCTOR_P(NODE)\
+   (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.cxx_constructor)
+
+/* In FUNCTION_DECL, this is set if this function is a C++ destructor.
+   Devirtualization machinery uses this to track types in destruction.  */
+#define DECL_CXX_DESTRUCTOR_P(NODE)\
+   (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.cxx_destructor)
+
+/* In FUNCTION_DECL that represent an virtual method this is set when
+   the method is final.  */
+#define DECL_FINAL_P(NODE)\
+   (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.final)
 
 /* The source language of the translation-unit.  */
 #define TRANSLATION_UNIT_LANGUAGE(NODE) \
@@ -3514,17 +2549,6 @@ struct GTY(()) tree_function_decl {
 
 /* TRANSLATION_UNIT_DECL inherits from DECL_MINIMAL.  */
 
-struct GTY(()) tree_translation_unit_decl {
-  struct tree_decl_common common;
-  /* Source language of this translation unit.  Used for DWARF output.  */
-  const char * GTY((skip(""))) language;
-  /* TODO: Non-optimization used to build this translation unit.  */
-  /* TODO: Root of a partial DWARF tree for global types and decls.  */
-};
-
-/* A vector of all translation-units.  */
-extern GTY (()) VEC(tree,gc) *all_translation_units;
-
 /* 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)
@@ -3540,11 +2564,6 @@ extern GTY (()) VEC(tree,gc) *all_translation_units;
 #define IMPORTED_DECL_ASSOCIATED_DECL(NODE) \
 (DECL_INITIAL (IMPORTED_DECL_CHECK (NODE)))
 
-struct GTY(()) tree_type_decl {
-  struct tree_decl_non_common common;
-
-};
-\f
 /* A STATEMENT_LIST chains statements together in GENERIC and GIMPLE.
    To reduce overhead, the nodes containing the statements are not trees.
    This avoids the overhead of tree_common on all linked list elements.
@@ -3556,44 +2575,19 @@ struct GTY(()) tree_type_decl {
 #define STATEMENT_LIST_TAIL(NODE) \
   (STATEMENT_LIST_CHECK (NODE)->stmt_list.tail)
 
-struct GTY ((chain_next ("%h.next"), chain_prev ("%h.prev"))) tree_statement_list_node
- {
-  struct tree_statement_list_node *prev;
-  struct tree_statement_list_node *next;
-  tree stmt;
-};
-
-struct GTY(()) tree_statement_list
- {
-  struct tree_typed typed;
-  struct tree_statement_list_node *head;
-  struct tree_statement_list_node *tail;
-};
-
-
-/* Optimization options used by a function.  */
-
-struct GTY(()) tree_optimization_option {
-  struct tree_common common;
-
-  /* The optimization options used by the user.  */
-  struct cl_optimization opts;
-};
-
 #define TREE_OPTIMIZATION(NODE) \
   (&OPTIMIZATION_NODE_CHECK (NODE)->optimization.opts)
 
-/* Return a tree node that encapsulates the current optimization options.  */
-extern tree build_optimization_node (void);
+#define TREE_OPTIMIZATION_OPTABS(NODE) \
+  (OPTIMIZATION_NODE_CHECK (NODE)->optimization.optabs)
 
-/* Target options used by a function.  */
+#define TREE_OPTIMIZATION_BASE_OPTABS(NODE) \
+  (OPTIMIZATION_NODE_CHECK (NODE)->optimization.base_optabs)
 
-struct GTY(()) tree_target_option {
-  struct tree_common common;
+/* Return a tree node that encapsulates the current optimization options.  */
+extern tree build_optimization_node (void);
 
-  /* The optimization options used by the user.  */
-  struct cl_target_option opts;
-};
+extern void init_tree_optimization_optabs (tree);
 
 #define TREE_TARGET_OPTION(NODE) \
   (&TARGET_OPTION_NODE_CHECK (NODE)->target_option.opts)
@@ -3601,56 +2595,6 @@ struct GTY(()) tree_target_option {
 /* Return a tree node that encapsulates the current target options.  */
 extern tree build_target_option_node (void);
 
-\f
-/* Define the overall contents of a tree node.
-   It may be any of the structures declared above
-   for various types of node.  */
-
-union GTY ((ptr_alias (union lang_tree_node),
-           desc ("tree_node_structure (&%h)"), variable_size)) tree_node {
-  struct tree_base GTY ((tag ("TS_BASE"))) base;
-  struct tree_typed GTY ((tag ("TS_TYPED"))) typed;
-  struct tree_common GTY ((tag ("TS_COMMON"))) common;
-  struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst;
-  struct tree_real_cst GTY ((tag ("TS_REAL_CST"))) real_cst;
-  struct tree_fixed_cst GTY ((tag ("TS_FIXED_CST"))) fixed_cst;
-  struct tree_vector GTY ((tag ("TS_VECTOR"))) vector;
-  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_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_label_decl GTY ((tag ("TS_LABEL_DECL"))) label_decl;
-  struct tree_result_decl GTY ((tag ("TS_RESULT_DECL"))) result_decl;
-  struct tree_const_decl GTY ((tag ("TS_CONST_DECL"))) const_decl;
-  struct tree_type_decl GTY ((tag ("TS_TYPE_DECL"))) type_decl;
-  struct tree_function_decl GTY ((tag ("TS_FUNCTION_DECL"))) function_decl;
-  struct tree_translation_unit_decl GTY ((tag ("TS_TRANSLATION_UNIT_DECL")))
-    translation_unit_decl;
-  struct tree_type_common GTY ((tag ("TS_TYPE_COMMON"))) type_common;
-  struct tree_type_with_lang_specific GTY ((tag ("TS_TYPE_WITH_LANG_SPECIFIC")))
-    type_with_lang_specific;
-  struct tree_type_non_common GTY ((tag ("TS_TYPE_NON_COMMON")))
-    type_non_common;
-  struct tree_list GTY ((tag ("TS_LIST"))) list;
-  struct tree_vec GTY ((tag ("TS_VEC"))) vec;
-  struct tree_exp GTY ((tag ("TS_EXP"))) exp;
-  struct tree_ssa_name GTY ((tag ("TS_SSA_NAME"))) ssa_name;
-  struct tree_block GTY ((tag ("TS_BLOCK"))) block;
-  struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo;
-  struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
-  struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor;
-  struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause;
-  struct tree_optimization_option GTY ((tag ("TS_OPTIMIZATION"))) optimization;
-  struct tree_target_option GTY ((tag ("TS_TARGET_OPTION"))) target_option;
-};
-
 #if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
 
 inline tree
@@ -4130,166 +3074,6 @@ tree_operand_check_code (const_tree __t, enum tree_code __code, int __i,
 
 #endif
 
-\f
-/* Standard named or nameless data types of the C compiler.  */
-
-enum tree_index
-{
-  TI_ERROR_MARK,
-  TI_INTQI_TYPE,
-  TI_INTHI_TYPE,
-  TI_INTSI_TYPE,
-  TI_INTDI_TYPE,
-  TI_INTTI_TYPE,
-
-  TI_UINTQI_TYPE,
-  TI_UINTHI_TYPE,
-  TI_UINTSI_TYPE,
-  TI_UINTDI_TYPE,
-  TI_UINTTI_TYPE,
-
-  TI_UINT16_TYPE,
-  TI_UINT32_TYPE,
-  TI_UINT64_TYPE,
-
-  TI_INTEGER_ZERO,
-  TI_INTEGER_ONE,
-  TI_INTEGER_THREE,
-  TI_INTEGER_MINUS_ONE,
-  TI_NULL_POINTER,
-
-  TI_SIZE_ZERO,
-  TI_SIZE_ONE,
-
-  TI_BITSIZE_ZERO,
-  TI_BITSIZE_ONE,
-  TI_BITSIZE_UNIT,
-
-  TI_PUBLIC,
-  TI_PROTECTED,
-  TI_PRIVATE,
-
-  TI_BOOLEAN_FALSE,
-  TI_BOOLEAN_TRUE,
-
-  TI_COMPLEX_INTEGER_TYPE,
-  TI_COMPLEX_FLOAT_TYPE,
-  TI_COMPLEX_DOUBLE_TYPE,
-  TI_COMPLEX_LONG_DOUBLE_TYPE,
-
-  TI_FLOAT_TYPE,
-  TI_DOUBLE_TYPE,
-  TI_LONG_DOUBLE_TYPE,
-
-  TI_FLOAT_PTR_TYPE,
-  TI_DOUBLE_PTR_TYPE,
-  TI_LONG_DOUBLE_PTR_TYPE,
-  TI_INTEGER_PTR_TYPE,
-
-  TI_VOID_TYPE,
-  TI_PTR_TYPE,
-  TI_CONST_PTR_TYPE,
-  TI_SIZE_TYPE,
-  TI_PID_TYPE,
-  TI_PTRDIFF_TYPE,
-  TI_VA_LIST_TYPE,
-  TI_VA_LIST_GPR_COUNTER_FIELD,
-  TI_VA_LIST_FPR_COUNTER_FIELD,
-  TI_BOOLEAN_TYPE,
-  TI_FILEPTR_TYPE,
-
-  TI_DFLOAT32_TYPE,
-  TI_DFLOAT64_TYPE,
-  TI_DFLOAT128_TYPE,
-  TI_DFLOAT32_PTR_TYPE,
-  TI_DFLOAT64_PTR_TYPE,
-  TI_DFLOAT128_PTR_TYPE,
-
-  TI_VOID_LIST_NODE,
-
-  TI_MAIN_IDENTIFIER,
-
-  TI_SAT_SFRACT_TYPE,
-  TI_SAT_FRACT_TYPE,
-  TI_SAT_LFRACT_TYPE,
-  TI_SAT_LLFRACT_TYPE,
-  TI_SAT_USFRACT_TYPE,
-  TI_SAT_UFRACT_TYPE,
-  TI_SAT_ULFRACT_TYPE,
-  TI_SAT_ULLFRACT_TYPE,
-  TI_SFRACT_TYPE,
-  TI_FRACT_TYPE,
-  TI_LFRACT_TYPE,
-  TI_LLFRACT_TYPE,
-  TI_USFRACT_TYPE,
-  TI_UFRACT_TYPE,
-  TI_ULFRACT_TYPE,
-  TI_ULLFRACT_TYPE,
-  TI_SAT_SACCUM_TYPE,
-  TI_SAT_ACCUM_TYPE,
-  TI_SAT_LACCUM_TYPE,
-  TI_SAT_LLACCUM_TYPE,
-  TI_SAT_USACCUM_TYPE,
-  TI_SAT_UACCUM_TYPE,
-  TI_SAT_ULACCUM_TYPE,
-  TI_SAT_ULLACCUM_TYPE,
-  TI_SACCUM_TYPE,
-  TI_ACCUM_TYPE,
-  TI_LACCUM_TYPE,
-  TI_LLACCUM_TYPE,
-  TI_USACCUM_TYPE,
-  TI_UACCUM_TYPE,
-  TI_ULACCUM_TYPE,
-  TI_ULLACCUM_TYPE,
-  TI_QQ_TYPE,
-  TI_HQ_TYPE,
-  TI_SQ_TYPE,
-  TI_DQ_TYPE,
-  TI_TQ_TYPE,
-  TI_UQQ_TYPE,
-  TI_UHQ_TYPE,
-  TI_USQ_TYPE,
-  TI_UDQ_TYPE,
-  TI_UTQ_TYPE,
-  TI_SAT_QQ_TYPE,
-  TI_SAT_HQ_TYPE,
-  TI_SAT_SQ_TYPE,
-  TI_SAT_DQ_TYPE,
-  TI_SAT_TQ_TYPE,
-  TI_SAT_UQQ_TYPE,
-  TI_SAT_UHQ_TYPE,
-  TI_SAT_USQ_TYPE,
-  TI_SAT_UDQ_TYPE,
-  TI_SAT_UTQ_TYPE,
-  TI_HA_TYPE,
-  TI_SA_TYPE,
-  TI_DA_TYPE,
-  TI_TA_TYPE,
-  TI_UHA_TYPE,
-  TI_USA_TYPE,
-  TI_UDA_TYPE,
-  TI_UTA_TYPE,
-  TI_SAT_HA_TYPE,
-  TI_SAT_SA_TYPE,
-  TI_SAT_DA_TYPE,
-  TI_SAT_TA_TYPE,
-  TI_SAT_UHA_TYPE,
-  TI_SAT_USA_TYPE,
-  TI_SAT_UDA_TYPE,
-  TI_SAT_UTA_TYPE,
-
-  TI_OPTIMIZATION_DEFAULT,
-  TI_OPTIMIZATION_CURRENT,
-  TI_TARGET_OPTION_DEFAULT,
-  TI_TARGET_OPTION_CURRENT,
-  TI_CURRENT_TARGET_PRAGMA,
-  TI_CURRENT_OPTIMIZE_PRAGMA,
-
-  TI_MAX
-};
-
-extern GTY(()) tree global_trees[TI_MAX];
-
 #define error_mark_node                        global_trees[TI_ERROR_MARK]
 
 #define intQI_type_node                        global_trees[TI_INTQI_TYPE]
@@ -4353,6 +3137,7 @@ extern GTY(()) tree global_trees[TI_MAX];
 #define va_list_fpr_counter_field      global_trees[TI_VA_LIST_FPR_COUNTER_FIELD]
 /* The C type `FILE *'.  */
 #define fileptr_type_node              global_trees[TI_FILEPTR_TYPE]
+#define pointer_sized_int_node         global_trees[TI_POINTER_SIZED_TYPE]
 
 #define boolean_type_node              global_trees[TI_BOOLEAN_TYPE]
 #define boolean_false_node             global_trees[TI_BOOLEAN_FALSE]
@@ -4469,34 +3254,6 @@ extern GTY(()) tree global_trees[TI_MAX];
 #define current_target_pragma          global_trees[TI_CURRENT_TARGET_PRAGMA]
 #define current_optimize_pragma                global_trees[TI_CURRENT_OPTIMIZE_PRAGMA]
 
-/* An enumeration of the standard C integer types.  These must be
-   ordered so that shorter types appear before longer ones, and so
-   that signed types appear before unsigned ones, for the correct
-   functioning of interpret_integer() in c-lex.c.  */
-enum integer_type_kind
-{
-  itk_char,
-  itk_signed_char,
-  itk_unsigned_char,
-  itk_short,
-  itk_unsigned_short,
-  itk_int,
-  itk_unsigned_int,
-  itk_long,
-  itk_unsigned_long,
-  itk_long_long,
-  itk_unsigned_long_long,
-  itk_int128,
-  itk_unsigned_int128,
-  itk_none
-};
-
-typedef enum integer_type_kind integer_type_kind;
-
-/* The standard C integer types.  Use integer_type_kind to index into
-   this array.  */
-extern GTY(()) tree integer_types[itk_none];
-
 #define char_type_node                 integer_types[itk_char]
 #define signed_char_type_node          integer_types[itk_signed_char]
 #define unsigned_char_type_node                integer_types[itk_unsigned_char]
@@ -4510,34 +3267,7 @@ extern GTY(()) tree integer_types[itk_none];
 #define long_long_unsigned_type_node   integer_types[itk_unsigned_long_long]
 #define int128_integer_type_node       integer_types[itk_int128]
 #define int128_unsigned_type_node      integer_types[itk_unsigned_int128]
-\f
-/* A pointer-to-function member type looks like:
-
-     struct {
-       __P __pfn;
-       ptrdiff_t __delta;
-     };
-
-   If __pfn is NULL, it is a NULL pointer-to-member-function.
-
-   (Because the vtable is always the first thing in the object, we
-   don't need its offset.)  If the function is virtual, then PFN is
-   one plus twice the index into the vtable; otherwise, it is just a
-   pointer to the function.
 
-   Unfortunately, using the lowest bit of PFN doesn't work in
-   architectures that don't impose alignment requirements on function
-   addresses, or that use the lowest bit to tell one ISA from another,
-   for example.  For such architectures, we use the lowest bit of
-   DELTA instead of the lowest bit of the PFN, and DELTA will be
-   multiplied by 2.  */
-
-enum ptrmemfunc_vbit_where_t
-{
-  ptrmemfunc_vbit_in_pfn,
-  ptrmemfunc_vbit_in_delta
-};
-\f
 #define NULL_TREE (tree) NULL
 
 /* True if NODE is an erroneous expression.  */
@@ -4619,7 +3349,7 @@ extern tree maybe_get_identifier (const char *);
 /* Construct various types of nodes.  */
 
 extern tree build_nt (enum tree_code, ...);
-extern tree build_nt_call_vec (tree, VEC(tree,gc) *);
+extern tree build_nt_call_vec (tree, vec<tree, va_gc> *);
 
 extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL);
 #define build0(c,t) build0_stat (c,t MEM_STAT_INFO)
@@ -4718,7 +3448,7 @@ extern tree force_fit_type_double (tree, double_int, int, bool);
 static inline tree
 build_int_cstu (tree type, unsigned HOST_WIDE_INT cst)
 {
-  return double_int_to_tree (type, uhwi_to_double_int (cst));
+  return double_int_to_tree (type, double_int::from_uhwi (cst));
 }
 
 extern tree build_int_cst (tree, HOST_WIDE_INT);
@@ -4728,19 +3458,22 @@ extern tree make_vector_stat (unsigned MEM_STAT_DECL);
 #define make_vector(n) make_vector_stat (n MEM_STAT_INFO)
 extern tree build_vector_stat (tree, tree * MEM_STAT_DECL);
 #define build_vector(t,v) build_vector_stat (t, v MEM_STAT_INFO)
-extern tree build_vector_from_ctor (tree, VEC(constructor_elt,gc) *);
+extern tree build_vector_from_ctor (tree, vec<constructor_elt, va_gc> *);
 extern tree build_vector_from_val (tree, tree);
-extern tree build_constructor (tree, VEC(constructor_elt,gc) *);
+extern tree build_constructor (tree, vec<constructor_elt, va_gc> *);
 extern tree build_constructor_single (tree, tree, tree);
 extern tree build_constructor_from_list (tree, tree);
+extern tree build_constructor_va (tree, int, ...);
 extern tree build_real_from_int_cst (tree, const_tree);
 extern tree build_complex (tree, tree, tree);
 extern tree build_one_cst (tree);
+extern tree build_minus_one_cst (tree);
+extern tree build_all_ones_cst (tree);
 extern tree build_zero_cst (tree);
 extern tree build_string (int, const char *);
 extern tree build_tree_list_stat (tree, tree MEM_STAT_DECL);
 #define build_tree_list(t,q) build_tree_list_stat(t,q MEM_STAT_INFO)
-extern tree build_tree_list_vec_stat (const VEC(tree,gc) * MEM_STAT_DECL);
+extern tree build_tree_list_vec_stat (const vec<tree, va_gc> *MEM_STAT_DECL);
 #define build_tree_list_vec(v) build_tree_list_vec_stat (v MEM_STAT_INFO)
 extern tree build_decl_stat (location_t, enum tree_code,
                             tree, tree MEM_STAT_DECL);
@@ -4750,6 +3483,7 @@ extern tree build_translation_unit_decl (tree);
 extern tree build_block (tree, tree, tree, tree);
 extern tree build_empty_stmt (location_t);
 extern tree build_omp_clause (location_t, enum omp_clause_code);
+extern tree find_omp_clause (tree, enum omp_clause_code);
 
 extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL);
 #define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO)
@@ -4759,7 +3493,7 @@ extern tree build_call_valist (tree, tree, int, va_list);
 #define build_call_array(T1,T2,N,T3)\
    build_call_array_loc (UNKNOWN_LOCATION, T1, T2, N, T3)
 extern tree build_call_array_loc (location_t, tree, tree, int, const tree *);
-extern tree build_call_vec (tree, tree, VEC(tree,gc) *);
+extern tree build_call_vec (tree, tree, vec<tree, va_gc> *);
 
 /* Construct various nodes representing data types.  */
 
@@ -4768,6 +3502,7 @@ extern tree make_unsigned_type (int);
 extern tree signed_or_unsigned_type_for (int, tree);
 extern tree signed_type_for (tree);
 extern tree unsigned_type_for (tree);
+extern tree truth_type_for (tree);
 extern void initialize_sizetypes (void);
 extern void fixup_unsigned_type (tree);
 extern tree build_pointer_type_for_mode (tree, enum machine_mode, bool);
@@ -4789,10 +3524,10 @@ extern tree build_varargs_function_type_list (tree, ...);
 extern tree build_function_type_array (tree, int, tree *);
 extern tree build_varargs_function_type_array (tree, int, tree *);
 #define build_function_type_vec(RET, V) \
-  build_function_type_array (RET, VEC_length (tree, V), VEC_address (tree, V))
+  build_function_type_array (RET, vec_safe_length (V), vec_safe_address (V))
 #define build_varargs_function_type_vec(RET, V) \
-  build_varargs_function_type_array (RET, VEC_length (tree, V), \
-                                    VEC_address (tree, V))
+  build_varargs_function_type_array (RET, vec_safe_length (V), \
+                                    vec_safe_address (V))
 extern tree build_method_type_directly (tree, tree, tree);
 extern tree build_method_type (tree, tree);
 extern tree build_offset_type (tree, tree);
@@ -4803,7 +3538,7 @@ extern bool range_in_array_bounds_p (tree);
 
 extern tree value_member (tree, tree);
 extern tree purpose_member (const_tree, tree);
-extern bool vec_member (const_tree, VEC(tree,gc) *);
+extern bool vec_member (const_tree, vec<tree, va_gc> *);
 extern tree chain_index (int, tree);
 
 extern int attribute_list_equal (const_tree, const_tree);
@@ -4835,6 +3570,7 @@ extern bool may_negate_without_overflow_p (const_tree);
 extern tree strip_array_types (tree);
 extern tree excess_precision_type (tree);
 extern bool valid_constant_size_p (const_tree);
+extern unsigned int element_precision (const_tree);
 
 /* Construct various nodes representing fract or accum data types.  */
 
@@ -4888,80 +3624,7 @@ extern tree build_type_attribute_qual_variant (tree, tree, int);
    warning to be generated).  */
 extern int comp_type_attributes (const_tree, const_tree);
 
-/* Structure describing an attribute and a function to handle it.  */
-struct attribute_spec
-{
-  /* The name of the attribute (without any leading or trailing __),
-     or NULL to mark the end of a table of attributes.  */
-  const char *const name;
-  /* The minimum length of the list of arguments of the attribute.  */
-  const int min_length;
-  /* The maximum length of the list of arguments of the attribute
-     (-1 for no maximum).  */
-  const int max_length;
-  /* Whether this attribute requires a DECL.  If it does, it will be passed
-     from types of DECLs, function return types and array element types to
-     the DECLs, function types and array types respectively; but when
-     applied to a type in any other circumstances, it will be ignored with
-     a warning.  (If greater control is desired for a given attribute,
-     this should be false, and the flags argument to the handler may be
-     used to gain greater control in that case.)  */
-  const bool decl_required;
-  /* Whether this attribute requires a type.  If it does, it will be passed
-     from a DECL to the type of that DECL.  */
-  const bool type_required;
-  /* Whether this attribute requires a function (or method) type.  If it does,
-     it will be passed from a function pointer type to the target type,
-     and from a function return type (which is not itself a function
-     pointer type) to the function type.  */
-  const bool function_type_required;
-  /* Function to handle this attribute.  NODE points to the node to which
-     the attribute is to be applied.  If a DECL, it should be modified in
-     place; if a TYPE, a copy should be created.  NAME is the name of the
-     attribute (possibly with leading or trailing __).  ARGS is the TREE_LIST
-     of the arguments (which may be NULL).  FLAGS gives further information
-     about the context of the attribute.  Afterwards, the attributes will
-     be added to the DECL_ATTRIBUTES or TYPE_ATTRIBUTES, as appropriate,
-     unless *NO_ADD_ATTRS is set to true (which should be done on error,
-     as well as in any other cases when the attributes should not be added
-     to the DECL or TYPE).  Depending on FLAGS, any attributes to be
-     applied to another type or DECL later may be returned;
-     otherwise the return value should be NULL_TREE.  This pointer may be
-     NULL if no special handling is required beyond the checks implied
-     by the rest of this structure.  */
-  tree (*const handler) (tree *node, tree name, tree args,
-                                int flags, bool *no_add_attrs);
-  /* Specifies if attribute affects type's identity.  */
-  const bool affects_type_identity;
-};
-
-/* Flags that may be passed in the third argument of decl_attributes, and
-   to handler functions for attributes.  */
-enum attribute_flags
-{
-  /* The type passed in is the type of a DECL, and any attributes that
-     should be passed in again to be applied to the DECL rather than the
-     type should be returned.  */
-  ATTR_FLAG_DECL_NEXT = 1,
-  /* The type passed in is a function return type, and any attributes that
-     should be passed in again to be applied to the function type rather
-     than the return type should be returned.  */
-  ATTR_FLAG_FUNCTION_NEXT = 2,
-  /* The type passed in is an array element type, and any attributes that
-     should be passed in again to be applied to the array type rather
-     than the element type should be returned.  */
-  ATTR_FLAG_ARRAY_NEXT = 4,
-  /* The type passed in is a structure, union or enumeration type being
-     created, and should be modified in place.  */
-  ATTR_FLAG_TYPE_IN_PLACE = 8,
-  /* The attributes are being applied by default to a library function whose
-     name indicates known behavior, and should be silently ignored if they
-     are not in fact compatible with the function type.  */
-  ATTR_FLAG_BUILT_IN = 16
-};
-
 /* Default versions of target-overridable functions.  */
-
 extern tree merge_decl_attributes (tree, tree);
 extern tree merge_type_attributes (tree, tree);
 
@@ -5076,41 +3739,6 @@ extern void finish_builtin_struct (tree, const char *,
 
 extern void layout_type (tree);
 
-/* These functions allow a front-end to perform a manual layout of a
-   RECORD_TYPE.  (For instance, if the placement of subsequent fields
-   depends on the placement of fields so far.)  Begin by calling
-   start_record_layout.  Then, call place_field for each of the
-   fields.  Then, call finish_record_layout.  See layout_type for the
-   default way in which these functions are used.  */
-
-typedef struct record_layout_info_s
-{
-  /* The RECORD_TYPE that we are laying out.  */
-  tree t;
-  /* The offset into the record so far, in bytes, not including bits in
-     BITPOS.  */
-  tree offset;
-  /* The last known alignment of SIZE.  */
-  unsigned int offset_align;
-  /* The bit position within the last OFFSET_ALIGN bits, in bits.  */
-  tree bitpos;
-  /* The alignment of the record so far, in bits.  */
-  unsigned int record_align;
-  /* The alignment of the record so far, ignoring #pragma pack and
-     __attribute__ ((packed)), in bits.  */
-  unsigned int unpacked_align;
-  /* The previous field laid out.  */
-  tree prev_field;
-  /* The static variables (i.e., class variables, as opposed to
-     instance variables) encountered in T.  */
-  VEC(tree,gc) *pending_statics;
-  /* Bits remaining in the current alignment group */
-  int remaining_in_alignment;
-  /* True if we've seen a packed field that didn't have normal
-     alignment anyway.  */
-  int packed_maybe_necessary;
-} *record_layout_info;
-
 extern record_layout_info start_record_layout (tree);
 extern tree bit_from_pos (tree, tree);
 extern tree byte_from_pos (tree, tree);
@@ -5170,20 +3798,6 @@ extern HOST_WIDE_INT int_bit_position (const_tree);
 extern tree byte_position (const_tree);
 extern HOST_WIDE_INT int_byte_position (const_tree);
 
-/* Define data structures, macros, and functions for handling sizes
-   and the various types used to represent sizes.  */
-
-enum size_type_kind
-{
-  stk_sizetype,                /* Normal representation of sizes in bytes.  */
-  stk_ssizetype,       /* Signed representation of sizes in bytes.  */
-  stk_bitsizetype,     /* Normal representation of sizes in bits.  */
-  stk_sbitsizetype,    /* Signed representation of sizes in bits.  */
-  stk_type_kind_last
-};
-
-extern GTY(()) tree sizetype_tab[(int) stk_type_kind_last];
-
 #define sizetype sizetype_tab[(int) stk_sizetype]
 #define bitsizetype sizetype_tab[(int) stk_bitsizetype]
 #define ssizetype sizetype_tab[(int) stk_ssizetype]
@@ -5215,9 +3829,6 @@ extern void finalize_size_functions (void);
    + (BITS_PER_UNIT > 8) + (BITS_PER_UNIT > 16) + (BITS_PER_UNIT > 32) \
    + (BITS_PER_UNIT > 64) + (BITS_PER_UNIT > 128) + (BITS_PER_UNIT > 256))
 
-/* If nonzero, an upper limit on alignment of structure fields, in bits,  */
-extern unsigned int maximum_field_alignment;
-
 /* Concatenate two lists (chains of TREE_LIST nodes) X and Y
    by making the last node in X point to Y.
    Returns X, except if X is 0 returns Y.  */
@@ -5255,9 +3866,14 @@ extern tree first_field (const_tree);
 
 extern bool initializer_zerop (const_tree);
 
+/* Given a vector VEC, return its first element if all elements are
+   the same.  Otherwise return NULL_TREE.  */
+
+extern tree uniform_vector_p (const_tree);
+
 /* Given a CONSTRUCTOR CTOR, return the element values as a vector.  */
 
-extern VEC(tree,gc) *ctor_to_vec (tree);
+extern vec<tree, va_gc> *ctor_to_vec (tree);
 
 extern bool categorize_ctor_elements (const_tree, HOST_WIDE_INT *,
                                      HOST_WIDE_INT *, bool *);
@@ -5277,6 +3893,11 @@ extern int integer_onep (const_tree);
 
 extern int integer_all_onesp (const_tree);
 
+/* integer_minus_onep (tree x) is nonzero if X is an integer constant of
+   value -1.  */
+
+extern int integer_minus_onep (const_tree);
+
 /* integer_pow2p (tree x) is nonzero is X is an integer constant with
    exactly one bit 1.  */
 
@@ -5306,11 +3927,16 @@ extern tree staticp (tree);
 
 extern tree save_expr (tree);
 
-/* Look inside EXPR and into any simple arithmetic operations.  Return
-   the innermost non-arithmetic node.  */
+/* Look inside EXPR into any simple arithmetic operations.  Return the
+   outermost non-arithmetic or non-invariant node.  */
 
 extern tree skip_simple_arithmetic (tree);
 
+/* Look inside EXPR into simple arithmetic operations involving constants.
+   Return the outermost non-arithmetic or non-constant node.  */
+
+extern tree skip_simple_constant_arithmetic (tree);
+
 /* Return which tree structure is used by T.  */
 
 enum tree_node_structure_enum tree_node_structure (const_tree);
@@ -5339,7 +3965,7 @@ extern bool type_contains_placeholder_p (tree);
    or CALL_EXPRs with PLACEHOLDER_EXPRs occurring only in their
    argument list.  */
 
-extern void find_placeholder_in_expr (tree, VEC (tree, heap) **);
+extern void find_placeholder_in_expr (tree, vec<tree> *);
 
 /* This macro calls the above function but short-circuits the common
    case of a constant to save time and also checks for NULL.  */
@@ -5477,25 +4103,6 @@ extern tree decl_type_context (const_tree);
 
 /* Return 1 if EXPR is the real constant zero.  */
 extern int real_zerop (const_tree);
-\f
-/* Declare commonly used variables for tree structure.  */
-
-/* Nonzero means lvalues are limited to those valid in pedantic ANSI C.
-   Zero means allow extended lvalues.  */
-
-extern int pedantic_lvalues;
-
-/* Points to the FUNCTION_DECL of the function whose body we are reading.  */
-
-extern GTY(()) tree current_function_decl;
-
-/* Nonzero means a FUNC_BEGIN label was emitted.  */
-extern GTY(()) const char * current_function_func_begin_label;
-\f
-/* Iterator for going through the function arguments.  */
-typedef struct {
-  tree next;                   /* TREE_LIST pointing to the next argument */
-} function_args_iterator;
 
 /* Initialize the iterator I with arguments from function FNDECL  */
 
@@ -5536,7 +4143,7 @@ function_args_iter_next (function_args_iterator *i)
 static inline bool
 inlined_function_outer_scope_p (const_tree block)
 {
- return BLOCK_SOURCE_LOCATION (block) != UNKNOWN_LOCATION;
+ return LOCATION_LOCUS (BLOCK_SOURCE_LOCATION (block)) != UNKNOWN_LOCATION;
 }
 
 /* Loop over all function arguments of FNTYPE.  In each iteration, PTR is set
@@ -5585,6 +4192,7 @@ extern const_tree strip_invariant_refs (const_tree);
 extern tree lhd_gcc_personality (void);
 extern void assign_assembler_name_if_neeeded (tree);
 extern void warn_deprecated_use (tree, tree);
+extern void cache_integer_cst (tree);
 
 \f
 /* In cgraph.c */
@@ -5592,6 +4200,7 @@ extern void change_decl_assembler_name (tree, tree);
 \f
 /* In gimplify.c */
 extern tree unshare_expr (tree);
+extern tree unshare_expr_without_location (tree);
 \f
 /* In stmt.c */
 
@@ -5699,14 +4308,6 @@ extern void fold_undefer_overflow_warnings (bool, const_gimple, int);
 extern void fold_undefer_and_ignore_overflow_warnings (void);
 extern bool fold_deferring_overflow_warnings_p (void);
 extern tree fold_fma (location_t, tree, tree, tree, tree);
-
-enum operand_equal_flag
-{
-  OEP_ONLY_CONST = 1,
-  OEP_PURE_SAME = 2,
-  OEP_CONSTANT_ADDRESS_OF = 4
-};
-
 extern int operand_equal_p (const_tree, const_tree, unsigned int);
 extern int multiple_of_p (tree, const_tree, const_tree);
 #define omit_one_operand(T1,T2,T3)\
@@ -5718,7 +4319,6 @@ extern tree omit_two_operands_loc (location_t, tree, tree, tree, tree);
 #define invert_truthvalue(T)\
    invert_truthvalue_loc(UNKNOWN_LOCATION, T)
 extern tree invert_truthvalue_loc (location_t, tree);
-extern tree fold_truth_not_expr (location_t, tree);
 extern tree fold_unary_to_constant (enum tree_code, tree, tree);
 extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree);
 extern tree fold_read_from_constant_string (tree);
@@ -5821,6 +4421,10 @@ fold_build_pointer_plus_hwi_loc (location_t loc, tree ptr, HOST_WIDE_INT off)
        fold_build_pointer_plus_hwi_loc (UNKNOWN_LOCATION, p, o)
 
 /* In builtins.c */
+
+/* Non-zero if __builtin_constant_p should be folded right away.  */
+extern bool force_folding_builtin_constant_p;
+
 extern bool avoid_folding_inline_builtin (tree);
 extern tree fold_call_expr (location_t, tree, bool);
 extern tree fold_builtin_fputs (location_t, tree, tree, bool, bool, tree);
@@ -5837,7 +4441,7 @@ extern bool fold_builtin_next_arg (tree, bool);
 extern enum built_in_function builtin_mathfn_code (const_tree);
 extern tree fold_builtin_call_array (location_t, tree, tree, int, tree *);
 extern tree build_call_expr_loc_array (location_t, tree, int, tree *);
-extern tree build_call_expr_loc_vec (location_t, tree, VEC(tree,gc) *);
+extern tree build_call_expr_loc_vec (location_t, tree, vec<tree, va_gc> *);
 extern tree build_call_expr_loc (location_t, tree, int, ...);
 extern tree build_call_expr (tree, int, ...);
 extern tree mathfn_built_in (tree, enum built_in_function fn);
@@ -5890,8 +4494,6 @@ extern hashval_t iterative_hash_host_wide_int (HOST_WIDE_INT, hashval_t);
 extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT);
 extern int type_list_equal (const_tree, const_tree);
 extern int chain_member (const_tree, const_tree);
-extern tree type_hash_lookup (unsigned int, tree);
-extern void type_hash_add (unsigned int, tree);
 extern int simple_cst_list_equal (const_tree, const_tree);
 extern void dump_tree_statistics (void);
 extern void recompute_tree_invariant_for_addr_expr (tree);
@@ -5911,15 +4513,21 @@ extern bool subrange_type_for_debug_p (const_tree, tree *, tree *);
 extern HOST_WIDE_INT int_cst_value (const_tree);
 extern HOST_WIDEST_INT widest_int_cst_value (const_tree);
 
-extern tree *tree_block (tree);
+extern tree tree_block (tree);
+extern void tree_set_block (tree, tree);
 extern location_t *block_nonartificial_location (tree);
 extern location_t tree_nonartificial_location (tree);
 
 extern tree block_ultimate_origin (const_tree);
 
 extern tree get_binfo_at_offset (tree, HOST_WIDE_INT, tree);
+extern bool virtual_method_call_p (tree);
+extern tree obj_type_ref_class (tree ref);
+extern bool types_same_for_odr (tree type1, tree type2);
 extern tree get_ref_base_and_extent (tree, HOST_WIDE_INT *,
                                     HOST_WIDE_INT *, HOST_WIDE_INT *);
+extern bool contains_bitfld_component_ref_p (const_tree);
+extern bool type_in_anonymous_namespace_p (tree);
 
 /* In tree-nested.c */
 extern tree build_addr (tree, tree);
@@ -5954,11 +4562,25 @@ extern void print_rtl (FILE *, const_rtx);
 
 /* In print-tree.c */
 extern void debug_tree (tree);
-extern void debug_vec_tree (VEC(tree,gc) *);
+extern void debug_raw (const tree_node &ref);
+extern void debug_raw (const tree_node *ptr);
+extern void debug (const tree_node &ref);
+extern void debug (const tree_node *ptr);
+extern void debug_verbose (const tree_node &ref);
+extern void debug_verbose (const tree_node *ptr);
+extern void debug_head (const tree_node &ref);
+extern void debug_head (const tree_node *ptr);
+extern void debug_body (const tree_node &ref);
+extern void debug_body (const tree_node *ptr);
+extern void debug_vec_tree (vec<tree, va_gc> *);
+extern void debug (vec<tree, va_gc> &ref);
+extern void debug (vec<tree, va_gc> *ptr);
+extern void debug_raw (vec<tree, va_gc> &ref);
+extern void debug_raw (vec<tree, va_gc> *ptr);
 #ifdef BUFSIZ
 extern void dump_addr (FILE*, const char *, const void *);
 extern void print_node (FILE *, const char *, tree, int);
-extern void print_vec_tree (FILE *, const char *, VEC(tree,gc) *, int);
+extern void print_vec_tree (FILE *, const char *, vec<tree, va_gc> *, int);
 extern void print_node_brief (FILE *, const char *, const_tree, int);
 extern void indent_to (FILE *, int);
 #endif
@@ -5967,72 +4589,12 @@ extern void indent_to (FILE *, int);
 extern bool debug_find_tree (tree, tree);
 /* This is in tree-inline.c since the routine uses
    data structures from the inliner.  */
-extern tree unsave_expr_now (tree);
 extern tree build_duplicate_type (tree);
 
 /* In calls.c */
-
-/* Nonzero if this is a call to a function whose return value depends
-   solely on its arguments, has no side effects, and does not read
-   global memory.  This corresponds to TREE_READONLY for function
-   decls.  */
-#define ECF_CONST                (1 << 0)
-/* Nonzero if this is a call to "pure" function (like const function,
-   but may read memory.  This corresponds to DECL_PURE_P for function
-   decls.  */
-#define ECF_PURE                 (1 << 1)
-/* Nonzero if this is ECF_CONST or ECF_PURE but cannot be proven to no
-   infinite loop.  This corresponds to DECL_LOOPING_CONST_OR_PURE_P
-   for function decls.*/
-#define ECF_LOOPING_CONST_OR_PURE (1 << 2)
-/* Nonzero if this call will never return.  */
-#define ECF_NORETURN             (1 << 3)
-/* Nonzero if this is a call to malloc or a related function.  */
-#define ECF_MALLOC               (1 << 4)
-/* Nonzero if it is plausible that this is a call to alloca.  */
-#define ECF_MAY_BE_ALLOCA        (1 << 5)
-/* Nonzero if this is a call to a function that won't throw an exception.  */
-#define ECF_NOTHROW              (1 << 6)
-/* Nonzero if this is a call to setjmp or a related function.  */
-#define ECF_RETURNS_TWICE        (1 << 7)
-/* Nonzero if this call replaces the current stack frame.  */
-#define ECF_SIBCALL              (1 << 8)
-/* Function does not read or write memory (but may have side effects, so
-   it does not necessarily fit ECF_CONST).  */
-#define ECF_NOVOPS               (1 << 9)
-/* The function does not lead to calls within current function unit.  */
-#define ECF_LEAF                 (1 << 10)
-/* Nonzero if this call does not affect transactions.  */
-#define ECF_TM_PURE              (1 << 11)
-/* Nonzero if this call is into the transaction runtime library.  */
-#define ECF_TM_BUILTIN           (1 << 12)
-
 extern int flags_from_decl_or_type (const_tree);
 extern int call_expr_flags (const_tree);
-
-/* Call argument flags.  */
-
-/* Nonzero if the argument is not dereferenced recursively, thus only
-   directly reachable memory is read or written.  */
-#define EAF_DIRECT             (1 << 0)
-/* Nonzero if memory reached by the argument is not clobbered.  */
-#define EAF_NOCLOBBER          (1 << 1)
-/* Nonzero if the argument does not escape.  */
-#define EAF_NOESCAPE           (1 << 2)
-/* Nonzero if the argument is not used by the function.  */
-#define EAF_UNUSED             (1 << 3)
-
-/* Call return flags.  */
-
-/* Mask for the argument number that is returned.  Lower two bits of
-   the return flags, encodes argument slots zero to three.  */
-#define ERF_RETURN_ARG_MASK    (3)
-/* Nonzero if the return value is equal to the argument number
-   flags & ERF_RETURN_ARG_MASK.  */
-#define ERF_RETURNS_ARG                (1 << 2)
-/* Nonzero if the return value does not alias with anything.  Functions
-   with the malloc attribute have this set on their return value.  */
-#define ERF_NOALIAS            (1 << 3)
+extern void set_call_expr_flags (tree, int);
 
 extern int setjmp_call_p (const_tree);
 extern bool gimple_alloca_call_p (const_gimple);
@@ -6043,6 +4605,8 @@ extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree);
 /* In attribs.c.  */
 
 extern const struct attribute_spec *lookup_attribute_spec (const_tree);
+extern const struct attribute_spec *lookup_scoped_attribute_spec (const_tree,
+                                                                 const_tree);
 
 extern void init_attributes (void);
 
@@ -6056,6 +4620,12 @@ extern void init_attributes (void);
    a decl attribute to the declaration rather than to its type).  */
 extern tree decl_attributes (tree *, tree, int);
 
+extern bool cxx11_attribute_p (const_tree);
+
+extern tree get_attribute_name (const_tree);
+
+extern tree get_attribute_namespace (const_tree);
+
 extern void apply_tm_attr (tree, tree);
 
 /* In stor-layout.c */
@@ -6118,7 +4688,6 @@ extern bool parse_input_constraint (const char **, int, int, int, int,
                                    const char * const *, bool *, bool *);
 extern void expand_asm_stmt (gimple);
 extern tree resolve_asm_operand_names (tree, tree, tree, tree);
-extern void expand_case (gimple);
 #ifdef HARD_CONST
 /* Silly ifdef to avoid having all includers depend on hard-reg-set.h.  */
 extern tree tree_overlaps_hard_reg_set (tree, HARD_REG_SET *);
@@ -6127,19 +4696,6 @@ extern tree tree_overlaps_hard_reg_set (tree, HARD_REG_SET *);
 \f
 /* In tree-inline.c  */
 
-/* The type of a set of already-visited pointers.  Functions for creating
-   and manipulating it are declared in pointer-set.h */
-struct pointer_set_t;
-
-/* The type of a callback function for walking over tree structure.  */
-
-typedef tree (*walk_tree_fn) (tree *, int *, void *);
-
-/* The type of a callback function that represents a custom walk_tree.  */
-
-typedef tree (*walk_tree_lh) (tree *, int *, tree (*) (tree *, int *, void *),
-                             void *, struct pointer_set_t*);
-
 extern tree walk_tree_1 (tree*, walk_tree_fn, void*, struct pointer_set_t*,
                         walk_tree_lh);
 extern tree walk_tree_without_duplicates_1 (tree*, walk_tree_fn, void*,
@@ -6154,117 +4710,39 @@ extern tree walk_tree_without_duplicates_1 (tree*, walk_tree_fn, void*,
 
 extern void set_decl_rtl (tree, rtx);
 extern void set_decl_incoming_rtl (tree, rtx, bool);
-\f
-/* Enum and arrays used for tree allocation stats.
-   Keep in sync with tree.c:tree_node_kind_names.  */
-typedef enum
-{
-  d_kind,
-  t_kind,
-  b_kind,
-  s_kind,
-  r_kind,
-  e_kind,
-  c_kind,
-  id_kind,
-  vec_kind,
-  binfo_kind,
-  ssa_name_kind,
-  constr_kind,
-  x_kind,
-  lang_decl,
-  lang_type,
-  omp_clause_kind,
-  all_kinds
-} tree_node_kind;
-
-extern int tree_node_counts[];
-extern int tree_node_sizes[];
-
-/* True if we are in gimple form and the actions of the folders need to
-   be restricted.  False if we are not in gimple form and folding is not
-   restricted to creating gimple expressions.  */
-extern bool in_gimple_form;
 
 /* In gimple.c.  */
 extern tree get_base_address (tree t);
 extern void mark_addressable (tree);
 
 /* In tree.c.  */
-
-struct GTY(()) tree_map_base {
-  tree from;
-};
-
 extern int tree_map_base_eq (const void *, const void *);
 extern unsigned int tree_map_base_hash (const void *);
 extern int tree_map_base_marked_p (const void *);
 extern bool list_equal_p (const_tree, const_tree);
 
-/* Map from a tree to another tree.  */
-
-struct GTY(()) tree_map {
-  struct tree_map_base base;
-  unsigned int hash;
-  tree to;
-};
-
 #define tree_map_eq tree_map_base_eq
 extern unsigned int tree_map_hash (const void *);
 #define tree_map_marked_p tree_map_base_marked_p
 
-/* Map from a decl tree to another tree.  */
-
-struct GTY(()) tree_decl_map {
-  struct tree_map_base base;
-  tree to;
-};
-
 #define tree_decl_map_eq tree_map_base_eq
 extern unsigned int tree_decl_map_hash (const void *);
 #define tree_decl_map_marked_p tree_map_base_marked_p
 
-/* Map from a tree to an int.  */
-
-struct GTY(()) tree_int_map {
-  struct tree_map_base base;
-  unsigned int to;
-};
-
 #define tree_int_map_eq tree_map_base_eq
 #define tree_int_map_hash tree_map_base_hash
 #define tree_int_map_marked_p tree_map_base_marked_p
 
-/* Map from a tree to initialization/finalization priorities.  */
-
-struct GTY(()) tree_priority_map {
-  struct tree_map_base base;
-  priority_type init;
-  priority_type fini;
-};
-
 #define tree_priority_map_eq tree_map_base_eq
 #define tree_priority_map_hash tree_map_base_hash
 #define tree_priority_map_marked_p tree_map_base_marked_p
 
-/* Map from a decl tree to a tree vector.  */
-
-struct GTY(()) tree_vec_map {
-  struct tree_map_base base;
-  VEC(tree,gc) *to;
-};
-
 #define tree_vec_map_eq tree_map_base_eq
 #define tree_vec_map_hash tree_decl_map_hash
 #define tree_vec_map_marked_p tree_map_base_marked_p
 
-/* In tree-ssa.c */
-
-tree target_for_debug_bind (tree);
-
 /* In tree-ssa-address.c.  */
 extern tree tree_mem_ref_addr (tree, tree);
-extern void copy_mem_ref_info (tree, tree);
 extern void copy_ref_info (tree, tree);
 
 /* In tree-vrp.c */
@@ -6282,6 +4760,9 @@ extern unsigned HOST_WIDE_INT compute_builtin_object_size (tree, int);
    succeed.  */
 extern int can_move_by_pieces (unsigned HOST_WIDE_INT, unsigned int);
 
+/* Is it an ADDR_EXPR of a DECL that's not in memory?  */
+extern bool addr_expr_of_non_mem_decl_p (tree);
+
 extern unsigned HOST_WIDE_INT highest_pow2_factor (const_tree);
 extern tree build_personality_function (const char *);
 
@@ -6304,23 +4785,6 @@ is_tm_safe_or_pure (const_tree x)
 
 void init_inline_once (void);
 
-/* Abstract iterators for CALL_EXPRs.  These static inline definitions
-   have to go towards the end of tree.h so that union tree_node is fully
-   defined by this point.  */
-
-/* Structure containing iterator state.  */
-typedef struct call_expr_arg_iterator_d {
-  tree t;      /* the call_expr */
-  int n;       /* argument count */
-  int i;       /* next argument index */
-} call_expr_arg_iterator;
-
-typedef struct const_call_expr_arg_iterator_d {
-  const_tree t;        /* the call_expr */
-  int n;       /* argument count */
-  int i;       /* next argument index */
-} const_call_expr_arg_iterator;
-
 /* Initialize the abstract argument list iterator object ITER with the
    arguments from CALL_EXPR node EXP.  */
 static inline void
@@ -6415,19 +4879,8 @@ is_lang_specific (tree t)
 /* In gimple-low.c.  */
 extern bool block_may_fallthru (const_tree);
 
-\f
-/* Functional interface to the builtin functions.  */
-
-/* The builtin_info structure holds the FUNCTION_DECL of the standard builtin
-   function, and a flag that says if the function is available implicitly, or
-   whether the user has to code explicit calls to __builtin_<xxx>.  */
-
-typedef struct GTY(()) builtin_info_type_d {
-  tree decl[(int)END_BUILTINS];
-  bool implicit_p[(int)END_BUILTINS];
-} builtin_info_type;
-
-extern GTY(()) builtin_info_type builtin_info;
+/* In vtable-verify.c.  */
+extern void save_vtable_map_decl (tree);
 
 /* Valid builtin number.  */
 #define BUILTIN_VALID_P(FNCODE) \
@@ -6505,4 +4958,26 @@ builtin_decl_implicit_p (enum built_in_function fncode)
          && builtin_info.implicit_p[uns_fncode]);
 }
 
+/* For anonymous aggregate types, we need some sort of name to
+   hold on to.  In practice, this should not appear, but it should
+   not be harmful if it does.  */
+#ifndef NO_DOT_IN_LABEL
+#define ANON_AGGRNAME_FORMAT "._%d"
+#define ANON_AGGRNAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == '.' \
+                                 && IDENTIFIER_POINTER (ID_NODE)[1] == '_')
+#else /* NO_DOT_IN_LABEL */
+#ifndef NO_DOLLAR_IN_LABEL
+#define ANON_AGGRNAME_FORMAT "$_%d"
+#define ANON_AGGRNAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == '$' \
+                                 && IDENTIFIER_POINTER (ID_NODE)[1] == '_')
+#else /* NO_DOLLAR_IN_LABEL */
+#define ANON_AGGRNAME_PREFIX "__anon_"
+#define ANON_AGGRNAME_P(ID_NODE) \
+  (!strncmp (IDENTIFIER_POINTER (ID_NODE), ANON_AGGRNAME_PREFIX, \
+            sizeof (ANON_AGGRNAME_PREFIX) - 1))
+#define ANON_AGGRNAME_FORMAT "__anon_%d"
+#endif /* NO_DOLLAR_IN_LABEL */
+#endif /* NO_DOT_IN_LABEL */
+
+
 #endif  /* GCC_TREE_H  */