diff options
author | Michael Matz <matz@gcc.gnu.org> | 2011-04-03 11:11:25 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2011-04-03 11:11:25 +0000 |
commit | 91f2fae8cc58e1b1dae3b62e2407903190ed1af4 (patch) | |
tree | 25ab032bda972a888799a728d07c2ae2dce55dec /gcc/tree.c | |
parent | da29e0700f78da1fc757ca9af99b316b236dd03b (diff) | |
download | gcc-91f2fae8cc58e1b1dae3b62e2407903190ed1af4.zip gcc-91f2fae8cc58e1b1dae3b62e2407903190ed1af4.tar.gz gcc-91f2fae8cc58e1b1dae3b62e2407903190ed1af4.tar.bz2 |
tree.c (decl_init_priority_insert): Don't create entry for default priority.
* tree.c (decl_init_priority_insert): Don't create entry for
default priority.
(decl_fini_priority_insert): Ditto.
(fields_compatible_p, find_compatible_field): Remove.
* tree.h (fields_compatible_p, find_compatible_field): Remove.
* gimple.c (gimple_compare_field_offset): Adjust block comment.
From-SVN: r171902
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 48 |
1 files changed, 4 insertions, 44 deletions
@@ -5913,6 +5913,8 @@ decl_init_priority_insert (tree decl, priority_type priority) struct tree_priority_map *h; gcc_assert (VAR_OR_FUNCTION_DECL_P (decl)); + if (priority == DEFAULT_INIT_PRIORITY) + return; h = decl_priority_info (decl); h->init = priority; } @@ -5925,6 +5927,8 @@ decl_fini_priority_insert (tree decl, priority_type priority) struct tree_priority_map *h; gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); + if (priority == DEFAULT_INIT_PRIORITY) + return; h = decl_priority_info (decl); h->fini = priority; } @@ -9893,50 +9897,6 @@ needs_to_live_in_memory (const_tree t) && aggregate_value_p (t, current_function_decl))); } -/* There are situations in which a language considers record types - compatible which have different field lists. Decide if two fields - are compatible. It is assumed that the parent records are compatible. */ - -bool -fields_compatible_p (const_tree f1, const_tree f2) -{ - if (!operand_equal_p (DECL_FIELD_BIT_OFFSET (f1), - DECL_FIELD_BIT_OFFSET (f2), OEP_ONLY_CONST)) - return false; - - if (!operand_equal_p (DECL_FIELD_OFFSET (f1), - DECL_FIELD_OFFSET (f2), OEP_ONLY_CONST)) - return false; - - if (!types_compatible_p (TREE_TYPE (f1), TREE_TYPE (f2))) - return false; - - return true; -} - -/* Locate within RECORD a field that is compatible with ORIG_FIELD. */ - -tree -find_compatible_field (tree record, tree orig_field) -{ - tree f; - - for (f = TYPE_FIELDS (record); f ; f = TREE_CHAIN (f)) - if (TREE_CODE (f) == FIELD_DECL - && fields_compatible_p (f, orig_field)) - return f; - - /* ??? Why isn't this on the main fields list? */ - f = TYPE_VFIELD (record); - if (f && TREE_CODE (f) == FIELD_DECL - && fields_compatible_p (f, orig_field)) - return f; - - /* ??? We should abort here, but Java appears to do Bad Things - with inherited fields. */ - return orig_field; -} - /* Return value of a constant X and sign-extend it. */ HOST_WIDE_INT |