Fortran: Fix function decl's location [PR95847]
authorTobias Burnus <tobias@codesourcery.com>
Tue, 10 Nov 2020 09:31:33 +0000 (10:31 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 10 Nov 2020 09:31:33 +0000 (10:31 +0100)
commit2d59593105d3b1e38e49f96b74fd81e4e5038c7f
tree85d8bed022301a62f158bfc62c4f954a96b1aba6
parent2686de5617bfb572343933be2883e8274c9735b5
Fortran: Fix function decl's location [PR95847]

gcc/fortran/ChangeLog:

PR fortran/95847
* trans-decl.c (gfc_get_symbol_decl): Do not (re)set the location
of an external procedure.
(build_entry_thunks, generate_coarray_init, create_main_function,
gfc_generate_function_code): Use fndecl's location in BIND_EXPR.

gcc/testsuite/ChangeLog:

PR fortran/95847
* gfortran.dg/coverage.f90: New test.
gcc/fortran/trans-decl.c
gcc/testsuite/gfortran.dg/coverage.f90 [new file with mode: 0644]