https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98014
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[Fortran OpenACC] Empty |[Fortran][OpenACC][OpenMP] |'!$acc' continuation line |Empty '!$acc'/'!$omp' |rejected |continuation line rejected Keywords| |openmp --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- The following compiles here: !$acc parallel & !$acc vector_length (1) & !$acc& ! { dg-warning } !$acc end parallel end If I remove the '&' after '!$acc', I get the error: 2 | !$acc vector_length (1) & | 1 Error: Failed to match clause at (1) Same with OpenMP. * * * I think there is a bug in gfortran to not accept the first version – and not to reject the second version which should be invalid for the reasons given below. * * * In any case, I believe this is an omission in the OpenACC and OpenMP specs which does not tell how to understand that line. Namely, the following is ambiguous: !$omp parallel & !$omp & !$omp if(.false.) vs. !$omp parallel & !$omp & !$omp do Is the 'omp &' line the last line of the directive? Of just in the middle of a three-line directive? For Fortran itself, a single '&' is invalid in free from for the same reasons. → "No line shall contain a single “&” as the only nonblank character or as the only nonblank character before an “!” that initiates a comment." (F2018, 6.3.2.4 Free form statement continuation). * * * On the specification side, I have opened a ticked * for OpenACC, Issue 353 * for OpenMP, Issue 2668.