Fortran: With OpenACC, ignore OpenMP's cond comp sentinels
authorTobias Burnus <tobias@codesourcery.com>
Mon, 30 Nov 2020 14:30:51 +0000 (15:30 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 30 Nov 2020 14:31:22 +0000 (15:31 +0100)
commit1d6f6ac693a8601bef9fe4ba72eb6fbf7b60b5cd
treebec2e4d4f4cfceba9cf8a2293efb0bd04496eae0
parentf4e7ea81d1369d4d6cb6d8e440aefb3407142e05
Fortran: With OpenACC, ignore OpenMP's cond comp sentinels

gcc/fortran/ChangeLog:

PR fortran/98011
* scanner.c (skip_free_comments, skip_fixed_comments): If only
-fopenacc but not -fopenmp is used, ignore OpenMP's conditional
compilation sentinels. Fix indentation, use 'else if' for readability.

gcc/testsuite/ChangeLog:

PR fortran/98011
* gfortran.dg/goacc/sentinel-free-form.f95:
* gfortran.dg/goacc-gomp/fixed-1.f: New test.
* gfortran.dg/goacc-gomp/free-1.f90: New test.
* gfortran.dg/goacc/fixed-5.f: New test.
gcc/fortran/scanner.c
gcc/testsuite/gfortran.dg/goacc-gomp/fixed-1.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc-gomp/free-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/fixed-5.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/sentinel-free-form.f95