Fortran: Fix OpenACC in specification-part checks [PR90111]
authorTobias Burnus <tobias@codesourcery.com>
Mon, 9 Nov 2020 15:16:44 +0000 (16:16 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 9 Nov 2020 15:16:44 +0000 (16:16 +0100)
commitf27a3b37b4805feba138dd421f039e3267b1c5f0
treea5e6f860c63718ba9d2b514c504afe18212d8960
parentb2b85163731e8647542f2f7561bd4c69ae5f5f2a
Fortran: Fix OpenACC in specification-part checks [PR90111]

OpenACC's routine and declare directives can appear anywhere in the
specification part, i.e. before/after use-stmts, import-stmt, implicit-part,
or declaration-constructs.

gcc/fortran/ChangeLog:

PR fortran/90111
* parse.c (case_decl): Move ST_OACC_ROUTINE and ST_OACC_DECLARE to ...
(case_omp_decl): ... here.
(verify_st_order): Update comment.

gcc/testsuite/ChangeLog:

PR fortran/90111
* gfortran.dg/goacc/specification-part.f90: New test.
gcc/fortran/parse.c
gcc/testsuite/gfortran.dg/goacc/specification-part.f90 [new file with mode: 0644]