diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-04-22 16:10:45 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-04-22 16:10:45 +0200 |
commit | 144f4153e89ec081e3607c97b4d76bcfc06bba19 (patch) | |
tree | ea2c6252d2590e5f5167dd62ab874660e563c51c /gcc/gimplify.c | |
parent | f9fd305bd4dc6498ec0456b8f3c6c6dfad94b87f (diff) | |
download | gcc-144f4153e89ec081e3607c97b4d76bcfc06bba19.zip gcc-144f4153e89ec081e3607c97b4d76bcfc06bba19.tar.gz gcc-144f4153e89ec081e3607c97b4d76bcfc06bba19.tar.bz2 |
re PR c/48716 (gcc OpenMP static variable declared in scope inside construct is predetermined shared)
PR c/48716
* gimplify.c (gimplify_bind_expr): Mark as GOVD_LOCAL also
TREE_STATIC variables declared inside of some OpenMP construct.
* gcc.dg/gomp/pr48716.c: New test.
* g++.dg/gomp/pr48716.C: New test.
From-SVN: r172859
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index f24bea2..a554c20 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1144,7 +1144,7 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp; /* Mark variable as local. */ - if (ctx && !is_global_var (t) + if (ctx && !DECL_EXTERNAL (t) && (! DECL_SEEN_IN_BIND_EXPR_P (t) || splay_tree_lookup (ctx->variables, (splay_tree_key) t) == NULL)) |