On Tue, Oct 08, 2019 at 11:53:52AM +0200, Tobias Burnus wrote: > Simple patch for better diagnostics: > > Before: > > 17 | !$omp end target simd hjgfhg > | 1 > Error: Unclassifiable OpenMP directive at (1) > > Now: > 17 | !$omp end target simd hjgfhg > | 1 > Error: Unexpected junk at (1) > > > OK for the trunk? > > Cheers, > > Tobias >
> gcc/fortran/ > * match.h (gfc_match_omp_eos_error): Renamed from gfc_match_omp_eos. > * openmp.c (gfc_match_omp_eos): Make static. > (gfc_match_omp_eos_error): New. > * parse.c (matchs, matchdo, matchds): Do as done for 'matcho' - > if error occurred after OpenMP/OpenACC directive matched, do not > try other directives. > (decode_oacc_directive, decode_omp_directive): Call new function > instead. > > testsuite/ > * gfortran.dg/goacc/continuation-free-form.f95: Update dg-error. Ok, though it might be useful to have a testcase with some of these diagnostics at least for a couple of constructs too (not just in the single line you've changed). Jakub