diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-10 15:22:50 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-10 15:22:50 +0000 |
commit | 9f49e155a2e12eb757591d304a04c7569cc6684e (patch) | |
tree | f4a082ece9e1b03e1028c0b236c631ddb2287f34 /gcc/omp-low.c | |
parent | a814d304342605e462a3fc46eac93808a8ef2db1 (diff) | |
download | gcc-9f49e155a2e12eb757591d304a04c7569cc6684e.tar.gz |
PR middle-end/36790
* omp-low.c (lower_omp_2): If task_shared_vars, test all DECL_P
uids in the bitmap, not just VAR_DECL uids.
* gcc.dg/gomp/pr36790.c: New test.
* g++.dg/gomp/pr36790.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 4378c43d402..2f9aedeac39 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -6246,10 +6246,12 @@ lower_omp_2 (tree *tp, int *walk_subtrees, void *data) omp_context *ctx = (omp_context *) data; /* Any variable with DECL_VALUE_EXPR needs to be regimplified. */ - if (TREE_CODE (t) == VAR_DECL - && ((ctx && DECL_HAS_VALUE_EXPR_P (t)) - || (task_shared_vars - && bitmap_bit_p (task_shared_vars, DECL_UID (t))))) + if (TREE_CODE (t) == VAR_DECL && ctx && DECL_HAS_VALUE_EXPR_P (t)) + return t; + + if (task_shared_vars + && DECL_P (t) + && bitmap_bit_p (task_shared_vars, DECL_UID (t))) return t; /* If a global variable has been privatized, TREE_CONSTANT on |