aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-openmp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-05-17 10:35:01 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2006-05-17 10:35:01 +0200
commit761041be912de3a0344a507dbb718a49a9c19434 (patch)
tree7de49861b990eff224e646e29a3ad1dd59004468 /gcc/fortran/trans-openmp.c
parent3c5cbea7a14ac6b674443a6d3e0865a696af18ce (diff)
downloadgcc-761041be912de3a0344a507dbb718a49a9c19434.zip
gcc-761041be912de3a0344a507dbb718a49a9c19434.tar.gz
gcc-761041be912de3a0344a507dbb718a49a9c19434.tar.bz2
re PR middle-end/27415 (Iteration var in firstprivate or reduction clauses not reported)
PR middle-end/27415 * tree.h (OMP_PARALLEL_COMBINED): Define. * gimplify.c (struct gimplify_omp_ctx): Add is_combined_parallel field. (new_omp_context): Add is_combined_parallel argument. (gimplify_scan_omp_clauses): Add in_combined_parallel argument, adjust new_omp_context caller. (gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare): Adjust gimplify_scan_omp_clauses callers. (omp_is_private): Issue errors if iteration variable is firstprivate or reduction in the current context. * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED on combined parallel workshare constructs. cp/ * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED on combined parallel workshare constructs. * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag. fortran/ * trans-openmp.c (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare): Set OMP_PARALLEL_COMBINED flag. testsuite/ * gcc.dg/gomp/pr27415.c: New test. * g++.dg/gomp/pr27415.C: New test. From-SVN: r113846
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r--gcc/fortran/trans-openmp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index f33f1bd..b7c6f9e 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -1095,6 +1095,7 @@ gfc_trans_omp_parallel_do (gfc_code *code)
else
poplevel (0, 0, 0);
stmt = build4_v (OMP_PARALLEL, stmt, omp_clauses, NULL, NULL);
+ OMP_PARALLEL_COMBINED (stmt) = 1;
gfc_add_expr_to_block (&block, stmt);
return gfc_finish_block (&block);
}
@@ -1119,6 +1120,7 @@ gfc_trans_omp_parallel_sections (gfc_code *code)
else
poplevel (0, 0, 0);
stmt = build4_v (OMP_PARALLEL, stmt, omp_clauses, NULL, NULL);
+ OMP_PARALLEL_COMBINED (stmt) = 1;
gfc_add_expr_to_block (&block, stmt);
return gfc_finish_block (&block);
}
@@ -1143,6 +1145,7 @@ gfc_trans_omp_parallel_workshare (gfc_code *code)
else
poplevel (0, 0, 0);
stmt = build4_v (OMP_PARALLEL, stmt, omp_clauses, NULL, NULL);
+ OMP_PARALLEL_COMBINED (stmt) = 1;
gfc_add_expr_to_block (&block, stmt);
return gfc_finish_block (&block);
}