diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-01-08 07:45:18 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-01-08 07:45:18 +0100 |
commit | 57bf30726cf3695077cde97bd3fd396cb1262eeb (patch) | |
tree | e9a3324b824366e319e9512c7ab45e0a701976ad /gcc/fortran/trans.h | |
parent | 53290e072ae4d8e5d61f82d651b6fba309fed6f1 (diff) | |
download | gcc-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.h')
-rw-r--r-- | gcc/fortran/trans.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index efca096..3026e3b 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -1039,7 +1039,9 @@ extern const char gfc_msg_wrong_return[]; construct is not workshared. */ #define OMPWS_SCALARIZER_WS 4 /* Set if scalarizer should attempt to create parallel loops. */ -#define OMPWS_NOWAIT 8 /* Use NOWAIT on OMP_FOR. */ +#define OMPWS_SCALARIZER_BODY 8 /* Set if handling body of potential + parallel loop. */ +#define OMPWS_NOWAIT 16 /* Use NOWAIT on OMP_FOR. */ extern int ompws_flags; #endif /* GFC_TRANS_H */ |