https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69128
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Feb 11 09:14:43 2016 New Revision: 233328 URL: https://gcc.gnu.org/viewcvs?rev=233328&root=gcc&view=rev Log: Backported from mainline 2016-01-08 Jakub Jelinek <ja...@redhat.com> 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. Added: branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/gomp/pr69128.f90 Modified: branches/gcc-4_9-branch/gcc/fortran/ChangeLog branches/gcc-4_9-branch/gcc/fortran/trans-array.c branches/gcc-4_9-branch/gcc/fortran/trans-expr.c branches/gcc-4_9-branch/gcc/fortran/trans-openmp.c branches/gcc-4_9-branch/gcc/fortran/trans-stmt.c branches/gcc-4_9-branch/gcc/fortran/trans.h branches/gcc-4_9-branch/gcc/testsuite/ChangeLog