summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-19 15:57:17 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-19 15:57:17 +0000
commite35f74d5cd4b44925efd02c63399b5e83f086fb2 (patch)
treed57e2f3593ba30034963c7090c0cdf3a446c7ba3 /gcc/tree.c
parentcba6710d70a592a14d09c798f0a566288c1f9ac9 (diff)
downloadgcc-e35f74d5cd4b44925efd02c63399b5e83f086fb2.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159582 138bc75d-0d04-0410-961f-82ee72b054a4
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 76be316eef9..fbf24b1e8bc 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);