From e35f74d5cd4b44925efd02c63399b5e83f086fb2 Mon Sep 17 00:00:00 2001 From: rguenth Date: Wed, 19 May 2010 15:57:17 +0000 Subject: 2010-05-19 Richard Guenther 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 --- gcc/tree.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/tree.c') 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); -- cgit v1.2.1