re PR fortran/49792 (OpenMP workshare: Wrong result with array assignment)
authorJakub Jelinek <jakub@redhat.com>
Fri, 19 Aug 2011 13:25:22 +0000 (15:25 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 19 Aug 2011 13:25:22 +0000 (15:25 +0200)
commitc26dffff5c573aa7f3935dddc8300a2c8fd660a1
tree963ec6d00bf1bf89a14122150aae777bf1f6a55a
parentdf698a8707413cc5ebaa2f5ad0007e011eae8418
re PR fortran/49792 (OpenMP workshare: Wrong result with array assignment)

PR fortran/49792
* trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
lhs needs reallocation.
* trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
code is NULL, emit a barrier if workshare emitted no code at all
and NOWAIT clause isn't present.

* testsuite/libgomp.fortran/pr49792-1.f90: New test.
* testsuite/libgomp.fortran/pr49792-2.f90: New test.

From-SVN: r177898
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/fortran/trans-openmp.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.fortran/pr49792-1.f90 [new file with mode: 0644]
libgomp/testsuite/libgomp.fortran/pr49792-2.f90 [new file with mode: 0644]