re PR middle-end/66199 (lastprivate/linear clause issues on combined constructs)
PR middle-end/66199 * tree.h (OMP_TEAMS_COMBINED): Define. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_LINEAR_LASTPRIVATE_NO_OUTER. (enum omp_region_type): Add ORT_COMBINED_TEAMS. (omp_notice_variable): Accept both ORT_TEAMS and ORT_COMBINED_TEAMS. Don't recurse if GOVD_LINEAR_LASTPRIVATE_NO_OUTER is set and either GOVD_LINEAR is set, or GOVD_LASTPRIVATE without GOVD_FIRSTPRIVATE. (omp_no_lastprivate): New function. (gimplify_scan_omp_clauses): For OMP_CLAUSE_LASTPRIVATE and OMP_CLAUSE_LINEAR, if omp_no_lastprivate, don't notice_outer and set appropriate bits, otherwise make sure default(none) combined constructs won't complain. (gimplify_adjust_omp_clauses): Remove OMP_CLAUSE_LINEAR outer special casing, for OMP_CLAUSE_LASTPRIVATE if omp_no_lastprivate either remove the clause or turn it into OMP_CLAUSE_PRIVATE. (gimplify_omp_for): Fix up handling of implicit lastprivate or linear iterators. (gimplify_omp_workshare): For OMP_TEAMS_COMBINED use ORT_COMBINED_TEAMS. * omp-low.c (lower_omp_for_lastprivate): For combined for simd use fd.loop.n2 from the for rather than simd. gcc/c/ * c-parser.c (c_parser_omp_for_loop): Don't add OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES. (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined constructs. gcc/cp/ * parser.c (cp_parser_omp_for_loop): Don't add OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES. (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined constructs. gcc/fortran/ * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for combined constructs. (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL BIND_EXPR_BLOCK. libgomp/ * testsuite/libgomp.c/pr66199-1.c: New test. * testsuite/libgomp.c/pr66199-2.c: New test. * testsuite/libgomp.c++/pr66199-1.C: New test. * testsuite/libgomp.c++/pr66199-2.C: New test. * testsuite/libgomp.fortran/pr66199-1.f90: New test. * testsuite/libgomp.fortran/pr66199-2.f90: New test. From-SVN: r223387
Showing
- gcc/ChangeLog 28 additions, 0 deletionsgcc/ChangeLog
- gcc/c/ChangeLog 9 additions, 0 deletionsgcc/c/ChangeLog
- gcc/c/c-parser.c 4 additions, 7 deletionsgcc/c/c-parser.c
- gcc/cp/ChangeLog 9 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/parser.c 4 additions, 7 deletionsgcc/cp/parser.c
- gcc/fortran/ChangeLog 8 additions, 0 deletionsgcc/fortran/ChangeLog
- gcc/fortran/trans-openmp.c 12 additions, 3 deletionsgcc/fortran/trans-openmp.c
- gcc/gimplify.c 209 additions, 53 deletionsgcc/gimplify.c
- gcc/omp-low.c 15 additions, 1 deletiongcc/omp-low.c
- gcc/tree.h 5 additions, 0 deletionsgcc/tree.h
- libgomp/ChangeLog 10 additions, 0 deletionslibgomp/ChangeLog
- libgomp/testsuite/libgomp.c++/pr66199-1.C 5 additions, 0 deletionslibgomp/testsuite/libgomp.c++/pr66199-1.C
- libgomp/testsuite/libgomp.c++/pr66199-2.C 5 additions, 0 deletionslibgomp/testsuite/libgomp.c++/pr66199-2.C
- libgomp/testsuite/libgomp.c/pr66199-1.c 62 additions, 0 deletionslibgomp/testsuite/libgomp.c/pr66199-1.c
- libgomp/testsuite/libgomp.c/pr66199-2.c 59 additions, 0 deletionslibgomp/testsuite/libgomp.c/pr66199-2.c
- libgomp/testsuite/libgomp.fortran/pr66199-1.f90 49 additions, 0 deletionslibgomp/testsuite/libgomp.fortran/pr66199-1.f90
- libgomp/testsuite/libgomp.fortran/pr66199-2.f90 47 additions, 0 deletionslibgomp/testsuite/libgomp.fortran/pr66199-2.f90
Loading
Please register or sign in to comment