aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-05-19 15:57:17 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-05-19 15:57:17 +0000
commit817c299606addcce4e2b253a5ed3d462bc54c312 (patch)
treed57e2f3593ba30034963c7090c0cdf3a446c7ba3 /gcc/tree.c
parentc04b6b3823c92bd06e1a6b33d1a05003f1760df7 (diff)
downloadgcc-817c299606addcce4e2b253a5ed3d462bc54c312.zip
gcc-817c299606addcce4e2b253a5ed3d462bc54c312.tar.gz
gcc-817c299606addcce4e2b253a5ed3d462bc54c312.tar.bz2
re PR lto/44196 (lto1: ICE: tree check: expected field_decl, have type_decl in gimple_types_compatible_p, at gimple.c:3597)
2010-05-19 Richard Guenther <rguenther@suse.de> PR lto/44196 * tree.c (find_decls_types_r): Walk BLOCKs and its vars. * g++.dg/lto/20100519-1_0.C: New testcase. From-SVN: r159582
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 76be316..fbf24b1 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4713,6 +4713,15 @@ find_decls_types_r (tree *tp, int *ws, void *data)
fld_worklist_push (TREE_CHAIN (t), fld);
*ws = 0;
}
+ else if (TREE_CODE (t) == BLOCK)
+ {
+ tree tem;
+ for (tem = BLOCK_VARS (t); tem; tem = TREE_CHAIN (tem))
+ fld_worklist_push (tem, fld);
+ for (tem = BLOCK_SUBBLOCKS (t); tem; tem = BLOCK_CHAIN (tem))
+ fld_worklist_push (tem, fld);
+ fld_worklist_push (BLOCK_ABSTRACT_ORIGIN (t), fld);
+ }
fld_worklist_push (TREE_TYPE (t), fld);