diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2021-08-18 15:21:18 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2021-08-18 15:24:22 +0200 |
commit | f74433e70ae94a3b5291e45fea488b1cfdee4a34 (patch) | |
tree | 86caeb8480d332f032516f9191bdd42847a65944 /gcc/fortran/openmp.c | |
parent | be4a4fb516688d7cfe28a80a4aa333f4ecf0b518 (diff) | |
download | gcc-f74433e70ae94a3b5291e45fea488b1cfdee4a34.zip gcc-f74433e70ae94a3b5291e45fea488b1cfdee4a34.tar.gz gcc-f74433e70ae94a3b5291e45fea488b1cfdee4a34.tar.bz2 |
Fortran: Add OpenMP's nothing directive support
Fortran version of commit 5079b7781a2c506dcdfb241347d74c7891268225
gcc/fortran/ChangeLog:
* match.h (gfc_match_omp_nothing): New.
* openmp.c (gfc_match_omp_nothing): New.
* parse.c (decode_omp_directive): Match 'nothing' directive.
gcc/testsuite/ChangeLog:
* gfortran.dg/nothing-1.f90: New test.
* gfortran.dg/nothing-2.f90: New test.
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r-- | gcc/fortran/openmp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 9675b65..fd219dc 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -4797,6 +4797,17 @@ gfc_match_omp_ordered (void) return match_omp (EXEC_OMP_ORDERED, OMP_ORDERED_CLAUSES); } +match +gfc_match_omp_nothing (void) +{ + if (gfc_match_omp_eos () != MATCH_YES) + { + gfc_error ("Unexpected junk after $OMP NOTHING statement at %C"); + return MATCH_ERROR; + } + /* Will use ST_NONE; therefore, no EXEC_OMP_ is needed. */ + return MATCH_YES; +} match gfc_match_omp_ordered_depend (void) |