of an alias. This requires that the decl have been defined. Aliases
that precede their definition have to be queued for later processing. */
+/* The deferred processing proceeds in several passes. We memorize the
+ diagnostics emitted for a pair to prevent repeating messages when the
+ queue gets re-scanned after possible updates. */
+
+typedef enum {
+ ALIAS_DIAG_NONE = 0x0,
+ ALIAS_DIAG_TO_UNDEF = 0x1,
+ ALIAS_DIAG_TO_EXTERN = 0x2
+} alias_diag_flags;
+
typedef struct GTY(()) alias_pair
{
tree decl;
- tree target;
+ tree target;
+ int emitted_diags; /* alias_diags already emitted for this pair. */
} alias_pair;
/* Define gc'd vector type. */
unsigned visited : 1;
unsigned packed_flag : 1;
unsigned user_align : 1;
+ unsigned nameless_flag : 1;
- unsigned spare : 13;
+ unsigned spare : 12;
/* This field is only used with type nodes; the only reason it is present
in tree_base instead of tree_type is to save space. The size of the
__FILE__, __LINE__, __FUNCTION__); \
&__t->exp.operands[__i]; }))
-#define TREE_RTL_OPERAND_CHECK(T, CODE, I) __extension__ \
-(*(rtx *) \
- ({__typeof (T) const __t = (T); \
- const int __i = (I); \
- if (TREE_CODE (__t) != (CODE)) \
- tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, (CODE), 0); \
- if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__t)) \
- tree_operand_check_failed (__i, __t, \
- __FILE__, __LINE__, __FUNCTION__); \
- &__t->exp.operands[__i]; }))
-
/* Nodes are chained together for many purposes.
Types are chained together to record them for being output to the debugger
(see the function `chain_type').
#define TREE_VEC_ELT_CHECK(T, I) ((T)->vec.a[I])
#define TREE_OPERAND_CHECK(T, I) ((T)->exp.operands[I])
#define TREE_OPERAND_CHECK_CODE(T, CODE, I) ((T)->exp.operands[I])
-#define TREE_RTL_OPERAND_CHECK(T, CODE, I) (*(rtx *) &((T)->exp.operands[I]))
#define OMP_CLAUSE_ELT_CHECK(T, i) ((T)->omp_clause.ops[i])
#define OMP_CLAUSE_RANGE_CHECK(T, CODE1, CODE2) (T)
#define OMP_CLAUSE_SUBCODE_CHECK(T, CODE) (T)
#define TMR_INDEX(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 2))
#define TMR_STEP(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 3))
#define TMR_OFFSET(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 4))
-#define TMR_ORIGINAL(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 5))
/* The operands of a BIND_EXPR. */
#define BIND_EXPR_VARS(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 0))
the term. */
#define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->type.restrict_flag)
+/* If nonzero, type's name shouldn't be emitted into debug info. */
+#define TYPE_NAMELESS(NODE) (TYPE_CHECK (NODE)->base.nameless_flag)
+
/* The address space the type is in. */
#define TYPE_ADDR_SPACE(NODE) (TYPE_CHECK (NODE)->base.address_space)
struct function;
+#define DECL_CHAIN(NODE) (TREE_CHAIN (DECL_MINIMAL_CHECK (NODE)))
/* This is the name of the object as written by the user.
It is an IDENTIFIER_NODE. */
#define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context)
#define DECL_FIELD_CONTEXT(NODE) \
(FIELD_DECL_CHECK (NODE)->decl_minimal.context)
+
+/* If nonzero, decl's name shouldn't be emitted into debug info. */
+#define DECL_NAMELESS(NODE) (DECL_MINIMAL_CHECK (NODE)->base.nameless_flag)
+
struct GTY(()) tree_decl_minimal {
struct tree_common common;
location_t locus;
/* Specify that DECL_ALIGN(NODE) is a multiple of X. */
#define SET_DECL_OFFSET_ALIGN(NODE, X) \
- (FIELD_DECL_CHECK (NODE)->decl_common.off_align = exact_log2 ((X) & -(X)))
-/* 1 if the alignment for this type was requested by "aligned" attribute,
- 0 if it is the default for this type. */
+ (FIELD_DECL_CHECK (NODE)->decl_common.off_align = ffs_hwi (X) - 1)
/* For FIELD_DECLS, DECL_FCONTEXT is the *first* baseclass in
which this FIELD_DECL is defined. This information is needed when
not be treated as replaceable so that use of C++ template
instantiations is not penalized.
+ In other respects, the condition is usually equivalent to whether
+ the function binds to the current module (shared library or executable).
+ However, weak functions can always be overridden by earlier TUs
+ in the same module, even if they bind locally to that module.
+
For example, DECL_REPLACEABLE is used to determine whether or not a
function (including a template instantiation) which is not
explicitly declared "inline" can be inlined. If the function is
function that is not DECL_REPLACEABLE can be inlined, since all
versions of the function will be functionally identical. */
#define DECL_REPLACEABLE_P(NODE) \
- (!DECL_COMDAT (NODE) && !targetm.binds_local_p (NODE))
+ (!DECL_COMDAT (NODE) && (DECL_WEAK (NODE) || !targetm.binds_local_p (NODE)))
/* The name of the object as the assembler will see it (but before any
translations made by ASM_OUTPUT_LABELREF). Often this is the same
TI_INTEGER_ZERO,
TI_INTEGER_ONE,
+ TI_INTEGER_THREE,
TI_INTEGER_MINUS_ONE,
TI_NULL_POINTER,
#define integer_zero_node global_trees[TI_INTEGER_ZERO]
#define integer_one_node global_trees[TI_INTEGER_ONE]
+#define integer_three_node global_trees[TI_INTEGER_THREE]
#define integer_minus_one_node global_trees[TI_INTEGER_MINUS_ONE]
#define size_zero_node global_trees[TI_SIZE_ZERO]
#define size_one_node global_trees[TI_SIZE_ONE]
extern int tree_int_cst_equal (const_tree, const_tree);
extern int tree_int_cst_lt (const_tree, const_tree);
extern int tree_int_cst_compare (const_tree, const_tree);
-extern int host_integerp (const_tree, int);
+extern int host_integerp (const_tree, int)
+#ifndef ENABLE_TREE_CHECKING
+ ATTRIBUTE_PURE /* host_integerp is pure only when checking is disabled. */
+#endif
+ ;
extern HOST_WIDE_INT tree_low_cst (const_tree, int);
+#if !defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 4003)
+extern inline __attribute__ ((__gnu_inline__)) HOST_WIDE_INT
+tree_low_cst (const_tree t, int pos)
+{
+ gcc_assert (host_integerp (t, pos));
+ return TREE_INT_CST_LOW (t);
+}
+#endif
extern int tree_int_cst_msb (const_tree);
extern int tree_int_cst_sgn (const_tree);
extern int tree_int_cst_sign_bit (const_tree);
extern tree fold_builtin_snprintf_chk (location_t, tree, tree, enum built_in_function);
extern bool fold_builtin_next_arg (tree, bool);
extern enum built_in_function builtin_mathfn_code (const_tree);
-extern tree build_function_call_expr (location_t, tree, 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 (location_t, tree, int, ...);
extern tree build_call_expr (tree, int, ...);
extern tree mathfn_built_in (tree, enum built_in_function fn);
extern bool validate_arglist (const_tree, ...);
extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode);
extern bool can_trust_pointer_alignment (void);
-extern int get_pointer_alignment (tree, unsigned int);
+extern unsigned int get_pointer_alignment (tree, unsigned int);
extern bool is_builtin_name (const char *);
extern bool is_builtin_fn (tree);
-extern int get_object_alignment (tree, unsigned int, unsigned int);
+extern unsigned int get_object_alignment (tree, unsigned int);
extern tree fold_call_stmt (gimple, bool);
extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function);
extern tree make_range (tree, int *, tree *, tree *, bool *);
extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int,
tree, tree);
extern void set_builtin_user_assembler_name (tree decl, const char *asmspec);
+extern bool is_simple_builtin (tree);
+extern bool is_inexpensive_builtin (tree);
/* In convert.c */
extern tree strip_float_extensions (tree);
extern int really_constant_p (const_tree);
extern bool decl_address_invariant_p (const_tree);
extern bool decl_address_ip_invariant_p (const_tree);
-extern int int_fits_type_p (const_tree, const_tree);
+extern bool int_fits_type_p (const_tree, const_tree);
#ifndef GENERATOR_FILE
extern void get_type_static_bounds (const_tree, mpz_t, mpz_t);
#endif
extern void process_pending_assemble_externals (void);
extern void finish_aliases_1 (void);
extern void finish_aliases_2 (void);
-extern tree emutls_decl (tree);
extern void remove_unreachable_alias_pairs (void);
/* In stmt.c */
e_kind,
c_kind,
id_kind,
- perm_list_kind,
- temp_list_kind,
vec_kind,
binfo_kind,
ssa_name_kind,