https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78792
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Ok, after I learnt what's the difference in between fixed-form and free-form.
It looks all works. Please take a look:
$ cat example2.f90
#include "example2.in"
$ cat example2.in
#include "inc"
PROGRAM example2
PRINT *, "example2"
END PROGRAM
$ gfortran example2.f90 -E -cpp > example-prep.f90
$ gfortran example-prep.f90 --coverage
$ ./a.out
example2
$ gcov example-prep.f90
File 'example2.in'
Lines executed:100.00% of 3
Creating 'example2.in.gcov'
$ cat example2.in
#include "inc"
PROGRAM example2
PRINT *, "example2"
END PROGRAM
=== end ===
The difference is that you have to call gcov for the same file as you used with
'--coverage' (or -fprofile-arcs) option.
Thus I believe it works as expected?