diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-03-21 20:13:06 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-03-21 20:13:06 +0000 |
commit | ec47ccca041a0d14973c5151914ce0930d55ff1c (patch) | |
tree | 8ada21a8d059e7bf3064be40e7948e7c9d9bcada /gcc/cp/tree.c | |
parent | b8de2d021a0d6798e4b611078c667a6ac7f81a67 (diff) | |
download | gcc-ec47ccca041a0d14973c5151914ce0930d55ff1c.zip gcc-ec47ccca041a0d14973c5151914ce0930d55ff1c.tar.gz gcc-ec47ccca041a0d14973c5151914ce0930d55ff1c.tar.bz2 |
tree.c (mark_local_for_remap_p): Mark variables declared in TARGET_EXPRs as well.
* tree.c (mark_local_for_remap_p): Mark variables declared in
TARGET_EXPRs as well.
From-SVN: r32675
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 84c7f3f..1409020 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2317,18 +2317,24 @@ mark_local_for_remap_r (tp, walk_subtrees, data) { tree t = *tp; splay_tree st = (splay_tree) data; + tree decl; - if ((TREE_CODE (t) == DECL_STMT - && nonstatic_local_decl_p (DECL_STMT_DECL (t))) - || TREE_CODE (t) == LABEL_STMT) + + if (TREE_CODE (t) == DECL_STMT + && nonstatic_local_decl_p (DECL_STMT_DECL (t))) + decl = DECL_STMT_DECL (t); + else if (TREE_CODE (t) == LABEL_STMT) + decl = LABEL_STMT_LABEL (t); + else if (TREE_CODE (t) == TARGET_EXPR + && nonstatic_local_decl_p (TREE_OPERAND (t, 0))) + decl = TREE_OPERAND (t, 0); + else + decl = NULL_TREE; + + if (decl) { - tree decl; tree copy; - /* Figure out what's being declared. */ - decl = (TREE_CODE (t) == DECL_STMT - ? DECL_STMT_DECL (t) : LABEL_STMT_LABEL (t)); - /* Make a copy. */ copy = copy_decl_for_inlining (decl, DECL_CONTEXT (decl), @@ -2344,7 +2350,7 @@ mark_local_for_remap_r (tp, walk_subtrees, data) } /* Called via walk_tree when an expression is unsaved. Using the - splay_tree pointed to by ST (which is really a `splay_tree *'), + splay_tree pointed to by ST (which is really a `splay_tree'), remaps all local declarations to appropriate replacements. */ static tree |