diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2019-10-02 10:50:23 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-10-02 12:50:23 +0200 |
commit | ba045eb2297e8e51c7e99c2b2650f32cb642d209 (patch) | |
tree | d7f0ed7450b0af3f1045c81b3a743f450109c511 /gcc/fortran/openmp.c | |
parent | 4aef466788a964688458f4e633398b140ad89e24 (diff) | |
download | gcc-ba045eb2297e8e51c7e99c2b2650f32cb642d209.zip gcc-ba045eb2297e8e51c7e99c2b2650f32cb642d209.tar.gz gcc-ba045eb2297e8e51c7e99c2b2650f32cb642d209.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r-- | gcc/fortran/openmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index bda7f28..2beac3d 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -1922,6 +1922,8 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask, if (gfc_match_omp_eos () != MATCH_YES) { + if (!gfc_error_flag_test ()) + gfc_error ("Failed to match clause at %C"); gfc_free_omp_clauses (c); return MATCH_ERROR; } |