On Tue, Oct 19, 2021 at 09:03:06PM +0800, Chung-Lin Tang wrote:
> 2021-10-19 Chung-Lin Tang <[email protected]>
>
> gcc/fortran/ChangeLog:
>
> * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default
> false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case.
> (gfc_match_omp_clauses): Add 'openmp_target' default false parameter,
> adjust call to gfc_match_omp_clause_reduction.
> (match_omp): Adjust call to gfc_match_omp_clauses
> * trans-openmp.c (gfc_trans_omp_taskgroup): Add call to
> gfc_match_omp_clause, create and return block.
>
> gcc/ChangeLog:
>
> * omp-low.c (omp_copy_decl_2): For !ctx, use record_vars to add new copy
> as local variable.
> (scan_sharing_clauses): Place copy of OMP_CLAUSE_IN_REDUCTION decl in
> ctx->outer instead of ctx.
>
> gcc/testsuite/ChangeLog:
>
> * gfortran.dg/gomp/reduction4.f90: Adjust omp target in_reduction' scan
> pattern.
>
> libgomp/ChangeLog:
>
> * testsuite/libgomp.fortran/target-in-reduction-1.f90: New test.
> * testsuite/libgomp.fortran/target-in-reduction-2.f90: New test.
LGTM, thanks.
Jakub