aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/gimplify.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6e73c30..902857b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/27395
+ * gimplify.c (gimplify_scan_omp_clauses): Compare OMP_CLAUSE_CODE
+ rather than TREE_CODE to OMP_CLAUSE_REDUCTION. Set also GOVD_SEEN
+ bit for OMP_CLAUSE_REDUCTION_PLACEHOLDER.
+
2006-05-02 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/26626
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index af3d924..91b8881 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -4510,11 +4510,11 @@ gimplify_scan_omp_clauses (tree *list_p, tree *pre_p, bool in_parallel)
&& DECL_BY_REFERENCE (TREE_OPERAND (decl, 0)))
OMP_CLAUSE_DECL (c) = decl = TREE_OPERAND (decl, 0);
omp_add_variable (ctx, decl, flags);
- if (TREE_CODE (c) == OMP_CLAUSE_REDUCTION
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION
&& OMP_CLAUSE_REDUCTION_PLACEHOLDER (c))
{
omp_add_variable (ctx, OMP_CLAUSE_REDUCTION_PLACEHOLDER (c),
- GOVD_LOCAL);
+ GOVD_LOCAL | GOVD_SEEN);
gimplify_omp_ctxp = ctx;
push_gimplify_context ();
gimplify_stmt (&OMP_CLAUSE_REDUCTION_INIT (c));