aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parser.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/c-parser.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/c-parser.c')
-rw-r--r--gcc/c-parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index aad1c6b..8f6cafd 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -7651,6 +7651,7 @@ c_parser_omp_parallel (c_parser *parser)
if (stmt)
OMP_FOR_CLAUSES (stmt) = ws_clause;
stmt = c_finish_omp_parallel (par_clause, block);
+ OMP_PARALLEL_COMBINED (stmt) = 1;
break;
case PRAGMA_OMP_PARALLEL_SECTIONS:
@@ -7660,6 +7661,7 @@ c_parser_omp_parallel (c_parser *parser)
if (stmt)
OMP_SECTIONS_CLAUSES (stmt) = ws_clause;
stmt = c_finish_omp_parallel (par_clause, block);
+ OMP_PARALLEL_COMBINED (stmt) = 1;
break;
default: