summaryrefslogtreecommitdiffstats
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-13 08:55:40 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-13 08:55:40 +0000
commit0c2f12e9e92e5f3a706b22d3f39ace202734852c (patch)
tree05d681245e58a72d16cb2087bd700186752c60c2 /gcc/tree-nested.c
parentec469632f7417286c3cd183f9d84dee8d9469baa (diff)
downloadppe42-gcc-0c2f12e9e92e5f3a706b22d3f39ace202734852c.tar.gz
ppe42-gcc-0c2f12e9e92e5f3a706b22d3f39ace202734852c.zip
PR debug/26754
* gimplify.c (declare_tmp_vars): Rename into declare_vars. Add debug_info parameter. Chain the vars to the BLOCK instead of the BIND_EXPR if debug info are requested for them. (pop_gimplify_context): Adjust for above change. (gimple_add_tmp_var): Likewise. * tree-gimple.h (declare_tmp_vars): Rename into declare_vars. Add bool parameter. * tree-nested.c (convert_nonlocal_reference): Adjust for above change. (convert_local_reference): Likewise. (get_local_debug_decl): Set DECL_IGNORED_P on the original variable. (finalize_nesting_tree_1): Request that debug info be emitted for debug_var_chain. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114605 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index 886681983ee..67a13c28a99 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -1048,7 +1048,7 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
walk_body (convert_nonlocal_reference, info, &OMP_PARALLEL_BODY (t));
if (info->new_local_var_chain)
- declare_tmp_vars (info->new_local_var_chain, OMP_PARALLEL_BODY (t));
+ declare_vars (info->new_local_var_chain, OMP_PARALLEL_BODY (t), false);
info->new_local_var_chain = save_local_var_chain;
info->suppress_expansion = save_suppress;
break;
@@ -1186,6 +1186,9 @@ get_local_debug_decl (struct nesting_info *info, tree decl, tree field)
TREE_CHAIN (new_decl) = info->debug_var_chain;
info->debug_var_chain = new_decl;
+ /* Do not emit debug info twice. */
+ DECL_IGNORED_P (decl) = 1;
+
return new_decl;
}
@@ -1331,7 +1334,7 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data)
walk_body (convert_local_reference, info, &OMP_PARALLEL_BODY (t));
if (info->new_local_var_chain)
- declare_tmp_vars (info->new_local_var_chain, OMP_PARALLEL_BODY (t));
+ declare_vars (info->new_local_var_chain, OMP_PARALLEL_BODY (t), false);
info->new_local_var_chain = save_local_var_chain;
info->suppress_expansion = save_suppress;
break;
@@ -1804,11 +1807,11 @@ finalize_nesting_tree_1 (struct nesting_info *root)
/* Make sure all new local variables get inserted into the
proper BIND_EXPR. */
if (root->new_local_var_chain)
- declare_tmp_vars (root->new_local_var_chain,
- DECL_SAVED_TREE (root->context));
+ declare_vars (root->new_local_var_chain, DECL_SAVED_TREE (root->context),
+ false);
if (root->debug_var_chain)
- declare_tmp_vars (root->debug_var_chain,
- DECL_SAVED_TREE (root->context));
+ declare_vars (root->debug_var_chain, DECL_SAVED_TREE (root->context),
+ true);
/* Dump the translated tree function. */
dump_function (TDI_nested, root->context);
OpenPOWER on IntegriCloud