diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-08 09:10:14 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-08 09:10:14 +0000 |
commit | 6d5a8d89ef9e93a14dba828b493cf08275cea620 (patch) | |
tree | 2c1956599725175921f6bf53545ec3831264dff4 /gcc/gimplify.c | |
parent | 237e78b16dc94c639ec7300d26b688f2313dc8e3 (diff) | |
download | gcc-6d5a8d89ef9e93a14dba828b493cf08275cea620.tar.gz |
PR c/59984
* gimplify.c (gimplify_bind_expr): In ORT_SIMD region
mark local addressable non-static vars as GOVD_PRIVATE
instead of GOVD_LOCAL.
* omp-low.c (lower_omp_for): Move gimple_bind_vars
and BLOCK_VARS of gimple_bind_block to new_stmt rather
than copying them.
* gcc.dg/vect/pr59984.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207629 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 9c9998dd193..957a82f107a 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1042,7 +1042,14 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) && (! DECL_SEEN_IN_BIND_EXPR_P (t) || splay_tree_lookup (ctx->variables, (splay_tree_key) t) == NULL)) - omp_add_variable (gimplify_omp_ctxp, t, GOVD_LOCAL | GOVD_SEEN); + { + if (ctx->region_type == ORT_SIMD + && TREE_ADDRESSABLE (t) + && !TREE_STATIC (t)) + omp_add_variable (ctx, t, GOVD_PRIVATE | GOVD_SEEN); + else + omp_add_variable (ctx, t, GOVD_LOCAL | GOVD_SEEN); + } DECL_SEEN_IN_BIND_EXPR_P (t) = 1; |