diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2020-06-16 20:17:20 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2020-06-16 20:17:20 +0200 |
commit | 244ed2adaa3d349d381ca6ce090c2fa69b6e8d8b (patch) | |
tree | 8a2c79f3be0c90898bd28d69243dc257027d3991 /gcc/fortran/parse.c | |
parent | 04afaf4575ff239279cfa34aff17101345451965 (diff) | |
download | gcc-244ed2adaa3d349d381ca6ce090c2fa69b6e8d8b.zip gcc-244ed2adaa3d349d381ca6ce090c2fa69b6e8d8b.tar.gz gcc-244ed2adaa3d349d381ca6ce090c2fa69b6e8d8b.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. – Followup for
-fopenmp-simd.
gcc/fortran/ChangeLog:
* parse.c (decode_omp_directive): Remove "or ELEMENTAL"
from "in PURE" error message also for -fopenmp-simd.
gcc/testsuite/ChangeLog:
* gfortran.dg/gomp/pr79154-simd.f90: New test.
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 9d90e50..46e1e1b 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -1078,8 +1078,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"); reject_statement (); gfc_error_recovery (); return ST_NONE; |