Fortran: improve location data for OpenACC/OpenMP directives [PR97782]
authorTobias Burnus <tobias@codesourcery.com>
Thu, 12 Nov 2020 13:13:45 +0000 (14:13 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Thu, 12 Nov 2020 13:13:45 +0000 (14:13 +0100)
commitb71ff8c15f5a7d6b1cc1524b4d27843f0d88dbda
tree65a5e3e052db2b17ef75f1a6b9b92d4aa44e9b19
parent7f851c33411fc39982c62a91fa93ec02981fd956
Fortran: improve location data for OpenACC/OpenMP directives [PR97782]

gcc/fortran/ChangeLog:

PR fortran/97782
* trans-openmp.c (gfc_trans_oacc_construct, gfc_trans_omp_parallel_do,
gfc_trans_omp_parallel_do_simd, gfc_trans_omp_parallel_sections,
gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
gfc_trans_omp_single, gfc_trans_omp_task, gfc_trans_omp_teams
gfc_trans_omp_target, gfc_trans_omp_target_data,
gfc_trans_omp_workshare): Use code->loc instead of input_location
when building the OMP_/OACC_ construct.

gcc/testsuite/ChangeLog:

PR fortran/97782
* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Move dg-message
one line up.
* gfortran.dg/goacc/classify-kernels.f95: Likewise.
gcc/fortran/trans-openmp.c
gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95
gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95