summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-05-03 12:51:33 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-05-03 12:51:33 +0000
commit0f9d10d4176bb57e4335378c03ba7db6d55441e4 (patch)
tree5d4261cec1895613e4c02fd637f62bdfa2874e9b /gcc/gimplify.c
parent4bef19cc49ffafbe2c840058c28ef7576d3b67f7 (diff)
downloadgcc-0f9d10d4176bb57e4335378c03ba7db6d55441e4.tar.gz
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. * testsuite/libgomp.fortran/pr27395-1.f90: New test. * testsuite/libgomp.fortran/pr27395-2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113494 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index af3d9243128..91b88810f38 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));