summaryrefslogtreecommitdiff
path: root/gcc/gimple-streamer-in.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-19 13:37:06 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-19 13:37:06 +0000
commit93784f3f33e981fe4ec2c47ee4e8e7992e27c66d (patch)
tree8678308941db6bfb85a842ad2b1eb1d57223cf57 /gcc/gimple-streamer-in.c
parent705de1ef33cb6ed0b75efc76ced472b450d684a6 (diff)
downloadgcc-93784f3f33e981fe4ec2c47ee4e8e7992e27c66d.tar.gz
2011-12-19 Richard Guenther <rguenther@suse.de>
PR lto/51572 * tree.c (free_lang_data_in_type): Do not unlink TYPE_DECL from TYPE_FIELDS. (find_decls_types_r): Walk TYPE_DECLs in TYPE_FIELDS. * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Do not stream TREE_CHAIN. (write_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS using streamer_write_chain. * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers): Do not stream TREE_CHAIN. (lto_input_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS using streamer_read_chain. * gimple-streamer-in.c (input_gimple_stmt): Skip non-FIELD_DECLs. * gimple.c (gimple_canonical_types_compatible_p): Properly handle trailing non-FIELD_DECLs in TYPE_FIELDS. * g++.dg/lto/pr51572-2_0.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182479 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-streamer-in.c')
-rw-r--r--gcc/gimple-streamer-in.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple-streamer-in.c b/gcc/gimple-streamer-in.c
index dc112d0dd93..1b6bf4bd6d7 100644
--- a/gcc/gimple-streamer-in.c
+++ b/gcc/gimple-streamer-in.c
@@ -162,6 +162,8 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
type = DECL_CONTEXT (field);
for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
{
+ if (TREE_CODE (tem) != FIELD_DECL)
+ continue;
if (tem == field)
break;
if (DECL_NONADDRESSABLE_P (tem)