diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-01-19 09:04:41 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-01-19 09:04:41 +0000 |
commit | 301e21af2c964ac3f7505d5bf9a45d2fe812ff29 (patch) | |
tree | 09551cf3747015299663f08b923643d0eeba0790 /gcc/cp/tree.c | |
parent | 1455913a0b38a73b156bb57b3b7275508ead09d3 (diff) | |
download | gcc-301e21af2c964ac3f7505d5bf9a45d2fe812ff29.zip gcc-301e21af2c964ac3f7505d5bf9a45d2fe812ff29.tar.gz gcc-301e21af2c964ac3f7505d5bf9a45d2fe812ff29.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 8 |
1 files changed, 6 insertions, 2 deletions
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. */ |