From 67b18080a93ea6b2c475f3385ab6d28f9ae20642 Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 15 Dec 2009 11:32:49 +0000 Subject: [PATCH] 2009-12-15 Richard Guenther * gimple.h (compare_field_offset): Declare. * gimple.c (compare_field_offset): Export. * lto-streamer-in.c (input_gimple_stmt): Use compare_field_offset. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155250 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/gimple.c | 2 +- gcc/gimple.h | 1 + gcc/lto-streamer-in.c | 7 +------ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index df110ad4df6..f214d42c217 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2009-12-15 Richard Guenther + * gimple.h (compare_field_offset): Declare. + * gimple.c (compare_field_offset): Export. + * lto-streamer-in.c (input_gimple_stmt): Use compare_field_offset. + +2009-12-15 Richard Guenther + * lto-cgraph.c (lto_output_node): Also stream the alias for regular aliases. (input_node): Likewise. diff --git a/gcc/gimple.c b/gcc/gimple.c index a04683a87ac..02d8cc4a5df 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3171,7 +3171,7 @@ compare_type_names_p (tree t1, tree t2, bool for_completion_p) /* Return true if the field decls F1 and F2 are at the same offset. */ -static bool +bool compare_field_offset (tree f1, tree f2) { if (DECL_OFFSET_ALIGN (f1) == DECL_OFFSET_ALIGN (f2)) diff --git a/gcc/gimple.h b/gcc/gimple.h index 7872d9e30e5..8bddb2a38b7 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -921,6 +921,7 @@ extern bool is_gimple_call_addr (tree); extern tree get_call_expr_in (tree t); extern void recalculate_side_effects (tree); +extern bool compare_field_offset (tree, tree); extern tree gimple_register_type (tree); extern void print_gimple_types_stats (void); extern void free_gimple_type_tables (void); diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 9f831a85409..ea657e1acdf 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1082,12 +1082,7 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in, { if (tem == field || (TREE_TYPE (tem) == TREE_TYPE (field) - && (DECL_FIELD_OFFSET (tem) - == DECL_FIELD_OFFSET (field)) - && (DECL_FIELD_BIT_OFFSET (tem) - == DECL_FIELD_BIT_OFFSET (field)) - && (DECL_OFFSET_ALIGN (tem) - == DECL_OFFSET_ALIGN (field)))) + && compare_field_offset (tem, field))) break; } /* In case of type mismatches across units we can fail -- 2.11.0