From f852f61b8e85c913f5d2017ad687544c843b0d61 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 25 May 2009 22:11:16 +0000 Subject: * Merge from mainline. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/pretty-ipa@147853 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'gcc/tree.c') diff --git a/gcc/tree.c b/gcc/tree.c index b1ab5a5d66c..ddfa0a43258 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4075,6 +4075,7 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags, bool *no_add_attrs) { tree node = *pnode; + bool is_dllimport; /* These attributes may apply to structure and union types being created, but otherwise should pass to the declaration involved. */ @@ -4122,9 +4123,11 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags, return NULL_TREE; } + is_dllimport = is_attribute_p ("dllimport", name); + /* Report error on dllimport ambiguities seen now before they cause any damage. */ - else if (is_attribute_p ("dllimport", name)) + if (is_dllimport) { /* Honor any target-specific overrides. */ if (!targetm.valid_dllimport_attribute_p (node)) @@ -4166,6 +4169,9 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags, if (*no_add_attrs == false) DECL_DLLIMPORT_P (node) = 1; } + else if (DECL_DECLARED_INLINE_P (node)) + /* An exported function, even if inline, must be emitted. */ + DECL_EXTERNAL (node) = 0; /* Report error if symbol is not accessible at global scope. */ if (!TREE_PUBLIC (node) @@ -5416,11 +5422,13 @@ iterative_hash_expr (const_tree t, hashval_t val) return val; } case FUNCTION_DECL: - /* When referring to a built-in FUNCTION_DECL, use the - __builtin__ form. Otherwise nodes that compare equal - according to operand_equal_p might get different - hash codes. */ - if (DECL_BUILT_IN (t) && built_in_decls[DECL_FUNCTION_CODE (t)]) + /* When referring to a built-in FUNCTION_DECL, use the __builtin__ form. + Otherwise nodes that compare equal according to operand_equal_p might + get different hash codes. However, don't do this for machine specific + or front end builtins, since the function code is overloaded in those + cases. */ + if (DECL_BUILT_IN_CLASS (t) == BUILT_IN_NORMAL + && built_in_decls[DECL_FUNCTION_CODE (t)]) { t = built_in_decls[DECL_FUNCTION_CODE (t)]; code = TREE_CODE (t); @@ -7438,7 +7446,8 @@ make_vector_type (tree innertype, int nunits, enum machine_mode mode) { tree index = build_int_cst (NULL_TREE, nunits - 1); - tree array = build_array_type (innertype, build_index_type (index)); + tree array = build_array_type (TYPE_MAIN_VARIANT (innertype), + build_index_type (index)); tree rt = make_node (RECORD_TYPE); TYPE_FIELDS (rt) = build_decl (FIELD_DECL, get_identifier ("f"), array); @@ -8955,10 +8964,6 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data, WALK_SUBTREE_TAIL (TREE_OPERAND (*tp, len)); } - case CHANGE_DYNAMIC_TYPE_EXPR: - WALK_SUBTREE (CHANGE_DYNAMIC_TYPE_NEW_TYPE (*tp)); - WALK_SUBTREE_TAIL (CHANGE_DYNAMIC_TYPE_LOCATION (*tp)); - case DECL_EXPR: /* If this is a TYPE_DECL, walk into the fields of the type that it's defining. We only want to walk into these fields of a type in this -- cgit v1.2.3