diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2020-06-16 15:11:12 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2020-06-16 15:11:12 +0200 |
commit | 6a893783f972a2c5d53186dfa15e0a7b8f1b2990 (patch) | |
tree | 53cf55541468dc99aafd78cb917dceeaabd3400b /gcc/fortran/parse.c | |
parent | f193b29e42bcca7b92752d98d3a38dc9df884bef (diff) | |
download | gcc-6a893783f972a2c5d53186dfa15e0a7b8f1b2990.zip gcc-6a893783f972a2c5d53186dfa15e0a7b8f1b2990.tar.gz gcc-6a893783f972a2c5d53186dfa15e0a7b8f1b2990.tar.bz2 |
OpenMP/Fortran: Permit impure ELEMENTAL in omp directives
OpenMP since 4.5 permits IMPURE ELEMENTAL in directives and
the code already only checked for PURE.
gcc/fortran/ChangeLog:
* parse.c (decode_omp_directive): Remove "or ELEMENTAL"
from "in PURE" error message.
gcc/testsuite/ChangeLog:
* gfortran.dg/gomp/pr79154-1.f90: Update dg-*;
add an impure elemental example.
* gfortran.dg/gomp/pr79154-2.f90: Likewise.
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index f71a95d..9d90e50 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -849,7 +849,7 @@ decode_omp_directive (void) /* match is for directives that should be recognized only if -fopenmp, matchs for directives that should be recognized if either -fopenmp or -fopenmp-simd. - Handle only the directives allowed in PURE/ELEMENTAL procedures + Handle only the directives allowed in PURE procedures first (those also shall not turn off implicit pure). */ switch (c) { @@ -868,7 +868,7 @@ decode_omp_directive (void) if (flag_openmp && gfc_pure (NULL)) { gfc_error_now ("OpenMP directives other than SIMD or DECLARE TARGET " - "at %C may not appear in PURE or ELEMENTAL procedures"); + "at %C may not appear in PURE procedures"); gfc_error_recovery (); return ST_NONE; } |