]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix OpenMP/OpenACC continue-line parsing
authorTobias Burnus <tobias@codesourcery.com>
Fri, 4 Jun 2021 15:43:59 +0000 (17:43 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Fri, 4 Jun 2021 15:44:23 +0000 (17:44 +0200)
commit4facf2bf5b7b32f444da864306b5c11e14c15bcf
tree0b74515b5819d17fa2a64f5260b03628a6ac0c1f
parent8d7dae0eb366a88a1baba1857ecc54c09e4a520e
Fortran: Fix OpenMP/OpenACC continue-line parsing

gcc/fortran/ChangeLog:

* scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
this is not an (OpenMP) continuation line.
(skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
(gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
continuation once per location and return '\n'.

gcc/testsuite/ChangeLog:

* gfortran.dg/goacc/omp-fixed.f: Re-add test item changed in previous
commit in addition - add more dg-errors and '... end ...' due to changed
parsing.
* gfortran.dg/goacc/omp.f95: Likewise.
* gfortran.dg/goacc-gomp/mixed-1.f: New test.
gcc/fortran/scanner.c
gcc/testsuite/gfortran.dg/goacc-gomp/mixed-1.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/omp-fixed.f
gcc/testsuite/gfortran.dg/goacc/omp.f95