aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-openmp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-01-08 07:45:18 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-01-08 07:45:18 +0100
commit57bf30726cf3695077cde97bd3fd396cb1262eeb (patch)
treee9a3324b824366e319e9512c7ab45e0a701976ad /gcc/fortran/trans-openmp.c
parent53290e072ae4d8e5d61f82d651b6fba309fed6f1 (diff)
downloadgcc-57bf30726cf3695077cde97bd3fd396cb1262eeb.zip
gcc-57bf30726cf3695077cde97bd3fd396cb1262eeb.tar.gz
gcc-57bf30726cf3695077cde97bd3fd396cb1262eeb.tar.bz2
re PR fortran/69128 (OpenMP workshare problem with SUM())
PR fortran/69128 * trans.h (OMPWS_SCALARIZER_BODY): Define. (OMPWS_NOWAIT): Renumber. * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS if OMPWS_SCALARIZER_BODY is not set already, and set also OMPWS_SCALARIZER_BODY until the final loop creation. * trans-expr.c (gfc_trans_assignment_1): Likewise. * trans-openmp.c (gfc_trans_omp_workshare): Also clear OMPWS_SCALARIZER_BODY. * trans-array.c (gfc_trans_scalarized_loop_end): Don't create OMP_FOR if OMPWS_SCALARIZER_BODY is set. * gfortran.dg/gomp/pr69128.f90: New test. From-SVN: r232151
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r--gcc/fortran/trans-openmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 27706d2..5990202 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -4297,7 +4297,7 @@ gfc_trans_omp_workshare (gfc_code *code, gfc_omp_clauses *clauses)
/* By default, every gfc_code is a single unit of work. */
ompws_flags |= OMPWS_CURR_SINGLEUNIT;
- ompws_flags &= ~OMPWS_SCALARIZER_WS;
+ ompws_flags &= ~(OMPWS_SCALARIZER_WS | OMPWS_SCALARIZER_BODY);
switch (code->op)
{