aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 4378c43..2f9aede 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