aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.cc
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2022-05-18 12:04:21 +0200
committerTobias Burnus <tobias@codesourcery.com>2022-05-18 12:04:21 +0200
commitba8563693fb4eb1317fcbd54883516c3873782f4 (patch)
tree15a3b0d62a6b9cb46f3b46cdea95740d26754f26 /gcc/fortran/openmp.cc
parent9f068ad0f2f1d65349ac564178cddbe9aec39f3a (diff)
downloadgcc-ba8563693fb4eb1317fcbd54883516c3873782f4.zip
gcc-ba8563693fb4eb1317fcbd54883516c3873782f4.tar.gz
gcc-ba8563693fb4eb1317fcbd54883516c3873782f4.tar.bz2
OpenMP: Add Fortran support for inoutset depend-kind
Fortran additions to the C/C++ + ME/libgomp commit r13-556-g2c16eb3157f86ae561468c540caf8eb326106b5f gcc/fortran/ChangeLog: * gfortran.h (enum gfc_omp_depend_op): Add OMP_DEPEND_INOUTSET. (gfc_omp_clauses): Enlarge ENUM_BITFIELD. * dump-parse-tree.cc (show_omp_namelist, show_omp_clauses): Handle 'inoutset' depend modifier. * openmp.cc (gfc_match_omp_clauses, gfc_match_omp_depobj): Likewise. * trans-openmp.cc (gfc_trans_omp_clauses, gfc_trans_omp_depobj): Likewise. libgomp/ChangeLog: * libgomp.texi (OpenMP 5.1): Set 'inoutset' to Y. (OpenMP Context Selectors): Add missing comma. * testsuite/libgomp.fortran/depend-5.f90: Add inoutset test. * testsuite/libgomp.fortran/depend-6.f90: Likewise. * testsuite/libgomp.fortran/depend-7.f90: Likewise. * testsuite/libgomp.fortran/depend-inoutset-1.f90: New test. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/all-memory-1.f90: Add inoutset test. * gfortran.dg/gomp/all-memory-2.f90: Likewise. * gfortran.dg/gomp/depobj-1.f90: Likewise. * gfortran.dg/gomp/depobj-2.f90: Likewise.
Diffstat (limited to 'gcc/fortran/openmp.cc')
-rw-r--r--gcc/fortran/openmp.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc
index 3061e52..63fd4dd 100644
--- a/gcc/fortran/openmp.cc
+++ b/gcc/fortran/openmp.cc
@@ -1915,7 +1915,9 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
break;
m = MATCH_YES;
gfc_omp_depend_op depend_op = OMP_DEPEND_OUT;
- if (gfc_match ("inout") == MATCH_YES)
+ if (gfc_match ("inoutset") == MATCH_YES)
+ depend_op = OMP_DEPEND_INOUTSET;
+ else if (gfc_match ("inout") == MATCH_YES)
depend_op = OMP_DEPEND_INOUT;
else if (gfc_match ("in") == MATCH_YES)
depend_op = OMP_DEPEND_IN;
@@ -3805,7 +3807,9 @@ gfc_match_omp_depobj (void)
if (gfc_match ("update ( ") == MATCH_YES)
{
c = gfc_get_omp_clauses ();
- if (gfc_match ("inout )") == MATCH_YES)
+ if (gfc_match ("inoutset )") == MATCH_YES)
+ c->depobj_update = OMP_DEPEND_INOUTSET;
+ else if (gfc_match ("inout )") == MATCH_YES)
c->depobj_update = OMP_DEPEND_INOUT;
else if (gfc_match ("in )") == MATCH_YES)
c->depobj_update = OMP_DEPEND_IN;
@@ -3815,8 +3819,8 @@ gfc_match_omp_depobj (void)
c->depobj_update = OMP_DEPEND_MUTEXINOUTSET;
else
{
- gfc_error ("Expected IN, OUT, INOUT, MUTEXINOUTSET followed by "
- "%<)%> at %C");
+ gfc_error ("Expected IN, OUT, INOUT, INOUTSET or MUTEXINOUTSET "
+ "followed by %<)%> at %C");
goto error;
}
}