summaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-in.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r--gcc/lto-streamer-in.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 3c31b04f8c3..5c6658a9f99 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1094,7 +1094,9 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
{
if (tem == field
|| (TREE_TYPE (tem) == TREE_TYPE (field)
- && compare_field_offset (tem, field)))
+ && DECL_NONADDRESSABLE_P (tem)
+ == DECL_NONADDRESSABLE_P (field)
+ && gimple_compare_field_offset (tem, field)))
break;
}
/* In case of type mismatches across units we can fail