From 34d01e1d17222f8a4a6f01f9ad1055d0c001ce6a Mon Sep 17 00:00:00 2001 From: Vasilis Liaskovitis Date: Mon, 20 Apr 2009 10:59:59 +0000 Subject: re PR fortran/35423 (Implement OpenMP workshare) PR fortran/35423 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT, OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define. (ompws_flags): New extern decl. * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR for the outer dimension if ompws_flags allow it. * trans.c (gfc_generate_code): Clear ompws_flags. * trans-expr.c (gfc_trans_assignment_1): Allow worksharing array assignments inside of !$omp workshare. * trans-stmt.c (gfc_trans_where_3): Similarly for where statements and constructs. * trans-openmp.c (ompws_flags): New variable. (gfc_trans_omp_workshare): Rewritten. * testsuite/libgomp.fortran/workshare2.f90: New test. Co-Authored-By: Jakub Jelinek From-SVN: r146397 --- gcc/fortran/trans.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/fortran/trans.c') diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index ddbc730..e926a95 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -1259,6 +1259,7 @@ gfc_trans_code (gfc_code * code) void gfc_generate_code (gfc_namespace * ns) { + ompws_flags = 0; if (ns->is_block_data) { gfc_generate_block_data (ns); -- cgit v1.1