diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2022-09-05 18:05:24 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2022-09-05 18:06:06 +0200 |
commit | 938cda536019cd6a1bc0dd2346381185b420bbf8 (patch) | |
tree | 78f0c5604425d3e2db0576f1a35066187750ea2f /gcc/fortran/parse.cc | |
parent | b4d8a56a4c62ba8bca55469ae2b841fb4e1334a4 (diff) | |
download | gcc-938cda536019cd6a1bc0dd2346381185b420bbf8.zip gcc-938cda536019cd6a1bc0dd2346381185b420bbf8.tar.gz gcc-938cda536019cd6a1bc0dd2346381185b420bbf8.tar.bz2 |
Fortran/openmp: Partial OpenMP 5.2 doacross and omp_cur_iteration support
Add the Fortran support to the ME/C/C++ commit
r13-2388-ga651e6d59188da8992f8bfae2df1cb4e6316f9e6
gcc/fortran/ChangeLog:
* dump-parse-tree.cc (show_omp_namelist, show_omp_clauses): Handle
omp_cur_iteration and distinguish doacross/depend.
* gfortran.h (enum gfc_omp_depend_doacross_op): Renamed from
gfc_omp_depend_op.
(enum gfc_omp_depend_doacross_op): Add OMP_DOACROSS_SINK_FIRST,
Rename OMP_DEPEND_SINK to OMP_DOACROSS_SINK.
(gfc_omp_namelist) Handle renaming, rename depend_op to
depend_doacross_op.
(struct gfc_omp_clauses): Add doacross_source.
* openmp.cc (gfc_match_omp_depend_sink): Renamed to ...
(gfc_match_omp_doacross_sink): ... this; handle omp_all_memory.
(enum omp_mask2): Add OMP_CLAUSE_DOACROSS.
(gfc_match_omp_clauses): Handle 'doacross' and syntax changes to
depend.
(gfc_match_omp_depobj): Simplify as sink/source are now impossible.
(gfc_match_omp_ordered_depend): Request OMP_CLAUSE_DOACROSS.
(resolve_omp_clauses): Update sink/source checks.
(gfc_resolve_omp_directive): Resolve EXEC_OMP_ORDERED clauses.
* parse.cc (decode_omp_directive): Handle 'ordered doacross'.
* trans-openmp.cc (gfc_trans_omp_clauses): Handle doacross.
(gfc_trans_omp_do): Fix OMP_FOR_ORIG_DECLS handling if 'ordered'
clause is present.
(gfc_trans_omp_depobj): Update for member name change.
libgomp/ChangeLog:
* libgomp.texi (OpenMP 5.2): Update doacross/omp_cur_iteration status.
gcc/testsuite/ChangeLog:
* gfortran.dg/gomp/all-memory-1.f90: Update dg-error.
* gfortran.dg/gomp/depend-iterator-2.f90: Likewise.
* gfortran.dg/gomp/depobj-2.f90: Likewise.
* gfortran.dg/gomp/doacross-5.f90: New test.
* gfortran.dg/gomp/doacross-6.f90: New test.
Diffstat (limited to 'gcc/fortran/parse.cc')
-rw-r--r-- | gcc/fortran/parse.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/parse.cc b/gcc/fortran/parse.cc index 80492c9..5b13441 100644 --- a/gcc/fortran/parse.cc +++ b/gcc/fortran/parse.cc @@ -1026,7 +1026,8 @@ decode_omp_directive (void) matcho ("loop", gfc_match_omp_loop, ST_OMP_LOOP); break; case 'o': - if (gfc_match ("ordered depend (") == MATCH_YES) + if (gfc_match ("ordered depend (") == MATCH_YES + || gfc_match ("ordered doacross (") == MATCH_YES) { gfc_current_locus = old_locus; if (!flag_openmp) |