summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-29 17:45:42 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-29 17:45:42 +0000
commit784ad964da5db2b7202645559ad9b309464effb9 (patch)
treecc238d8f70d98c37fa0b8f86e59aeaeb9dd01f24 /gcc/omp-low.c
parente0b7913f41f51a594cc2df8d5ca2382b65884eba (diff)
downloadgcc-784ad964da5db2b7202645559ad9b309464effb9.tar.gz
PR middle-end/49897
PR middle-end/49898 * omp-low.c (use_pointer_for_field): If disallowing copy-in/out in nested parallel and outer is a gimple_reg, mark it as addressable and set its bit in task_shared_vars bitmap too. * testsuite/libgomp.c/pr49897-1.c: New test. * testsuite/libgomp.c/pr49897-2.c: New test. * testsuite/libgomp.c/pr49898-1.c: New test. * testsuite/libgomp.c/pr49898-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index ccd248c9fe8..0376d927f02 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -781,7 +781,7 @@ use_pointer_for_field (tree decl, omp_context *shared_ctx)
break;
if (c)
- return true;
+ goto maybe_mark_addressable_and_ret;
}
}
@@ -791,7 +791,9 @@ use_pointer_for_field (tree decl, omp_context *shared_ctx)
returns, the task hasn't necessarily terminated. */
if (!TREE_READONLY (decl) && is_task_ctx (shared_ctx))
{
- tree outer = maybe_lookup_decl_in_outer_ctx (decl, shared_ctx);
+ tree outer;
+ maybe_mark_addressable_and_ret:
+ outer = maybe_lookup_decl_in_outer_ctx (decl, shared_ctx);
if (is_gimple_reg (outer))
{
/* Taking address of OUTER in lower_send_shared_vars