OpenACC/Fortran: permit 'routine' inside PURE
authorTobias Burnus <tobias@codesourcery.com>
Tue, 16 Jun 2020 18:18:31 +0000 (20:18 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 16 Jun 2020 18:23:58 +0000 (20:23 +0200)
commit12df77ab6df4b91d4770240bcc4ab443e4bb18b9
treebc813b527747e25caf6648269c40345834fe047f
parent244ed2adaa3d349d381ca6ce090c2fa69b6e8d8b
OpenACC/Fortran: permit 'routine' inside PURE

gcc/fortran/ChangeLog

* parse.c (decode_oacc_directive): Permit 'acc routine' also
inside pure procedures.
* openmp.c (gfc_match_oacc_routine): Inside pure procedures
do not permit gang, worker or vector clauses.

libgomp/ChangeLog:

* testsuite/libgomp.oacc-fortran/routine-10.f90: New test.

gcc/testsuite/ChangeLog:

* gfortran.dg/goacc/pure-elemental-procedures-2.f90: New test.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
gcc/fortran/openmp.c
gcc/fortran/parse.c
gcc/testsuite/gfortran.dg/goacc/pure-elemental-procedures-2.f90 [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-fortran/routine-10.f90 [new file with mode: 0644]