[Bug gcov-profile/78792] gfortran + gcov confused by #line directive

2017-04-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78792

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #4 from Martin Liška  ---
Closing as works for me.

[Bug gcov-profile/78792] gfortran + gcov confused by #line directive

2017-04-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78792

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #3 from Martin Liška  ---
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?

[Bug gcov-profile/78792] gfortran + gcov confused by #line directive

2017-04-19 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78792

--- Comment #2 from Martin Liška  ---
I'm unable to feed Fortran FE with a pre-processed file:
https://gcc.gnu.org/ml/fortran/2017-04/msg00072.html

[Bug gcov-profile/78792] gfortran + gcov confused by #line directive

2016-12-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78792

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-12-20
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Ok, I can confirm that line directives are accepted, however gcov does not
respect filename of the directives.

Second issue is that calling gcov example.in, actually loads example.gcno file,
where it's written that it's note file for example.f90 (compiled file). Maybe
we can show error message when an argument of gcov does not reflect to a file
mentioned in the note file.

Anyhow, I'm planning to discuss that with Honza and return to that for GCC 8.