From 301e21af2c964ac3f7505d5bf9a45d2fe812ff29 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 19 Jan 2000 09:04:41 +0000 Subject: tree.c (bot_manip): Set DECL_CONTEXT for newly created VAR_DECLs. * tree.c (bot_manip): Set DECL_CONTEXT for newly created VAR_DECLs. From-SVN: r31498 --- gcc/cp/tree.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/cp/tree.c') diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 3bf874a..432ec29 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1560,9 +1560,13 @@ bot_manip (tp, walk_subtrees, data) } else { + tree var; + u = copy_node (t); - TREE_OPERAND (u, 0) = build (VAR_DECL, TREE_TYPE (t)); - layout_decl (TREE_OPERAND (u, 0), 0); + var = build (VAR_DECL, TREE_TYPE (t)); + DECL_CONTEXT (var) = current_function_decl; + layout_decl (var, 0); + TREE_OPERAND (u, 0) = var; } /* Map the old variable to the new one. */ -- cgit v1.1