aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-12-15 11:32:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-12-15 11:32:49 +0000
commit1e4bc4ebc6a934266241e8fefb6f7924a0b7f9b3 (patch)
tree0150abd05882493ceaa352b63e28518e436efe94
parentede51b1f13813c70b32070410496e34f573b2376 (diff)
downloadgcc-1e4bc4ebc6a934266241e8fefb6f7924a0b7f9b3.zip
gcc-1e4bc4ebc6a934266241e8fefb6f7924a0b7f9b3.tar.gz
gcc-1e4bc4ebc6a934266241e8fefb6f7924a0b7f9b3.tar.bz2
gimple.h (compare_field_offset): Declare.
2009-12-15 Richard Guenther <rguenther@suse.de> * gimple.h (compare_field_offset): Declare. * gimple.c (compare_field_offset): Export. * lto-streamer-in.c (input_gimple_stmt): Use compare_field_offset. From-SVN: r155250
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gimple.c2
-rw-r--r--gcc/gimple.h1
-rw-r--r--gcc/lto-streamer-in.c7
4 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index df110ad..f214d42 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2009-12-15 Richard Guenther <rguenther@suse.de>
+ * 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 <rguenther@suse.de>
+
* 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 a04683a..02d8cc4 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 7872d9e..8bddb2a 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 9f831a8..ea657e1 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