From: jakub Date: Mon, 16 Mar 2015 16:10:17 +0000 (+0000) Subject: PR middle-end/65431 X-Git-Tag: upstream/5.3.0~1305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42d493547abd84fb5a3a2aeea9e3c0db3825e4c6;p=platform%2Fupstream%2Flinaro-gcc.git PR middle-end/65431 * omp-low.c (delete_omp_context): Only splay_tree_delete reduction_map in GIMPLE_OMP_TARGET is_gimple_omp_offloaded is_gimple_omp_oacc contexts. Don't look at ctx->outer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221459 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9328188..6af257e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-03-16 Jakub Jelinek + + PR middle-end/65431 + * omp-low.c (delete_omp_context): Only splay_tree_delete + reduction_map in GIMPLE_OMP_TARGET is_gimple_omp_offloaded + is_gimple_omp_oacc contexts. Don't look at ctx->outer. + 2015-03-16 Max Ostapenko PR sanitizer/64820 diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 2d64a74..1ecc6f8 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -1580,10 +1580,12 @@ delete_omp_context (splay_tree_value value) splay_tree_delete (ctx->field_map); if (ctx->sfield_map) splay_tree_delete (ctx->sfield_map); + /* Reduction map is copied to nested contexts, so only delete it in the + owner. */ if (ctx->reduction_map - /* Shared over several omp_contexts. */ - && (ctx->outer == NULL - || ctx->reduction_map != ctx->outer->reduction_map)) + && gimple_code (ctx->stmt) == GIMPLE_OMP_TARGET + && is_gimple_omp_offloaded (ctx->stmt) + && is_gimple_omp_oacc (ctx->stmt)) splay_tree_delete (ctx->reduction_map); /* We hijacked DECL_ABSTRACT_ORIGIN earlier. We need to clear it before