Improve OMP/ACC error diagnostic in Fortran
authorTobias Burnus <tobias@codesourcery.com>
Wed, 2 Oct 2019 10:50:23 +0000 (10:50 +0000)
committerTobias Burnus <burnus@gcc.gnu.org>
Wed, 2 Oct 2019 10:50:23 +0000 (12:50 +0200)
commitba045eb2297e8e51c7e99c2b2650f32cb642d209
treed7f0ed7450b0af3f1045c81b3a743f450109c511
parent4aef466788a964688458f4e633398b140ad89e24
Improve OMP/ACC error diagnostic in Fortran

gcc/fortran/
* openmp.c (gfc_match_omp_clauses): Show a clause-parsing
error if none was rised before.
* parse.c (matcha, matcho): If error occurred after
OpenMP/OpenACC directive matched, do not try other directives.

gcc/testsuite/
* gfortran.dg/goacc/asyncwait-1.f95: Handle new error message.
* gfortran.dg/goacc/asyncwait-2.f95: Likewise
* gfortran.dg/goacc/asyncwait-3.f95: Likewise
* gfortran.dg/goacc/asyncwait-4.f95: Likewise
* gfortran.dg/goacc/default-2.f: Likewise
* gfortran.dg/goacc/enter-exit-data.f95: Likewise
* gfortran.dg/goacc/if.f95: Likewise
* gfortran.dg/goacc/list.f95: Likewise
* gfortran.dg/goacc/literal.f95: Likewise
* gfortran.dg/goacc/loop-2-kernels-tile.f: Likewise95
* gfortran.dg/goacc/loop-2-parallel-tile.f95: Likewise
* gfortran.dg/goacc/loop-7.f95: Likewise
* gfortran.dg/goacc/parallel-kernels-cla: Likewiseuses.f95
* gfortran.dg/goacc/routine-6.f90: Likewise
* gfortran.dg/goacc/several-directives.f95: Likewise
* gfortran.dg/goacc/sie.f95: Likewise
* gfortran.dg/goacc/tile-1.f90: Likewise
* gfortran.dg/goacc/update-if_present-2.: Likewisef90
* gfortran.dg/gomp/declare-simd-1.f90: Likewise
* gfortran.dg/gomp/pr29759.f90: Likewise

From-SVN: r276447
24 files changed:
gcc/fortran/ChangeLog
gcc/fortran/openmp.c
gcc/fortran/parse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/asyncwait-1.f95
gcc/testsuite/gfortran.dg/goacc/asyncwait-2.f95
gcc/testsuite/gfortran.dg/goacc/asyncwait-3.f95
gcc/testsuite/gfortran.dg/goacc/asyncwait-4.f95
gcc/testsuite/gfortran.dg/goacc/default-2.f
gcc/testsuite/gfortran.dg/goacc/enter-exit-data.f95
gcc/testsuite/gfortran.dg/goacc/if.f95
gcc/testsuite/gfortran.dg/goacc/list.f95
gcc/testsuite/gfortran.dg/goacc/literal.f95
gcc/testsuite/gfortran.dg/goacc/loop-2-kernels-tile.f95
gcc/testsuite/gfortran.dg/goacc/loop-2-parallel-tile.f95
gcc/testsuite/gfortran.dg/goacc/loop-7.f95
gcc/testsuite/gfortran.dg/goacc/parallel-kernels-clauses.f95
gcc/testsuite/gfortran.dg/goacc/routine-6.f90
gcc/testsuite/gfortran.dg/goacc/several-directives.f95
gcc/testsuite/gfortran.dg/goacc/sie.f95
gcc/testsuite/gfortran.dg/goacc/tile-1.f90
gcc/testsuite/gfortran.dg/goacc/update-if_present-2.f90
gcc/testsuite/gfortran.dg/gomp/declare-simd-1.f90
gcc/testsuite/gfortran.dg/gomp/pr29759.f90